r.topidx(1grass)
β¨ r.topidx β¨
okay bestie, welcome to the r.topidx manual page from the GRASS User's Manual π β this is the tool that builds you a topographic index (aka the wetness index, iykyk) as a raster map, straight off an elevation raster. we're gonna read it together and it's gonna be so good π«Ά
πΈ KEYWORDS πΈ
raster, hydrology, wetness, topographic index
like, the whole vibe in five words, periodt.
β¨ SYNOPSIS β¨
r.topidx
r.topidx --help
r.topidx input=name output=name [--overwrite] [--help] [--verbose]
[--quiet] [--ui]
π FLAGS π
--overwriteβ let those output files just bulldoze any existing files with the same name. consent matters, so this is opt-in π--helpβ prints the usage summary. the little "what do I even type" button π₯Ί--verboseβ verbose module output, i.e. it tells you everything it's doing, main character narration mode π--quietβ quiet module output. no yapping, just results π€«--uiβ force launches the GUI dialog. for when you want the pretty buttons π
π¦ PARAMETERS π¦
input=name[required] β the name of your input elevation raster map. mandatory bestie, no input no output β¨output=name[required] β the name for the output topographic index raster map. name it something cute π
π§ DESCRIPTION π§
so r.topidx creates the topographic index (wetness index) map, and the formula is:
ln(a/tan(beta))
built from an elevation map, where:
a= the area of the hillslope per unit contour length that drains through any point πtan(beta)= the local surface topographic slope, which is (delta vertical) / (delta horizontal) π
ngl that's the whole mathematical vibe right there.
Input maps are allowed to have NULL values, no drama. say you've got a raster mask set for a watershed (like, using a basin map from r.water.outlet), then this command right here will create a masked elevation map called belev:
r.mapcalc "belev = if(isnull(basin), basin, elev)"
and r.stats -Anc prints out averaged statistics for the topographic index. cute for checking your work π
β οΈ okay important bestie, listen up: lat/long projects are NOT supported. not even a little. if your data is not projected, please create a new project with a projected coordinate reference system and reproject the data there, then run r.topidx from that project. no shortcuts, fr fr π
π EXAMPLE π
run the command below and you get the topographic index map shown in the figure:
g.region raster=elevation -p
r.topidx input=elevation output=topidx_elevation
Figure: topographic index map derived from elevation map β she's iconic, honestly πΌοΈβ¨
π REFERENCES π
- Cho, H., 2000. GIS Hydrological Modeling System by Using Programming Interface of GRASS. Master's Thesis, Department of Civil Engineering, Kyungpook National University, Korea.
- Moore, I.D., R.B. Grayson, and A.R. Ladson, 1991. Digital Terrain Modeling: A Review of Hydrological, Geomorphological, and Biological Applications. Hydrological Processes 5:3-30.
(the academic receipts π§Ύπ)
π SEE ALSO π
r.topmodel, r.water.outlet, r.mapcalc
Known issues
π AUTHORS π
Huidae Cho Hydro Laboratory, Kyungpook National University, South Korea
Based on GRIDATB.FOR by Keith Beven.
shoutout to the legends π«Ά
π₯ SOURCE CODE π₯
Available at: r.topidx source code (history)
Latest change: Thursday Nov 06 22:27:54 2025 in commit: 298b38614712934179355ea767403d6bfea8f5f9
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
okay that's the whole page, you ate it up π this was the r.topidx page, fresh out of GRASS 8.5.0, Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual π go make some wetness maps, bestie β ily, bye ππ
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms