|
|
|
@ -81,7 +81,7 @@ def plot_profiles(profile_name, csv_output_dir, graph_loc, ch_limits, delta_vol,
|
|
|
|
|
ch_min = ch_limits.loc[profile_name, 'Landward Limit']
|
|
|
|
|
|
|
|
|
|
# Set figure dimensions based on beach size
|
|
|
|
|
vertical_exag = 8
|
|
|
|
|
vertical_exag = 5
|
|
|
|
|
m_per_inch = 8
|
|
|
|
|
try:
|
|
|
|
|
fig_h = profiles.dropna().values.max() / m_per_inch * vertical_exag
|
|
|
|
@ -96,6 +96,7 @@ def plot_profiles(profile_name, csv_output_dir, graph_loc, ch_limits, delta_vol,
|
|
|
|
|
else:
|
|
|
|
|
fig, ax = plt.subplots(figsize=(10, 5))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for col in profiles.columns:
|
|
|
|
|
profile = profiles.loc[:, col]
|
|
|
|
|
date_str = col.split('_')[-1]
|
|
|
|
@ -110,6 +111,11 @@ def plot_profiles(profile_name, csv_output_dir, graph_loc, ch_limits, delta_vol,
|
|
|
|
|
ax.set_xlabel('Chainage (m)', labelpad=10)
|
|
|
|
|
ax.set_ylabel('Elevation (m AHD)', labelpad=10)
|
|
|
|
|
|
|
|
|
|
Ylim=ax.get_ylim()[1]
|
|
|
|
|
|
|
|
|
|
if Ylim<10:
|
|
|
|
|
ax.set_ylim([ax.get_ylim()[0], 10])
|
|
|
|
|
|
|
|
|
|
# Show most recent volume change
|
|
|
|
|
if delta_vol is not None:
|
|
|
|
|
ax.annotate('Most recent\nvolume change:\n{:+0.1f} m$^3$/m'.format(delta_vol),
|
|
|
|
@ -215,7 +221,9 @@ def process(yaml_file):
|
|
|
|
|
tmp_dir = params['TMP FOLDER']
|
|
|
|
|
|
|
|
|
|
# Get base name of input las
|
|
|
|
|
las_basename = os.path.splitext(os.path.basename(original_las))[0]
|
|
|
|
|
#las_basename = os.path.splitext(os.path.basename(original_las))[0]
|
|
|
|
|
|
|
|
|
|
las_basename='%s_%s' % (beach.lower().replace(" ","_"), survey_date)
|
|
|
|
|
|
|
|
|
|
# Get name of input point cloud
|
|
|
|
|
input_las = os.path.join(classified_las_dir, las_basename + '.las')
|
|
|
|
@ -249,6 +257,11 @@ def process(yaml_file):
|
|
|
|
|
tif_name = os.path.join(output_tif_dir, las_basename + '.tif')
|
|
|
|
|
call_lastools('las2dem', input=las_data, output=tif_name,
|
|
|
|
|
args=['-step', 1, '-keep_class', 2], verbose=False)
|
|
|
|
|
# IF THIS STEP ISN'T WORKING:
|
|
|
|
|
# might mean there are no data lines
|
|
|
|
|
# trying running with args=['-step', 1, '-keep_class', 2, '-rescale', 0.001,0.001,0.001]
|
|
|
|
|
#call_lastools('las2dem', input=las_data, output=tif_name,
|
|
|
|
|
# args=['-step', 1, '-keep_class', 2, '-rescale', 0.001,0.001,0.001], verbose=False)
|
|
|
|
|
|
|
|
|
|
# Extract elevations along profiles from triangulated surface
|
|
|
|
|
print('Extracting profile elevations...')
|
|
|
|
|