Skip to content

Commit

Permalink
Merge pull request #129 from Deltares/fix_observation_points
Browse files Browse the repository at this point in the history
revert changes to write_xyn .. names with spaces cause trouble withou…
  • Loading branch information
roeldegoede authored Oct 24, 2023
2 parents f32ece7 + 19f38d3 commit 6a15731
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions hydromt_sfincs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ def write_xyn(fn: str = "sfincs.obs", gdf: gpd.GeoDataFrame = None, crs: int = N
except:
name = "obs" + str(point["id"])
if crs.is_geographic:
string = f"{x:12.6f}{y:12.6f} {name}\n"
string = f'{x:12.6f}{y:12.6f} "{name}"\n'
else:
string = f"{x:12.1f}{y:12.1f} {name}\n"
string = f'{x:12.1f}{y:12.1f} "{name}"\n'
fid.write(string)


Expand Down
6 changes: 3 additions & 3 deletions tests/data/sfincs_test/sfincs.obs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
320037.8 5042898.4 obs1
327100.8 5046162.0 obs2
322030.6 5047006.9 obs3
320037.8 5042898.4 "obs1"
327100.8 5046162.0 "obs2"
322030.6 5047006.9 "obs3"

0 comments on commit 6a15731

Please sign in to comment.