Fix bug when calculating R_high lat/lon geojson

develop
Chris Leaman 6 years ago
parent faa843ce21
commit e6bb50c00e

@ -76,7 +76,8 @@ def R_high_to_geojson(sites_csv, profiles_csv, crest_toes_csv, impacts_csv, outp
# Take the intersection closest to the dune face. # Take the intersection closest to the dune face.
try: try:
dune_face_x = np.mean(df_crest_toes.loc[(site_id, "prestorm"), :].x) x_cols = [x for x in df_crest_toes.columns if '_x' in x]
dune_face_x = np.mean(df_crest_toes.loc[(site_id, "prestorm"),x_cols].tolist())
int_x = min(int_x, key=lambda x: abs(x - dune_face_x)) int_x = min(int_x, key=lambda x: abs(x - dune_face_x))
except: except:
continue continue

Loading…
Cancel
Save