r.topidx(1)
π§ r.topidx β the GRASS GIS manual, but make it cute
okay bestie, welcome to the GRASS GIS User's Manual page for r.topidx β¨ it's a 1 (section one, we're fancy like that) and it's about to give you a topographic index, no cap π¦
πΈ NAME πΈ
r.topidx β makes a topographic index (aka the wetness index) raster map, built from an elevation raster map. that's it, that's the whole thing π
π KEYWORDS π
raster, hydrology, wetness, topographic index β yes she has range π
β¨ SYNOPSIS β¨
r.topidx
r.topidx --help
r.topidx input=name output=name [--overwrite] [--help] [--verbose]
[--quiet] [--ui]
π«Ά Flags:
--overwriteβ let the output files just overwrite existing files. bold move, respect π«‘--helpβ prints the usage summary, for when you're lost (we've all been there π)--verboseβ verbose module output, she's chatty and we love that--quietβ quiet module output. shhh π€«--uiβ force launches the GUI dialog, for the visual learners π
π¦ Parameters:
input=nameβ [required] name of the input elevation raster map. mandatory. non-negotiable. periodt.output=nameβ [required] name for the output topographic index raster map. also mandatory bestie π
π DESCRIPTION π
okay so r.topidx creates a topographic index (the wetness index), specifically ln(a/tan(beta)), as a map, derived 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) π
Input maps are allowed to have NULL values, no drama. so like, if you've got a raster mask set for a watershed (using a basin map from r.water.outlet), this command right here will create a masked elevation map called belev:
r.mapcalc "belev = if(isnull(basin), basin, elev)"
also, r.stats -Anc prints out averaged statistics for topographic index. cute, useful, we stan β
π¨ lat/long projects are NOT supported. if your data isn't projected, please create a new project with a projected coordinate reference system and reproject the data into it, then run r.topidx from that project. no shortcuts, bestie π
π EXAMPLE π
running the command below will generate 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 πΊοΈβ¨ (it's giving beautiful, 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.
π SEE ALSO π
r.topmodel, r.water.outlet, r.mapcalc
also: Known issues β go look, iykyk π«Ά
π AUTHORS π
Huidae Cho Hydro Laboratory, Kyungpook National University, South Korea π°π·
Based on GRIDATB.FOR by Keith Beven. iconic lineage fr fr π
π§ SOURCE CODE π§
Available at: r.topidx source code (history)
Accessed: Saturday Jan 17 05:41:04 2026
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
okay that's the whole page, you're officially hydrated (hydrologically speaking π§). this was the GRASS GIS 8.4.2 Reference Manual, Β© 2003-2025 GRASS Development Team, running on GRASS 8.4.2 β and yeah, accessed Saturday Jan 17 05:41:04 2026, so consider yourself timestamped bestie πβ¨ slay, go make some topographic indices π π¦
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· 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