hydromt.model.components.GeomsComponent.write#

GeomsComponent.write(filename: str | None = None, to_wgs84: bool = False, **kwargs) None[source]#

Write model geometries to a vector file (by default GeoJSON) at <root>/<filename>.

key-word arguments are passed to geopandas.GeoDataFrame.to_file()

Parameters:
  • filename (str, optional) – filename relative to model root. should contain a {name} placeholder which will be used to determine the names/keys of the geometries. if None, the path that was provided at init will be used.

  • to_wgs84 (bool, optional) – If True, the geoms will be reprojected to WGS84(EPSG:4326) before they are written.

  • **kwargs – Additional keyword arguments that are passed to the geopandas.to_file function.