Tidy up input parameters

etta-drone
Dan Howe 6 years ago
parent 5476d4380a
commit c393daa141

@ -371,17 +371,15 @@ for i in range(0, len(params_file)): #0, len(params_file)
original_las=params_file['INPUT LAS'][i]
classified_las_dir=params_file['LAS CLASSIFIED FOLDER'][i]
shp_swash_dir=params_file['SHP SWASH FOLDER'][i]
heatmap_crop_poly=params_file['HEATMAP CROP POLY'][i]
final_las = params_file['LAS FINAL FOLDER'][i]
# heatmap_las = params_file['HEATMAP LAS'][i]
crop_heatmap_poly=params_file['HEATMAP CROP POLY'][i]
output_las_dir=params_file['LAS OUTPUT FOLDER'][i]
zone_MGA=params_file['ZONE MGA'][i]
output_poly_name=params_file['OUTPUT POLY NAME'][i]
path_2_output_poly=params_file['PATH TO OUTPUT'][i]
output_raster=params_file['OUTPUT RASTER'][i]
input_csv=params_file['INPUT CSV'][i]
tmp_csv = params_file['TMP CSV'][i]
output_poly_dir=params_file['SHP RASTER FOLDER'][i]
output_tif_dir=params_file['TIF OUTPUT FOLDER'][i]
cp_csv=params_file['INPUT CSV'][i]
# tmp_csv = params_file['TMP CSV'][i]
LL_file=params_file['LL FILE'][i]
csv_loc=params_file['OUT CSV LOC'][i]
# csv_loc=params_file['OUT CSV LOC'][i]
graph_loc = params_file['GRAPH LOC'][i]
volume_output=params_file['VOLUME OUTPUT'][i]
tmp_dir=params_file['TEMP DIR'][i]
@ -396,22 +394,26 @@ for i in range(0, len(params_file)): #0, len(params_file)
# Get name of swash cropping polygon
crop_swash_poly = os.path.join(shp_swash_dir, las_basename + '.shp')
# crop and get the output las
# Crop point cloud to swash boundary
las_data = call_lastools('lasclip', input=input_las, output='-stdout',
args=['-poly', crop_swash_poly], verbose=False)
# crop_las(input_las5, crop_swash_poly, final_las, path_2_lastools)
crop_las(input_las5, crop_swash_poly, final_las, path_2_lastools)
# Apply sea-side clipping polygon
las_data = call_lastools('lasclip', input=las_data, output='-stdout',
args=['-poly', crop_heatmap_poly], verbose=False)
# crop_las(final_las, heatmap_crop_poly, heatmap_las, path_2_lastools)
#now crop out the heatmap las
crop_las(final_las, heatmap_crop_poly, heatmap_las, path_2_lastools)
# Create clipping polygon for heatmap raster
shp_name = os.path.join(output_poly_dir, las_basename + '.shp')
call_lastools('lasboundary', input=las_data, output=shp_name, verbose=False)
# las_boundary(heatmap_las, output_poly_name, output_poly_dir, path_2_lastools, zone_MGA)
#create a polygon to crop a raster
las_boundary(heatmap_las, output_poly_name, path_2_output_poly, path_2_lastools, zone_MGA)
#make a raster
make_raster(heatmap_las, output_raster, path_2_lastools, keep_only_ground=True)
#extract the points and get volumes
df = extract_pts(final_las, input_csv, survey_date, beach, keep_only_ground=True)
df = extract_pts(final_las, cp_csv, survey_date, beach, keep_only_ground=True)
update_survey_output(df, csv_loc)
#colourise the point cloud

Loading…
Cancel
Save