Debian Codegraph @

raster/r.li/r.li.patchdensity/r.li.patchdensity.html

raw
1 <h2>DESCRIPTION</h2>
2
3 <em>r.li.patchdensity</em> calculates the "patch density index",
4 the number of patches per square kilometer, as:
5 <div class="code"><pre>
6 PD = Npatch / A
7 </pre></div>
8
9 with:
10 <ul>
11 <li><b>A</b>:sampling area size</li>
12 <li><b>Npatch</b>: number of patches</li>
13 </ul>
14
15 <p>
16 This index is calculated using a 4 neighbour algorithm, diagonal cells
17 are ignored when tracing a patch.
18
19 <h2>NOTES</h2>
20
21 Do not use absolute path names for the <b>config</b> and <b>output</b>
22 file/map parameters.
23
24 If the "moving window" method was selected in <b>g.gui.rlisetup</b>, then the
25 output will be a raster map, otherwise an ASCII file will be generated in
26 the folder <code>C:\Users\userxy\AppData\Roaming\GRASS8\r.li\output\</code>
27 (MS-Windows) or <code>$HOME/.grass8/r.li/output/</code> (GNU/Linux).
28 <p>
29 A sample area of only NULL values is considered to have zero patches,
30 that is, the result is always &ge; 0.
31
32 <h2>EXAMPLES</h2>
33
34 To calculate patch density index on map <em>my_map</em>, using
35 <em>my_conf</em> configuration file (previously defined with
36 <em>g.gui.rlisetup</em>) and saving results in <em>my_out</em>, run:
37 <div class="code"><pre>
38 r.li.patchdensity input=my_map conf=my_conf output=my_out
39 </pre></div>
40
41 <p>
42 Example for Spearfish forest areas:
43 <div class="code"><pre>
44 g.region raster=landcover.30m -p
45 # extract forested areas:
46 r.category landcover.30m
47 r.mapcalc "forests = if(landcover.30m &gt;= 41 &amp;&amp; landcover.30m &lt;= 43, 1, null())"
48
49 # patch density (7x7 moving window defined in g.gui.rlisetup):
50 r.li.patchdensity forests conf=movwindow7 out=forests_p_dens7
51 r.univar forests_p_dens7
52 d.rast.leg forests_p_dens7
53
54 r.to.vect forests out=forests feature=area
55 d.vect forests type=boundary
56 </pre></div>
57 <p>
58
59 Forest map (North Carolina sample dataset) example:
60 <div class="code"><pre>
61 g.region raster=landclass96 -p
62 r.mapcalc "forests = if(landclass96 == 5, 1, null() )"
63 r.li.patchdensity input=forests conf=movwindow7 out=forests_patchdensity_mov7
64
65 # verify
66 r.univar forests_patchdensity_mov7
67 r.to.vect input=forests output=forests type=area
68 d.mon wx0
69 d.rast forests_patchdensity_mov7
70 d.vect forests type=boundary
71 </pre></div>
72
73 <h2>SEE ALSO</h2>
74
75 <em>
76 <a href="r.li.html">r.li</a> (package overview),
77 <a href="g.gui.rlisetup.html">g.gui.rlisetup</a>
78 </em>
79
80 <h2>REFERENCES</h2>
81
82 McGarigal, K., and B. J. Marks. 1995. FRAGSTATS: spatial pattern
83 analysis program for quantifying landscape structure. USDA For. Serv.
84 Gen. Tech. Rep. PNW-351. (<a href="https://doi.org/10.2737/PNW-GTR-351">PDF</a>)
85
86 <h2>AUTHORS</h2>
87
88 Michael Shapiro - CERL (patch identification)<br>
89 Markus Metz (statistics)