stormcatchments.Delineate

A stormcatchments.Delineate object is initialized with a stormcatchments.Network and is used to perform network-aware catchment delineation, powered by pysheds.

class stormcatchments.delineate.Delineate(network: Network, grid: pysheds.sgrid.sGrid, fdir: pysheds.sview.Raster, acc: pysheds.sview.Raster, grid_epsg: int)[source]

Methods

delineate_points(pts, delineated)

Delineate catchments for a subset of infrastructure points

get_catchment(pour_pt[, acc_thresh])

Delineate catchment using pysheds

get_stormcatchment(pour_pt[, acc_thresh])

Iteratively delineate a stormcatchment.

__init__(network: Network, grid: pysheds.sgrid.sGrid, fdir: pysheds.sview.Raster, acc: pysheds.sview.Raster, grid_epsg: int)[source]
networkstormcatchments.network.Network

Network object that will be used to drive the networking / infrastructure connectivity aspects of catchment delineation

gridpysheds.sgrid.sGrid

DEM

fdirpysheds.sview.Raster

A pysheds flow direction raster

accpysheds.sview.Raster

A pysehds flow accumulation raster

grid_epsgint

EPSG code for the CRS of the DEM

delineate_points(pts: geopandas.GeoDataFrame, delineated: set) -> (geopandas.GeoDataFrame, <class 'set'>)[source]

Delineate catchments for a subset of infrastructure points

Parameters
ptsgpd.GeoDataFrame

Points to delineate catchments for

delineatedset

A set of the OBJECTID (indicies) of point that have already been delineated. These points may or may not lie spatially within the catchment because snapping to the flow accumulation raster may shift their location

Returns
catchmentsgpd.GeoDataFrame

The newly delineated catchment for all the provided points, or an empty GeoDataFrame if the provided points have already been delineated

delineatedset

(Same as param delineated, see above)

get_catchment(pour_pt: tuple, acc_thresh: int = 1000) geopandas.GeoDataFrame[source]

Delineate catchment using pysheds

Parameters
pour_pttuple

An (x, y) coordinate pair, with the same coordinate system as the grid

acc_threshint (default 1000)

The minimum accumulation threshold used during pour point snapping

Returns
catchmentgpd.GeoDataFrame

A GeoDataFrame containing the newly delineated catchment polygon

get_stormcatchment(pour_pt: tuple, acc_thresh: int = 1000) geopandas.GeoDataFrame[source]

Iteratively delineate a stormcatchment. pysheds does the delineation work and the network module provides the stormwater infrastructure networking

Parameters
pour_pttuple

An (x, y) coordinate pair, with the same coordinate system as the grid

acc_threshint (default 1000)

The minimum accumulation threshold used during pour point snapping

Returns
catchment: gpd.GeoDataFrame

A GeoDataFrame containing the newly delineated catchment polygon