1r.li.patchdensity(1) GRASS GIS User's Manual r.li.patchdensity(1)
2
3
4
6 r.li.patchdensity - Calculates patch density index on a raster map,
7 using a 4 neighbour algorithm
8
10 raster, landscape structure analysis, patch index
11
13 r.li.patchdensity
14 r.li.patchdensity --help
15 r.li.patchdensity input=name config=name output=name [--overwrite]
16 [--help] [--verbose] [--quiet] [--ui]
17
18 Flags:
19 --overwrite
20 Allow output files to overwrite existing files
21
22 --help
23 Print usage summary
24
25 --verbose
26 Verbose module output
27
28 --quiet
29 Quiet module output
30
31 --ui
32 Force launching GUI dialog
33
34 Parameters:
35 input=name [required]
36 Name of input raster map
37
38 config=name [required]
39 Configuration file
40
41 output=name [required]
42 Name for output raster map
43
45 r.li.patchdensity calculates the "patch density index", the number of
46 patches per square kilometer, as:
47 PD = Npatch / A
48 with:
49
50 • A:sampling area size
51
52 • Npatch: number of patches
53
54 This index is calculated using a 4 neighbour algorithm, diagonal cells
55 are ignored when tracing a patch.
56
58 Do not use absolute path names for the config and output file/map pa‐
59 rameters. If the "moving window" method was selected in
60 g.gui.rlisetup, then the output will be a raster map, otherwise an
61 ASCII file will be generated in the folder C:\Users\userxy\App‐
62 Data\Roaming\GRASS8\r.li\output\ (MS-Windows) or
63 $HOME/.grass8/r.li/output/ (GNU/Linux).
64
65 A sample area of only NULL values is considered to have zero patches,
66 that is, the result is always ⥠0.
67
69 To calculate patch density index on map my_map, using my_conf configu‐
70 ration file (previously defined with g.gui.rlisetup) and saving results
71 in my_out, run:
72 r.li.patchdensity input=my_map conf=my_conf output=my_out
73
74 Example for Spearfish forest areas:
75 g.region raster=landcover.30m -p
76 # extract forested areas:
77 r.category landcover.30m
78 r.mapcalc "forests = if(landcover.30m >= 41 && landcover.30m <= 43, 1, null())"
79 # patch density (7x7 moving window defined in g.gui.rlisetup):
80 r.li.patchdensity forests conf=movwindow7 out=forests_p_dens7
81 r.univar forests_p_dens7
82 d.rast.leg forests_p_dens7
83 r.to.vect forests out=forests feature=area
84 d.vect forests type=boundary
85
86 Forest map (North Carolina sample dataset) example:
87 g.region raster=landclass96 -p
88 r.mapcalc "forests = if(landclass96 == 5, 1, null() )"
89 r.li.patchdensity input=forests conf=movwindow7 out=forests_patchdensity_mov7
90 # verify
91 r.univar forests_patchdensity_mov7
92 r.to.vect input=forests output=forests type=area
93 d.mon wx0
94 d.rast forests_patchdensity_mov7
95 d.vect forests type=boundary
96
98 r.li - package overview
99 g.gui.rlisetup
100
102 McGarigal, K., and B. J. Marks. 1995. FRAGSTATS: spatial pattern analy‐
103 sis program for quantifying landscape structure. USDA For. Serv. Gen.
104 Tech. Rep. PNW-351. (PDF)
105
107 Michael Shapiro - CERL (patch identification)
108 Markus Metz (statistics)
109
111 Available at: r.li.patchdensity source code (history)
112
113 Accessed: Mon Jun 20 16:46:20 2022
114
115 Main index | Raster index | Topics index | Keywords index | Graphical
116 index | Full index
117
118 © 2003-2022 GRASS Development Team, GRASS GIS 8.2.0 Reference Manual
119
120
121
122GRASS 8.2.0 r.li.patchdensity(1)