|
|
@ -180,25 +180,21 @@ for i, row in params_file.iterrows():
|
|
|
|
# Crop point cloud to swash boundary
|
|
|
|
# Crop point cloud to swash boundary
|
|
|
|
las_data = call_lastools('lasclip', input=input_las, output='-stdout',
|
|
|
|
las_data = call_lastools('lasclip', input=input_las, output='-stdout',
|
|
|
|
args=['-poly', crop_swash_poly], verbose=False)
|
|
|
|
args=['-poly', crop_swash_poly], verbose=False)
|
|
|
|
# crop_las(input_las5, crop_swash_poly, final_las, path_2_lastools)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Apply sea-side clipping polygon
|
|
|
|
# Apply sea-side clipping polygon
|
|
|
|
las_data = call_lastools('lasclip', input=las_data, output='-stdout',
|
|
|
|
las_data = call_lastools('lasclip', input=las_data, output='-stdout',
|
|
|
|
args=['-poly', crop_heatmap_poly], verbose=False)
|
|
|
|
args=['-poly', crop_heatmap_poly], verbose=False)
|
|
|
|
# crop_las(final_las, heatmap_crop_poly, heatmap_las, path_2_lastools)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Create clipping polygon for heatmap raster
|
|
|
|
# Create clipping polygon for heatmap raster
|
|
|
|
shp_name = os.path.join(output_poly_dir, las_basename + '.shp')
|
|
|
|
shp_name = os.path.join(output_poly_dir, las_basename + '.shp')
|
|
|
|
call_lastools('lasboundary', input=las_data, output=shp_name, verbose=False)
|
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#make a raster
|
|
|
|
# Make a raster from point cloud
|
|
|
|
# make_raster(heatmap_las, output_raster, path_2_lastools, keep_only_ground=True)
|
|
|
|
|
|
|
|
tif_name = os.path.join(output_tif_dir, las_basename + '.tif')
|
|
|
|
tif_name = os.path.join(output_tif_dir, las_basename + '.tif')
|
|
|
|
call_lastools('blast2dem', input=las_data, output=tif_name,
|
|
|
|
call_lastools('blast2dem', input=las_data, output=tif_name,
|
|
|
|
args=['-step', 0.2], verbose=False)
|
|
|
|
args=['-step', 0.2], verbose=False)
|
|
|
|
|
|
|
|
|
|
|
|
#extract the points and get volumes
|
|
|
|
# Extract elevations along profiles from triangulated surface
|
|
|
|
df = extract_pts(
|
|
|
|
df = extract_pts(
|
|
|
|
las_data,
|
|
|
|
las_data,
|
|
|
|
cp_csv,
|
|
|
|
cp_csv,
|
|
|
@ -216,10 +212,8 @@ for i, row in params_file.iterrows():
|
|
|
|
for profile_name in profile_names:
|
|
|
|
for profile_name in profile_names:
|
|
|
|
plot_profiles(profile_name, survey_date, csv_output_dir, graph_loc, ch_limits)
|
|
|
|
plot_profiles(profile_name, survey_date, csv_output_dir, graph_loc, ch_limits)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Remove temprary files
|
|
|
|
#delete the temp files from the tmp_dir and the interim_dir
|
|
|
|
|
|
|
|
remove_temp_files(tmp_dir)
|
|
|
|
remove_temp_files(tmp_dir)
|
|
|
|
#remove_temp_files(int_dir)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print("doing the volume analysis")
|
|
|
|
print("doing the volume analysis")
|
|
|
|
# test=profile_plots_volume(csv_output_dir, profile_limit_file, volume_output, graph_loc)
|
|
|
|
# test=profile_plots_volume(csv_output_dir, profile_limit_file, volume_output, graph_loc)
|
|
|
|