SurfaceWaterNetwork#

Constructors#

SurfaceWaterNetwork(segments[, END_SEGNUM, ...])

Surface water network class.

SurfaceWaterNetwork.from_lines(lines[, polygons])

Create and evaluate a new SurfaceWaterNetwork from lines for segments.

SurfaceWaterNetwork.from_pickle(path)

Read a pickled format from a file.

DataFrame properties#

SurfaceWaterNetwork.segments

GeoDataFrame of stream segments derived from the lines input.

SurfaceWaterNetwork.catchments

Polygon GeoSeries of surface water catchments.

SurfaceWaterNetwork.diversions

[Geo]DataFrame of surface water diversions.

Other properties#

SurfaceWaterNetwork.has_z

Return True if all segment lines have Z dimension.

SurfaceWaterNetwork.headwater

Return index of headwater segments.

SurfaceWaterNetwork.outlets

Return index of outlets.

SurfaceWaterNetwork.to_segnums

Return Series of segnum to connect downstream.

SurfaceWaterNetwork.from_segnums

Return partial Series of a set of segnums to connect upstream.

Methods#

SurfaceWaterNetwork.set_diversions(diversions, *)

Set surface water diversion locations.

SurfaceWaterNetwork.segments_series(value[, ...])

Generate a Series along the segments index.

SurfaceWaterNetwork.pair_segments_frame(value)

Generate a DataFrame of paired values for top/bottom of segments.

SurfaceWaterNetwork.accumulate_values(values)

Accumulate values down the stream network.

SurfaceWaterNetwork.route_segnums(start, end, *)

Return a list of segnums that connect a pair of segnums.

SurfaceWaterNetwork.gather_segnums(*[, ...])

Return segnums upstream (inclusive) and downstream (exclusive).

SurfaceWaterNetwork.locate_geoms(geom, *[, ...])

Return GeoDataFrame of data associated in finding geometies.

SurfaceWaterNetwork.aggregate(segnums[, ...])

Aggregate segments (and catchments) to a coarser network of segnums.

SurfaceWaterNetwork.coarsen(level)

Coarsen stream network to a minimum stream order level.

SurfaceWaterNetwork.remove([condition, segnums])

Remove segments (and catchments) in-place, preserving attributes.

SurfaceWaterNetwork.evaluate_upstream_length()

Evaluate upstream length of segments, adds to segments.

SurfaceWaterNetwork.evaluate_upstream_area()

Evaluate upstream area from catchments, adds to segments.

SurfaceWaterNetwork.estimate_width([a, b, ...])

Estimate stream width based on upstream area and fitting parameters.

SurfaceWaterNetwork.adjust_elevation_profile([...])

Check and adjust (if necessary) Z coordinates of elevation profiles.

Miscellaneous#

SurfaceWaterNetwork.plot([column, ...])

Plot map of surface water network.

SurfaceWaterNetwork.to_pickle(path[, protocol])

Pickle (serialize) object to file.