Streamline ground classification process

etta-drone
Dan Howe 6 years ago
parent db8bffa092
commit 3adc2a84fb

@ -353,7 +353,7 @@ def main():
# read the parameters file and scroll through it # read the parameters file and scroll through it
input_file = args.input_file 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") params_file=pd.read_excel(input_file, sheet_name="PARAMS")
for i, row in params_file.iterrows(): for i, row in params_file.iterrows():
@ -362,7 +362,7 @@ def main():
initial_crop_poly = row['INITIAL CROP POLY'] initial_crop_poly = row['INITIAL CROP POLY']
# temp_las1 = row['TEMP LAS1'] # temp_las1 = row['TEMP LAS1']
# temp_las2 = row['TEMP LAS2'] # temp_las2 = row['TEMP LAS2']
step_veg = row['STEP VEG'] lasground_step = row['STEP VEG']
# temp_las3 = row['TEMP LAS3'] # temp_las3 = row['TEMP LAS3']
step_build = row['STEP BUILD'] step_build = row['STEP BUILD']
temp_xyz = row['TEMP XYZ'] temp_xyz = row['TEMP XYZ']
@ -381,14 +381,10 @@ def main():
las_data = call_lastools('lasclip', input=input_las1, output='-stdout', las_data = call_lastools('lasclip', input=input_las1, output='-stdout',
args=['-poly', initial_crop_poly], verbose=False) args=['-poly', initial_crop_poly], verbose=False)
# Remove vegetation # Classify ground points
print('Removing vegetation...') print('Classifying ground...')
las_data = call_lastools('lasground_new', input=las_data, output='-stdout', las_data = call_lastools('lasground_new', input=las_data, output='-stdout',
args=['-step', step_veg], verbose=False) args=['-step', lasground_step], verbose=False)
# Remove buildings
print('Removing buildings...')
las_data = call_lastools('lasground_new', input=las_data, output='-stdout',
args=['-step', step_build], verbose=False)
# Interpolate point cloud onto a grid # Interpolate point cloud onto a grid
print('Interpolating to grid...') print('Interpolating to grid...')
@ -399,12 +395,8 @@ def main():
print('Calculating runup clipping mask...') print('Calculating runup clipping mask...')
shp_name = os.path.join(path_2_poly, polygon_name) shp_name = os.path.join(path_2_poly, polygon_name)
polygon_wave_runup(temp_xyz, direct, shp_name, check_value, check_distance, zone_MGA) 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 #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 #delete the temp files
remove_temp_files(tmp_dir) remove_temp_files(tmp_dir)

Loading…
Cancel
Save