hydromt_sfincs.components.grid.SfincsGrid.create_from_region#
- SfincsGrid.create_from_region(region: dict, res: float = 100, crs: str | int = 'utm', rotated: bool = False, hydrography_fn: str = None, basin_index_fn: str = None, align: bool = True, dec_origin: int = 0, dec_rotation: int = 3)[source]#
Create a regular grid for the SfincsModel based on a region.
- Parameters:
region (
dict) –Dictionary describing region of interest, e.g.:
{‘bbox’: [xmin, ymin, xmax, ymax]}
{‘geom’: ‘path/to/polygon_geometry’}
Note: For the ‘bbox’ option the coordinates need to be provided in WG84/EPSG:4326.
For a complete overview of all region options, see
hydromt.workflows.basin_mask.parse_region()res (
float, optional) – grid resolution, by default 100 mcrs (
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 providedgrid_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 Falsehydrography_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.align (
bool, optional) – If True (default), align target transform to resolution. Note that this has only been implemented for non-rotated grids.dec_origin (
int, optional) – number of decimals to round the origin coordinates, by default 0dec_rotation (
int, optional) – number of decimals to round the rotation angle, by default 3
See also
create_grid_from_region()