pyflwdir.FlwdirRaster.add_pits#
- FlwdirRaster.add_pits(idxs=None, xy=None, streams=None)[source]#
Add pits the flow direction raster. If streams is given, the pits are snapped to the first downstream True cell.
- Parameters:
idxs (array_like, optional) – linear indices of pits, by default is None.
xy (tuple of array_like of float, optional) – x, y coordinates of pits, by default is None.
streams (2D array of bool, optional) – 2D raster with cells flagged ‘True’ at stream cells, only used in combination with idx or xy, by default None.