hydromt.model.components.SpatialModelComponent.write_region#

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

Write the model region to file.

The region is an auxiliary file that is often not required by the model, but can be useful for getting data from the data catalog. Plugin implementors may choose to write this file on write for a specific component.

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

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

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