hydromt_sfincs.workflows.river_source_points#

hydromt_sfincs.workflows.river_source_points(gdf_riv: ~geopandas.geodataframe.GeoDataFrame, gdf_mask: ~geopandas.geodataframe.GeoDataFrame, src_type: str = 'inflow', buffer: float = 200, river_upa: float = 10, river_len: float = 1000.0, da_uparea: ~xarray.core.dataarray.DataArray = None, reverse_river_geom: bool = False, logger: ~logging.Logger = <Logger hydromt_sfincs.workflows.flwdir (WARNING)>) Tuple[GeoDataFrame, GeoDataFrame][source]#

Returns the locations where a river flows in (inflow=True) or out (inflow=False) of the model gdf_mask.

Rivers are based on either a river network vector data (gdf_riv) or a flow direction raster data (da_flwdir).

Parameters:
  • gdf_riv (geopandas.GeoDataFrame) – River network vector data, by default None. Requires ‘uparea’ and ‘rivlen’ attributes to check for river length and upstream area thresholds.

  • gdf_mask (geopandas.GeoDataFrame) – Polygon of model gdf_mask of interest.

  • src_type (['inflow', 'outflow', 'headwater'], optional) – Type of river source points to return, by default ‘inflow’. If ‘inflow’, return points where the river flows into the model domain. If ‘outflow’, return points where the river flows out of the model domain. If ‘headwater’, return all headwater (including inflow) points within the model domain.

  • buffer (float, optional) – Buffer around gdf_mask to select river source points, by default 200 m. Inflow points are moved to a downstream confluence if within the buffer.

  • river_upa (float, optional) – Minimum upstream area threshold for rivers [km2], by default 10.0

  • river_len (float, optional) – Mimimum river length [m] within the model domain to define river cells, by default 1000 m.

  • da_uparea (xarray.DataArray, optional) – River upstream area raster data, by default None.

  • reverse_river_geom (bool, optional) – If True, assume that segments in ‘rivers’ are drawn from downstream to upstream. Only used if ‘rivers’ is not None, By default False

Returns:

gdf_pnt – Source points

Return type:

geopandas.GeoDataFrame