|
|
@ -204,24 +204,24 @@ def remove_temp_files(directory):
|
|
|
|
input_file = 'Parameter Files/las-manipulation-survey-2.xlsx'
|
|
|
|
input_file = 'Parameter Files/las-manipulation-survey-2.xlsx'
|
|
|
|
params_file=pd.read_excel(input_file, sheet_name="PARAMS")
|
|
|
|
params_file=pd.read_excel(input_file, sheet_name="PARAMS")
|
|
|
|
|
|
|
|
|
|
|
|
for i in range(0, len(params_file)): #0, len(params_file)
|
|
|
|
for i, row in params_file.iterrows():
|
|
|
|
print("Starting to process %s" % params_file['Beach'][i])
|
|
|
|
print("Starting to process %s" % row['Beach'])
|
|
|
|
beach=params_file['Beach'][i]
|
|
|
|
beach=row['Beach']
|
|
|
|
survey_date=params_file['SURVEY DATE'][i]
|
|
|
|
survey_date = row['SURVEY DATE']
|
|
|
|
original_las=params_file['INPUT LAS'][i]
|
|
|
|
original_las = row['INPUT LAS']
|
|
|
|
classified_las_dir=params_file['LAS CLASSIFIED FOLDER'][i]
|
|
|
|
classified_las_dir = row['LAS CLASSIFIED FOLDER']
|
|
|
|
shp_swash_dir=params_file['SHP SWASH FOLDER'][i]
|
|
|
|
shp_swash_dir = row['SHP SWASH FOLDER']
|
|
|
|
crop_heatmap_poly=params_file['HEATMAP CROP POLY'][i]
|
|
|
|
crop_heatmap_poly = row['HEATMAP CROP POLY']
|
|
|
|
output_las_dir=params_file['LAS OUTPUT FOLDER'][i]
|
|
|
|
output_las_dir = row['LAS OUTPUT FOLDER']
|
|
|
|
zone_MGA=params_file['ZONE MGA'][i]
|
|
|
|
zone_MGA = row['ZONE MGA']
|
|
|
|
output_poly_dir=params_file['SHP RASTER FOLDER'][i]
|
|
|
|
output_poly_dir = row['SHP RASTER FOLDER']
|
|
|
|
output_tif_dir=params_file['TIF OUTPUT FOLDER'][i]
|
|
|
|
output_tif_dir = row['TIF OUTPUT FOLDER']
|
|
|
|
cp_csv=params_file['INPUT CSV'][i]
|
|
|
|
cp_csv = row['INPUT CSV']
|
|
|
|
profile_limit_file=params_file['PROFILE LIMIT FILE'][i]
|
|
|
|
profile_limit_file = row['PROFILE LIMIT FILE']
|
|
|
|
csv_output_dir=params_file['CSV OUTPUT FOLDER'][i]
|
|
|
|
csv_output_dir = row['CSV OUTPUT FOLDER']
|
|
|
|
graph_loc = params_file['PNG OUTPUT FOLDER'][i]
|
|
|
|
graph_loc = row['PNG OUTPUT FOLDER']
|
|
|
|
volume_output=params_file['CSV VOLUMES FOLDER'][i]
|
|
|
|
volume_output = row['CSV VOLUMES FOLDER']
|
|
|
|
tmp_dir=params_file['TMP FOLDER'][i]
|
|
|
|
tmp_dir = row['TMP FOLDER']
|
|
|
|
|
|
|
|
|
|
|
|
# Get base name of input las
|
|
|
|
# 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]
|
|
|
@ -282,11 +282,20 @@ for csv_name in csv_names:
|
|
|
|
# Remove metadata, and extract profile coordinates
|
|
|
|
# Remove metadata, and extract profile coordinates
|
|
|
|
profiles = profiles.loc[:, 'Chainage':].set_index('Chainage')
|
|
|
|
profiles = profiles.loc[:, 'Chainage':].set_index('Chainage')
|
|
|
|
|
|
|
|
|
|
|
|
# Remove landward section of profiles (behind beach)
|
|
|
|
# Find landward limit of profile (behind beach)
|
|
|
|
ch_min = ch_limits.loc[profile_name, 'Landward Limit']
|
|
|
|
ch_min = ch_limits.loc[profile_name, 'Landward Limit']
|
|
|
|
# profiles = profiles.loc[ch_min:]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
profiles.plot(title=profile_name)
|
|
|
|
ax = plt.axes()
|
|
|
|
|
|
|
|
for col in profiles.columns:
|
|
|
|
|
|
|
|
profile = profiles.loc[ch_min:, col]
|
|
|
|
|
|
|
|
date_str = col.split('_')[-1]
|
|
|
|
|
|
|
|
date = '{}-{}-{}'.format(date_str[:4], date_str[4:6], date_str[6:])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ax.plot(profile.index, profile, label=date)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ax.set_xlabel('Chainage (m)', labelpad=10)
|
|
|
|
|
|
|
|
ax.set_ylabel('Elevation (m AHD)', labelpad=10)
|
|
|
|
|
|
|
|
ax.legend(frameon=False)
|
|
|
|
plt.show()
|
|
|
|
plt.show()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|