~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to raster/r.li/r.li.patchdensity/r.li.patchdensity.html

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 <tt>C:\Users\userxy\AppData\Roaming\GRASS7\r.li\output\</tt>
 
27
(MS-Windows) or <tt>$HOME/.grass7/r.li/output/</tt> (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
To calculate patch density index on map <em>my_map</em>, using
 
34
<em>my_conf</em> configuration file (previously defined with
 
35
<em>g.gui.rlisetup</em>) and saving results in <em>my_out</em>, run:
 
36
<div class="code"><pre>
 
37
r.li.patchdensity input=my_map conf=my_conf output=my_out
 
38
</pre></div>
 
39
 
 
40
<p>
 
41
Example for Spearfish forest areas:
 
42
<div class="code"><pre>
 
43
g.region raster=landcover.30m -p
 
44
# extract forested areas:
 
45
r.category landcover.30m
 
46
r.mapcalc "forests = if(landcover.30m >= 41 && landcover.30m <= 43, 1, null())"
 
47
 
 
48
# patch density (7x7 moving window defined in g.gui.rlisetup):
 
49
r.li.patchdensity forests conf=movwindow7 out=forests_p_dens7
 
50
r.univar forests_p_dens7
 
51
d.rast.leg forests_p_dens7
 
52
 
 
53
r.to.vect forests out=forests feature=area
 
54
d.vect forests type=boundary
 
55
</pre></div>
 
56
<p>
 
57
 
 
58
Forest map (North Carolina sample dataset) example:
 
59
<div class="code"><pre>
 
60
g.region raster=landclass96 -p
 
61
r.mapcalc "forests = if(landclass96 == 5, 1, null() )"
 
62
r.li.patchdensity input=forests conf=movwindow7 out=forests_patchdensity_mov7
 
63
 
 
64
# verify
 
65
r.univar forests_patchdensity_mov7
 
66
r.to.vect input=forests output=forests type=area
 
67
d.mon wx0
 
68
d.rast forests_patchdensity_mov7
 
69
d.vect forests type=boundary
 
70
</pre></div>
 
71
 
 
72
<h2>SEE ALSO</h2>
 
73
<em>
 
74
<a href="r.li.html">r.li</a> - package overview<br>
 
75
<a href="g.gui.rlisetup.html">g.gui.rlisetup</a>
 
76
</em>
 
77
 
 
78
<h2>REFERENCES</h2>
 
79
McGarigal, K., and B. J. Marks. 1995. FRAGSTATS: spatial pattern
 
80
analysis program for quantifying landscape structure. USDA For. Serv.
 
81
Gen. Tech. Rep. PNW-351. (<a href="http://treesearch.fs.fed.us/pubs/3064">PDF</a>)
 
82
 
 
83
<h2>AUTHORS</h2>
 
84
Michael Shapiro - CERL (patch identification)<br>
 
85
Markus Metz (statistics)
 
86
 
 
87
<p>
 
88
<i>Last changed: $Date: 2014-12-19 22:55:37 +0100 (Fri, 19 Dec 2014) $</i>