hydromt_sfincs.SfincsModel.setup_grid_from_region#

SfincsModel.setup_grid_from_region(region: dict, res: float = 100, crs: str | int = 'utm', rotated: bool = False, hydrography_fn: str | None = None, basin_index_fn: str | None = None, dec_origin: int = 0, dec_rotation: int = 3)[source]#

Setup a regular or quadtree grid from a region.

Parameters:
  • region (dict) –

    Dictionary describing region of interest, e.g.:

    • {‘bbox’: [xmin, ymin, xmax, ymax]}

    • {‘geom’: ‘path/to/polygon_geometry’}

    For a complete overview of all region options, see :py:function:~hydromt.workflows.basin_mask.parse_region

  • res (float, optional) – grid resolution, by default 100 m

  • crs (Union[str, int], optional) – coordinate reference system of the grid if “utm” (default) the best UTM zone is selected else a pyproj crs string or epsg code (int) can be provided

  • grid_type (str, optional) – grid type, “regular” (default) or “quadtree”

  • rotated (bool, optional) – if True, a minimum rotated rectangular grid is fitted around the region, by default False

  • hydrography_fn (str) – Name of data source for hydrography data.

  • basin_index_fn (str) – Name of data source with basin (bounding box) geometries associated with the ‘basins’ layer of hydrography_fn. Only required if the region is based on a (sub)(inter)basins without a ‘bounds’ argument.

  • dec_origin (int, optional) – number of decimals to round the origin coordinates, by default 0

  • dec_rotation (int, optional) – number of decimals to round the rotation angle, by default 3