hydromt.model.components.SpatialModelComponent.write_region#

SpatialModelComponent.write_region(*, filename: str | Path | None = None, to_wgs84=False, **write_kwargs) None[source]#

Write the model region to file.

This function should be called from within the write function of the component inheriting from this class.

Parameters:
  • filename (str, optional) – The filename to write the region to. If None, the filename provided at initialization is used.

  • to_wgs84 (bool, optional) – If True, the region is reprojected to WGS84 before writing.

  • **write_kwargs – Additional keyword arguments passed to the geopandas.GeoDataFrame.to_file function.