hydromt_sfincs.components.quadtree.SnapWaveQuadtreeMask.create_boundary#
- SnapWaveQuadtreeMask.create_boundary(model: str = 'snapwave', btype: str = 'waves', zmin: float = None, zmax: float = None, include_polygon: str | Path | GeoDataFrame = None, include_zmin: float = None, include_zmax: float = None, include_polygon_buffer: int = 0, exclude_polygon: str | Path | GeoDataFrame = None, exclude_zmin: float = None, exclude_zmax: float = None, all_touched: bool = True, reset_bounds: bool = True, copy_sfincsmask: bool = False, connectivity: int = 8)[source]#
Set boundary cells in the model mask.
The Snapwave model mask defines inactive (mask=0), active (mask=1), wave boundary (mask=2) and neumann boundary (mask=3) cells. Active cells set using the create_active method, while this method sets the different types of boundary cells, see btype argument.
Boundary cells at the edge of the active model domain, optionally bounded by areas inside the include geomtries, outside the exclude geomtries, larger or equal than a minimum elevation threshhold and smaller or equal than a maximum elevation threshhold. All conditions are combined using a logical AND operation.
Updates snapwave mask layer in quadtree grid:
snapwave_mask map: model mask [-]
- Parameters:
btype (
str, optional) – Boundary type {‘waves’, ‘neumann’}, by default ‘waves’.zmin (
float, optional) – Minimum and maximum elevation thresholds for all boundary cells.zmax (
float, optional) – Minimum and maximum elevation thresholds for all boundary cells.include_polygon (
str,Path,gpd.GeoDataFrame, optional) – Path or data source name for geometries with areas to include/exclude from the model boundary. These can be combined with include_zmin and include_zmax to further refine the selection of cells within the polygons.exclude_polygon (
str,Path,gpd.GeoDataFrame, optional) – Path or data source name for geometries with areas to include/exclude from the model boundary. These can be combined with include_zmin and include_zmax to further refine the selection of cells within the polygons.reset_bounds (
bool, optional) – If True, reset existing boundary cells of the selected boundary type (btype) before setting new boundary cells, by default False.all_touched (
bool, optional) – if True (default) include (or exclude) a cell in the mask if it touches any of the include (or exclude) geometries. If False, include a cell only if its center is within one of the shapes, or if it is selected by Bresenham’s line algorithm.connectivity – The connectivity used to detect the model edge, if 4 only horizontal and vertical connections are used, if 8 (default) also diagonal connections.
{4 – The connectivity used to detect the model edge, if 4 only horizontal and vertical connections are used, if 8 (default) also diagonal connections.
8} – The connectivity used to detect the model edge, if 4 only horizontal and vertical connections are used, if 8 (default) also diagonal connections.