Debian Codegraph @

raster/r.li/r.li.shannon/r.li.shannon.html

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