GRASS logo


r.hydrodem - Hydrological conditioning, sink removal


raster, hydrology


r.hydrodem --help
r.hydrodem [-afc] input=name [depression=name] [memory=integer] output=name mod=integer size=integer [--overwrite] [--help] [--verbose] [--quiet] [--ui]


Remove all sinks.
By default only minor corrections are done to the DEM and the result will not be 100% hydrologically correct.Use this flag to override default.
Fill sinks.
By default a least impact approach is used to modify the DEM.Use this flag to force filling of sinks.
Carve out of sinks.
By default a least impact approach is used to modify the DEM.Use this flag to force carving out of sinks.
Allow output files to overwrite existing files
Print usage summary
Verbose module output
Quiet module output
Force launching GUI dialog


input=name [required]
Elevation map
Elevation map to be hydrologically corrected
Depression map
Map indicating real depressions that must not be modified
Maximum memory to be used in MB
Default: 300
output=name [required]
Name of hydrologically conditioned raster map
mod=integer [required]
Only remove sinks requiring not more than <mod> cell modifications.
Default: 4
size=integer [required]
Only remove sinks not larger than <size> cells.
Default: 4

Table of contents


r.hydrodem applies hydrological conditioning (sink removal) to a required input elevation map. If the conditioned elevation map is going to be used as input elevation for r.watershed, only small sinks should be removed and the amount of modifications restricted with the mod option. For other modules such as r.terraflow or third-party software, full sink removal is recommended.


Input map, required: Digital elevation model to be corrected. Gaps in the elevation map that are located within the area of interest should be filled beforehand, e.g. with r.fillnulls or r.resamp.bspline, to avoid distortions.

Output map, required: Hydrologically conditioned digital elevation model. By default, only minor modifications are done and not all sinks are removed.

All sinks of up to size cells will be removed. Default is 4, if in doubt, decrease and not increase.

All sinks will be removed that require not more than mod cells to be modifed. Often, rather large sinks can be removed by carving through only few cells. Default is 4, if in doubt, increase and not decrease.

Not recommended if input for r.watershed is generated.
With the -a flag set, all sinks will be removed using an impact reduction approach based on Lindsay & Creed (2005). The output will be a depression-less digital elevation model, suitable for e.g. r.terraflow or other hydrological analyses that require a depression-less DEM as input.


This module is designed for r.watershed with the purpose to slightly denoise a DEM prior to analysis. First, all one-cell peaks and pits are removed, then the actual hydrological corrections are applied. In most cases, the removal of one-cell extrema could already be sufficient to improve r.watershed results in difficult terrain, particularly nearly flat areas.

The impact reduction algorithm used by r.hydrodem is based on Lindsay & Creed (2005), with some additional checks for hydrological consistency. With complete sink removal, results of r.terraflow are very similar to results of r.watershed.

r.hydrodem uses the same method to determine drainage directions like r.watershed.


Lindsay, J. B., and Creed, I. F. 2005. Removal of artifact depressions from digital elevation models: towards a minimum impact approach. Hydrological Processes 19, 3113-3126. DOI: 10.1002/hyp.5835


r.watershed, r.terraflow, r.fill.dir, r.fillnulls, r.resamp.bspline


Markus Metz


Available at: r.hydrodem source code (history)

Latest change: Monday Jun 24 13:07:24 2024 in commit: 71dbc88614ccda943c73db28f3531855610f6146

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2024 GRASS Development Team, GRASS GIS 8.3.3dev Reference Manual