xrspatial.hydro.fill_d8.fill_d8#
- xrspatial.hydro.fill_d8.fill_d8(dem: DataArray, z_limit=None, name: str = 'fill') DataArray[source]#
Fill depressions in a DEM using Planchon-Darboux iterative flooding.
Raises each depression cell to the elevation of its pour point (the lowest point on the rim through which water can escape).
- Parameters:
dem (xarray.DataArray or xr.Dataset) – 2D elevation raster (NumPy, CuPy, Dask+NumPy, or Dask+CuPy).
z_limit (float, optional) – Maximum allowed fill depth per cell. Cells where
filled - dem > z_limitrevert to their original DEM value.name (str, default='fill') – Name of output DataArray.
- Returns:
Filled DEM with depressions removed.
- Return type:
xarray.DataArray or xr.Dataset
References
Planchon, O. and Darboux, F. (2001). A fast, simple and versatile algorithm to fill the depressions of digital elevation models. Catena, 46(2-3), 159-176.