pyflwdir.FlwdirRaster.vectorize#

FlwdirRaster.vectorize(mask=None, xs=None, ys=None, **kwargs)[source]#

Returns each flow direction as a linestring geo-feature

Parameters:
  • kind ({streams, flwdir}) – Kind of LineString features: either streams of local flow directions.

  • mask (2D array of bool) – Mask of valid cells.

  • 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

Returns:

feats – Geofeatures, to be parsed by e.g. geopandas.GeoDataFrame.from_features

Return type:

list of dict