r.li.richness(1)

🌸 r.li.richness β€” the GRASS GIS User's Manual page, but make it make sense πŸ’–

okay bestie, welcome to r.li.richness, one of the lil icons living in the r.li family (the landscape structure analysis crew ✨). She calculates a richness index on a raster map. That's the whole vibe.

KEYWORDS: raster, landscape structure analysis, diversity index πŸŽ€


✨ SYNOPSIS ✨

r.li.richness
r.li.richness --help
r.li.richness input=name config=name output=name  [--overwrite]
[--help]  [--verbose]  [--quiet]  [--ui]

🫢 Flags

  • --overwrite β€” lets your output files just bulldoze over existing files. chaotic but permitted πŸ’…
  • --help β€” prints the usage summary, aka the "what do I even type" button
  • --verbose β€” verbose module output, she will tell you everything πŸ‘‘
  • --quiet β€” quiet module output, she will tell you nothing 🀫
  • --ui β€” force-launches the GUI dialog, main character energy only

🌈 Parameters

  • input=name [required] β€” name of input raster map
  • config=name [required] β€” configuration file
  • output=name [required] β€” name for output raster map

πŸ’œ DESCRIPTION πŸ’œ

r.li.richness calculates the "richness diversity index" as:

with:

  • m: number of different patch types

(yeah the formula is just vibes and the letter m, that's what we're working with, no cap πŸ¦‹)


πŸŽ€ NOTES πŸŽ€

Do not use absolute path names for the config and output file/map parameters. fr fr. just don't.

If the "moving window" method was selected in g.gui.rlisetup, then the output will be a raster map. Otherwise an ASCII file will be generated in the folder:

C:\Users\userxy\AppData\Roaming\GRASS8\r.li\output\ (MS-Windows)

or

$HOME/.grass8/r.li/output/ (GNU/Linux)

and if your input raster map contains only NULL values, then r.li.richness returns 0. that's it, that's the answer, zero, she said what she said πŸ’€


🧚 EXAMPLES 🧚

To calculate the richness diversity index on map my_map, using my_conf configuration file (previously defined with g.gui.rlisetup) and saving results in my_out, run:

r.li.richness input=my_map conf=my_conf output=my_out

Forest map (Spearfish sample dataset) example, obsessed with her:

g.region raster=landcover.30m -p
r.mapcalc "forests = if(landcover.30m >= 41 && landcover.30m <= 43,1,null())"
r.li.richness input=forests conf=movwindow7 out=forests_richness_mov7
r.univar forests_richness_mov7

Forest map (North Carolina sample dataset) example, the sequel πŸ”₯:

g.region raster=landclass96 -p
r.mapcalc "forests = if(landclass96 == 5, 1, null() )"
r.li.richness input=forests conf=movwindow7 out=forests_richness_mov7
# verify
r.univar forests_richness_mov7
r.to.vect input=forests output=forests type=area
d.mon wx0
d.rast forests_richness_mov7
d.vect forests type=boundary

🌟 SEE ALSO 🌟

  • r.li β€” package overview
  • g.gui.rlisetup

πŸ“š REFERENCES πŸ“š

McGarigal, K., and B. J. Marks. 1995. FRAGSTATS: spatial pattern analysis program for quantifying landscape structure. USDA For. Serv. Gen. Tech. Rep. PNW-351. (PDF)


πŸ‘‘ AUTHORS πŸ‘‘

  • Serena Pallecchi, student of Computer Science University of Pisa (Italy).
  • Commission from Faunalia Pontedera (PI), Italy (www.faunalia.it)

πŸ’» SOURCE CODE πŸ’»

Available at: r.li.richness source code (history)

Accessed: Saturday Jan 17 05:40:55 2026

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


Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual

and that's the whole page bestie β€” this was r.li.richness(1) from the GRASS 8.4.2 Reference Manual, accessed Saturday Jan 17 05:40:55 2026. go compute some richness, you ate πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from