hydromt_sfincs.components.quadtree.SfincsQuadtreeGrid.create_from_region#
- SfincsQuadtreeGrid.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, refinement_polygons: GeoDataFrame | None = None, elevation_list: List[List[dict]] = None)[source]#
Setup a 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’}
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 providedrotated (
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 3refinement_polygons (
gpd.GeoDataFrame, optional) – GeoDataFrame with polygons that define areas where the grid should be refined.elevation_list (
List[List[dict]], optional) – List of lists of dictionaries with variable names and dataset names to use for depth
See also
hydromt.workflows.basin_mask.parse_region