Debian Codegraph @

raster/r.li/r.li.renyi/r.li.renyi.md

raw
1 ## DESCRIPTION
2
3 *r.li.renyi* calculates the "Renyi's diversity index" as:
4 ![r.li.renyi formula](r_li_renyi.png)
5 with:
6
7 - *H*: Renyi entropy
8 - *alpha*: order of the generalized entropy
9 - *i*: patch type
10 - *S*: number of different patch types
11 - *p_i*: proportional abundance of patch type *i*
12
13 ## NOTES
14
15 Do not use absolute path names for the **config** and **output**
16 file/map parameters. If the "moving window" method was selected in
17 **g.gui.rlisetup**, then the output will be a raster map, otherwise an
18 ASCII file will be generated in the folder
19 `C:\Users\userxy\AppData\Roaming\GRASS8\r.li\output\` (MS-Windows) or
20 `$HOME/.grass8/r.li/output/` (GNU/Linux).
21
22 If the input raster map contains only NULL values then *r.li.renyi*
23 returns NULL.
24
25 ## EXAMPLES
26
27 To calculate Renyi's diversity index on map *my_map*, using *my_conf*
28 configuration file (previously defined with *g.gui.rlisetup*) and saving
29 results in *my_out*, run:
30
31 ```sh
32 r.li.renyi input=my_map conf=my_conf output=my_out alpha=0.6
33 ```
34
35 Forest map (Spearfish sample dataset) example:
36
37 ```sh
38 g.region raster=landcover.30m -p
39 r.mapcalc "forests = if(landcover.30m >= 41 && landcover.30m <= 43,1,null())"
40 r.li.renyi input=forests conf=movwindow7 out=forests_renyi_mov7_a06 alpha=0.6
41 r.univar forests_renyi_mov7_a06
42 ```
43
44 Forest map (North Carolina sample dataset) example:
45
46 ```sh
47 g.region raster=landclass96 -p
48 r.mapcalc "forests = if(landclass96 == 5, 1, null() )"
49 r.li.renyi input=forests conf=movwindow7 out=forests_renyi_mov7
50
51 # verify
52 r.univar forests_renyi_mov7
53 r.to.vect input=forests output=forests type=area
54 d.mon wx0
55 d.rast forests_renyi_mov7
56 d.vect forests type=boundary
57 ```
58
59 ## SEE ALSO
60
61 *[r.li](r.li.md) (package overview),
62 [g.gui.rlisetup](g.gui.rlisetup.md)*
63
64 ## REFERENCES
65
66 McGarigal, K., and B. J. Marks. 1995. FRAGSTATS: spatial pattern
67 analysis program for quantifying landscape structure. USDA For. Serv.
68 Gen. Tech. Rep. PNW-351. ([PDF](https://doi.org/10.2737/PNW-GTR-351))
69
70 ## AUTHORS
71
72 Luca Delucchi and Duccio Rocchini, Fondazione E. Mach (Italy), based on
73 the *r.li.shannon* code developed by Serena Pallecchi, student of
74 Computer Science University of Pisa (Italy).