From 3adc2a84fb164306c8397101e4b309062f1c9101 Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Wed, 4 Jul 2018 09:15:53 +1000 Subject: [PATCH] Streamline ground classification process --- las_manipulation.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/las_manipulation.py b/las_manipulation.py index 0865166..5be453f 100644 --- a/las_manipulation.py +++ b/las_manipulation.py @@ -353,7 +353,7 @@ def main(): # read the parameters file and scroll through it input_file = args.input_file - input_file = 'Parameter Files/las manipulation survey2.xlsx' + # input_file = 'Parameter Files/las manipulation survey2.xlsx' params_file=pd.read_excel(input_file, sheet_name="PARAMS") for i, row in params_file.iterrows(): @@ -362,7 +362,7 @@ def main(): initial_crop_poly = row['INITIAL CROP POLY'] # temp_las1 = row['TEMP LAS1'] # temp_las2 = row['TEMP LAS2'] - step_veg = row['STEP VEG'] + lasground_step = row['STEP VEG'] # temp_las3 = row['TEMP LAS3'] step_build = row['STEP BUILD'] temp_xyz = row['TEMP XYZ'] @@ -381,14 +381,10 @@ def main(): las_data = call_lastools('lasclip', input=input_las1, output='-stdout', args=['-poly', initial_crop_poly], verbose=False) - # Remove vegetation - print('Removing vegetation...') + # Classify ground points + print('Classifying ground...') las_data = call_lastools('lasground_new', input=las_data, output='-stdout', - args=['-step', step_veg], verbose=False) - # Remove buildings - print('Removing buildings...') - las_data = call_lastools('lasground_new', input=las_data, output='-stdout', - args=['-step', step_build], verbose=False) + args=['-step', lasground_step], verbose=False) # Interpolate point cloud onto a grid print('Interpolating to grid...') @@ -399,12 +395,8 @@ def main(): print('Calculating runup clipping mask...') shp_name = os.path.join(path_2_poly, polygon_name) polygon_wave_runup(temp_xyz, direct, shp_name, check_value, check_distance, zone_MGA) - #NOTE THAT YOU NEED TO CHECK THE OUTPUT SHP FILE AND ADJUST AS REQUIRED - #STEP FOUR COLOURISE THE LAS - #colour_las(temp_las3, picture, temp_las4, path_2_lastools) - #delete the temp files remove_temp_files(tmp_dir)