|
|
|
@ -79,15 +79,18 @@ def update_survey_output(df, output_dir):
|
|
|
|
|
profiles = df['Profile'].unique()
|
|
|
|
|
for profile in profiles:
|
|
|
|
|
csv_name = os.path.join(output_csv_dir, profile + '.csv')
|
|
|
|
|
|
|
|
|
|
# Extract survey data for current profile
|
|
|
|
|
current_profile = df[df['Profile'] == profile]
|
|
|
|
|
try:
|
|
|
|
|
# Load existing results
|
|
|
|
|
master = pd.read_csv(csv_name)
|
|
|
|
|
except FileNotFoundError:
|
|
|
|
|
master = df.copy()
|
|
|
|
|
master = current_profile.copy()
|
|
|
|
|
|
|
|
|
|
# Add (or update) current survey
|
|
|
|
|
current_survey_col = df.columns[-1]
|
|
|
|
|
master[current_survey_col] = df[current_survey_col]
|
|
|
|
|
master[current_survey_col] = current_profile[current_survey_col]
|
|
|
|
|
|
|
|
|
|
# Export updated results
|
|
|
|
|
master.to_csv(csv_name)
|
|
|
|
@ -95,3 +98,10 @@ def update_survey_output(df, output_dir):
|
|
|
|
|
|
|
|
|
|
df = extract_pts(las_in, cp_in, survey_date, keep_only_ground=True)
|
|
|
|
|
update_survey_output(df, output_csv_dir)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
master.shape
|
|
|
|
|
|
|
|
|
|
current_profile.shape
|
|
|
|
|
|
|
|
|
|
df.shape
|
|
|
|
|