Fill sinks in a digital elevation model
Removes sinks in a digital elevation model by filling depressions
A matrix representing a digital elevation model [m] with equally sized pixels and equal x and y resolution
Resolution of the digital elevation model [m]
Minimum slope to be kept between cells when filling [degrees]
For deep sinks or large maps, it may be possible that not all sinks are filled in one run. Then the function should be applied repeatedly over the same object.
A matrix of the same size as the DEM.
Wouter Buytaert, Imperial College London, based on an implementation from the Hydrology Group of Lancaster University