i.topo.corr(1grass)

okay bestie, pull up a chair, we're doing i.topo.corr(1grass) from the GRASS User's Manual today and honestly? it's a banger πŸ’–


🌸 NAME 🌸

i.topo.corr β€” computes topographic correction of reflectance. that's it, that's the whole vibe ✨


🏷️ KEYWORDS 🏷️

imagery, terrain, topographic correction


πŸŽ€ SYNOPSIS πŸŽ€

i.topo.corr
i.topo.corr --help
i.topo.corr [-is]  [input=name[,name,...]]  output=name basemap=name
zenith=float  [azimuth=float]   [method=string]   [--overwrite]
[--help]  [--verbose]  [--quiet]  [--ui]

🫢 Flags 🫢

  • -i β€” outputs the sun illumination terrain model, like a little glow-up map of where the sun actually hits πŸ‘‘
  • -s β€” scales the output to match the input and copies the color rules over too. matchy-matchy, we love to see it πŸ’…
  • --overwrite β€” lets your output files bulldoze whatever's already sitting there with the same name
  • --help β€” prints the usage summary, the classic "explain urself" button
  • --verbose β€” verbose module output, aka it tells you everything it's doing
  • --quiet β€” quiet module output, aka it says nothing and just works. main character silence 😌
  • --ui β€” forces the GUI dialog to launch, for when you want buttons instead of typing

🌈 Parameters 🌈

  • input=name[,name,...] β€” name of the reflectance raster maps you want topographically corrected
  • output=name [required] β€” name (if you're using flag -i) or the prefix for your output raster maps
  • basemap=name [required] β€” name of the input base raster map (elevation or illumination)
  • zenith=float [required] β€” solar zenith, in degrees
  • azimuth=float β€” solar azimuth, in degrees (only if you're using flag -i)
  • method=string β€” the topographic correction method
    • Options: cosine, minnaert, c-factor, percent
    • Default: c-factor

πŸ’œ DESCRIPTION πŸ’œ

so i.topo.corr exists to topographically correct reflectance from imagery files β€” like the ones you got from i.landsat.toar β€” using a sun illumination terrain model. and what is that illumination model, you ask? it represents the cosine of the incident angle i, i.e. the angle between the normal to the ground and the sun rays. geometry but make it slay πŸ“βœ¨

Note: if you need it, the sun position can be calculated for a given date and time with r.sunmask.

Figure showing terrain and solar angles

when you hand it the -i flag plus an elevation basemap (metric, ok?), i.topo.corr builds a simple illumination model using the formula:

  • cos_i = cos(s) * cos(z) + sin(s) * sin(z) * cos(a - o)

where,

  • i is the incident angle to be calculated,
  • s is the terrain slope angle (from r.slope.aspect),
  • z is the solar zenith angle (i.e., 90Β° - solar horizon angle from r.sunmask),
  • a the solar azimuth angle (from r.sunmask),
  • o the terrain aspect angle (from r.slope.aspect).

for each band file, the corrected reflectance (ref_c) is calculated from the original reflectance (ref_o) using one of the four offered methods (one lambertian and two non-lambertian). yes bestie, that's what it says, we're reporting it faithfully 🫑

✨ Method: cosine ✨

  • ref_c = ref_o * cos_z / cos_i

✨ Method: minnaert ✨

  • ref_c = ref_o * (cos_z / cos_i) ^k

where, k is obtained by linear regression of ln(ref_o) = ln(ref_c) - k ln(cos_i/cos_z)

✨ Method: c-factor ✨

  • ref_c = ref_o * (cos_z + c)/ (cos_i + c)

where, c is a/m from ref_o = a + m * cos_i

✨ Method: percent ✨

we can use cos_i to estimate the percent of solar incidence on the surface, then the transformation (cos_i + 1)/2 varied from 0 (surface in the side in opposition to the sun: infinite correction) to 1 (direct exhibition to the sun: no correction) and the corrected reflectance can be calculated as

  • ref_c = ref_o * 2 / (cos_i + 1)

πŸ“ NOTES πŸ“

  1. The illumination model (cos_i) with flag -i uses the actual region as limits and the resolution of the elevation map.
  2. The topographic correction uses the full reflectance file (null remain null) and its resolution.
  3. The elevation map used to calculate the illumination model should be metric.

πŸ¦‹ EXAMPLES πŸ¦‹

first, make an illumination model from the elevation map (here, SRTM). then perform the topographic correction of e.g. the bands toar.5, toar.4 and toar.3 with output as tcor.toar.5, tcor.toar.4, and tcor.toar.3 using c-factor (= c-correction) method β€” literally typing it out exactly as it appears, no cap:

# first pass: create illumination model
i.topo.corr -i base=SRTM zenith=33.3631 azimuth=59.8897 output=SRTM.illumination
# second pass: apply illumination model
i.topo.corr base=SRTM.illumination input=toar.5,toar.4,toar.3 output=tcor \
  zenith=33.3631 method=c-factor

πŸ“š REFERENCES πŸ“š

  • Law K.H. and Nichol J, 2004. Topographic Correction For Differential Illumination Effects On Ikonos Satellite Imagery. International Archives of Photogrammetry Remote Sensing and Spatial Information, pp. 641-646.
  • Meyer, P. and Itten, K.I. and Kellenberger, KJ and Sandmeier, S. and Sandmeier, R., 1993. Radiometric corrections of topographically induced effects on Landsat TM data in alpine terrain. Photogrammetric Engineering and Remote Sensing 48(17).
  • RiaΓ±o, D. and Chuvieco, E. and Salas, J. and Aguado, I., 2003. Assessment of Different Topographic Corrections in Landsat-TM Data for Mapping Vegetation Types. IEEE Transactions On Geoscience And Remote Sensing, Vol. 41, No. 5
  • Twele A. and Erasmi S, 2005. Evaluating topographic correction algorithms for improved land cover discrimination in mountainous areas of Central Sulawesi. GΓΆttinger Geographische Abhandlungen, vol. 113.

πŸ‘€ SEE ALSO πŸ‘€

i.landsat.toar, r.mapcalc, r.sun r.sunmask


πŸ’– AUTHOR πŸ’–

E. Jorge Tizado (ej.tizado unileon es) Dept. Biodiversity and Environmental Management, University of LeΓ³n, Spain

Figure derived from Neteler & Mitasova, 2008.


🧚 SOURCE CODE 🧚

Available at: i.topo.corr source code (history)

Latest change: Monday Aug 04 18:54:37 2025 in commit: b7a14bde28ebc06242f4910a5feebe094832581d

Main index | Imagery index | Topics index | Keywords index | Graphical index | Full index

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual


okay that's the whole thing, you ate it, no crumbs πŸ“ and that closing note at the bottom of the page is GRASS 8.5.0, with the latest change dated Monday Aug 04 18:54:37 2025 β€” go forth and correct some topography, bestie πŸ’…βœ¨

πŸ“¦ where this page comes from