r.li.renyi(1)
π r.li.renyi π
okay bestie, so this is a page from the GRASS GIS User's Manual β section r.li.renyi(1), one of the raster modules β and it's literally about calculating Renyi's diversity index on a raster map. landscape structure analysis girlies rise up π¦
β¨ NAME β¨
r.li.renyi β calculates Renyi's diversity index on a raster map. that's the whole job. she does one thing and she does it π
π KEYWORDS π
raster, landscape structure analysis, diversity index
πΈ SYNOPSIS πΈ
r.li.renyi
r.li.renyi --help
r.li.renyi input=name config=name alpha=string output=name
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
β Flags β
--overwriteβ lets your output files just overwrite existing files. chaotic but sometimes necessary, no cap π--helpβ prints the usage summary. your girl when you're lost fr--verboseβ verbose module output. she will talk more π¬--quietβ quiet module output. she will talk less π€«--uiβ force launching the GUI dialog. for when you want the pretty buttons β¨
π Parameters π
input=name[required] β name of input raster map. the map you're analyzing, your main character πΊοΈconfig=name[required] β configuration file. the settings file, she's importantalpha=string[required] β "Alpha value is the order of the generalized entropy". so alpha is the order, and order is alpha. keep up π«Άoutput=name[required] β name for output raster map. where the results land π
π DESCRIPTION π
r.li.renyi calculates the "Renyi's diversity index" as:
with:
- H: Renyi entropy
- alpha: order of the generalized entropy
- i: patch type
- S: number of different patch types
- pi: proportional abundance of patch type i
like yes the formula is implied and the variables are all spelled out for you, iconic behavior honestly π
π NOTES π
do NOT use absolute path names for theconfigandoutputfile/map parameters. just don't, bestie. the module will not be happy π
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). so like, know where your stuff is going, mkay π§
if the input raster map contains only NULL values then r.li.renyi returns NULL. that's it, that's the whole mood π
π₯ EXAMPLES π₯
to calculate Renyi's 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.renyi input=my_map conf=my_conf output=my_out alpha=0.6
forest map (Spearfish sample dataset) example:
g.region raster=landcover.30m -p
r.mapcalc "forests = if(landcover.30m >= 41 && landcover.30m <= 43,1,null())"
r.li.renyi input=forests conf=movwindow7 out=forests_renyi_mov7_a06 alpha=0.6
r.univar forests_renyi_mov7_a06
forest map (North Carolina sample dataset) example:
g.region raster=landclass96 -p
r.mapcalc "forests = if(landclass96 == 5, 1, null() )"
r.li.renyi input=forests conf=movwindow7 out=forests_renyi_mov7
# verify
r.univar forests_renyi_mov7
r.to.vect input=forests output=forests type=area
d.mon wx0
d.rast forests_renyi_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 π
Luca Delucchi and Duccio Rocchini, Fondazione E. Mach (Italy), based on the r.li.shannon code developed by Serena Pallecchi, student of Computer Science University of Pisa (Italy). absolute legends, we stan π
π» SOURCE CODE π»
available at: r.li.renyi source code (history)
accessed: Saturday Jan 17 05:40:55 2026
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
and that's a wrap, bestie π this was r.li.renyi(1) from GRASS GIS 8.4.2, Β© 2003-2025 GRASS Development Team, straight outta the GRASS GIS 8.4.2 Reference Manual β go forth and compute that entropy, periodt β¨π¦π
π¦ 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