From 2c05ce515b28849a08ba2dd8e85ef62bda70775a Mon Sep 17 00:00:00 2001 From: Leynse Date: Fri, 14 Feb 2025 11:44:18 +0100 Subject: [PATCH] - Correct types in called function write_geoms - Open question in def delete is whether type should be 'int' or 'List(int)' --- hydromt_sfincs/cross_sections.py | 2 +- hydromt_sfincs/observation_points.py | 2 +- hydromt_sfincs/thin_dams.py | 8 ++++---- hydromt_sfincs/weirs.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hydromt_sfincs/cross_sections.py b/hydromt_sfincs/cross_sections.py index 51667194..0c916b39 100644 --- a/hydromt_sfincs/cross_sections.py +++ b/hydromt_sfincs/cross_sections.py @@ -146,7 +146,7 @@ def add(self, self.set(gdf, merge=True) def delete(self, - index: int, + index: int, #FIXME - should this be List(int)? ): """Remove (multiple) line(s) from cross-sections. diff --git a/hydromt_sfincs/observation_points.py b/hydromt_sfincs/observation_points.py index b818b75d..a97f9a30 100644 --- a/hydromt_sfincs/observation_points.py +++ b/hydromt_sfincs/observation_points.py @@ -142,7 +142,7 @@ def add(self, self.set(gdf, merge=True) def delete(self, - index: int, + index: int, #FIXME - should this be List(int)? ): """Remove (multiple) point(s) from observation points. diff --git a/hydromt_sfincs/thin_dams.py b/hydromt_sfincs/thin_dams.py index 4bc406e8..b8272045 100644 --- a/hydromt_sfincs/thin_dams.py +++ b/hydromt_sfincs/thin_dams.py @@ -56,7 +56,7 @@ def write(self, filename=None): #TODO - TL: filename=None - still needed? # self.config.XXX # self._filename = XXX struct = utils.gdf2linestring(self.data) - utils.write_geoms(self._filename, struct, stype="crs", fmt=fmt) #=utils.py function + utils.write_geoms(self._filename, struct, stype="thd", fmt=fmt) #=utils.py function # TODO - write also as geojson - TL: at what level do we want to do that? # if self._write_gis: @@ -102,11 +102,11 @@ def create( **kwargs, ): """Create model thin dam lines. - (old name: setup_observation_lines) + (old name: setup_structures) Adds model layers: - * **crs** geom: thin dam lines + * **thd** geom: thin dam lines Arguments --------- @@ -145,7 +145,7 @@ def add(self, self.set(gdf, merge=True) def delete(self, - index: int, + index: int, #FIXME - should this be List(int)? ): """Remove (multiple) line(s) from thin dams. diff --git a/hydromt_sfincs/weirs.py b/hydromt_sfincs/weirs.py index d00fb7b7..9f373e0e 100644 --- a/hydromt_sfincs/weirs.py +++ b/hydromt_sfincs/weirs.py @@ -56,7 +56,7 @@ def write(self, filename=None): #TODO - TL: filename=None - still needed? # self.config.XXX # self._filename = XXX struct = utils.gdf2linestring(self.data) - utils.write_geoms(self._filename, struct, stype="crs", fmt=fmt) #=utils.py function + utils.write_geoms(self._filename, struct, stype="weir", fmt=fmt) #=utils.py function # TODO - write also as geojson - TL: at what level do we want to do that? # if self._write_gis: