pyflwdir.FlwdirRaster.geofeatures#
- FlwdirRaster.geofeatures(flowpaths, xs=None, ys=None, **kwargs)[source]#
Returns a geo-features of flowpaths defined by a list of arrays of linear indices.
The coordinates are based on the cell center as calculated using the affine transform, unless maps with (subgrid) x and y coordinates are provided.
- Parameters:
flowpaths (list or 1D array of int) – list of flow paths described by linear indices
xs (2D array of float) – Raster with cell x, y coordinates, by default None and inferred from cell center.
ys (2D array of float) – Raster with cell x, y coordinates, by default None and inferred from cell center.
kwargs (extra sample maps key-word arguments) – optional maps to sample from e.g.: strord=flw.stream_order()
- Returns:
feats – Geofeatures, to be parsed by e.g. geopandas.GeoDataFrame.from_features
- Return type: