geo-registry

Fill Sinks

Raises cells in closed depressions of an elevation raster so every cell can drain to the edge.

Pitfall. Filling also flattens real depressions (quarries, sinkholes); breaching is the alternative that cuts through barriers.
Pitfall. Some engines add a tiny gradient across filled flats so water still flows; others leave them flat.
About this operation
Also called Fill, fill depressions, pit filling, hydrologically conditioned DEM
Group raster/hydrology
Checks raster.nodata
Pitfalls 2 listed above
Columbus tool Not stated
Notes Not stated
Status active
Broader Not stated
Narrower Not stated
Related

Parameters

Not stated

Inputs and outputs

Direction Name Type Geometry Note
Input raster raster Not stated Not stated
Output output raster Not stated Not stated

In each engine

Engine Tool Parameters Differences
grass r.fill.dir
  • raster → input
  • output → output
  • Also writes a flow direction map (direction is required); one pass may leave some depressions, so it is often run more than once.
Preset: {"direction":"fill_direction"}
qgis native:fillsinkswangliu
  • raster → INPUT
  • output → OUTPUT_FILLED_DEM
  • MIN_SLOPE (default 0.1 degrees) keeps a small gradient across filled areas; also writes flow directions and watershed basins.
whiteboxtools FillDepressions
  • raster → dem
  • output → output
  • fix_flats (default true) adds a small gradient across flats; max_depth limits how deep a depression is filled.
  • WhiteboxTools 2.4.0: in the equivalence tests this tool panicked ('Error unwrapping output') in about a third of runs on a 20 by 20 raster, at random; FillDepressionsWangAndLiu and FillDepressionsPlanchonAndDarboux did not.
whiteboxtools FillDepressionsPlanchonAndDarboux
  • raster → dem
  • output → output
  • Planchon and Darboux's method (slower than Wang and Liu); fix_flats adds a small gradient across flats.
whiteboxtools FillDepressionsWangAndLiu
  • raster → dem
  • output → output
  • Wang and Liu's priority-flood method; fix_flats adds a small gradient across flats.
xarray-spatial xrspatial.hydro.fill_d8
  • raster → dem
  • z_limit limits how much a cell may be raised.