1r.li.mpa(1) Grass User's Manual r.li.mpa(1)
2
3
4
6 r.li.mpa - Calculates mean pixel attribute index on a raster map
7
9 raster, landscape structure analysis, patch index
10
12 r.li.mpa
13 r.li.mpa --help
14 r.li.mpa input=name config=name output=name [--overwrite] [--help]
15 [--verbose] [--quiet] [--ui]
16
17 Flags:
18 --overwrite
19 Allow output files to overwrite existing files
20
21 --help
22 Print usage summary
23
24 --verbose
25 Verbose module output
26
27 --quiet
28 Quiet module output
29
30 --ui
31 Force launching GUI dialog
32
33 Parameters:
34 input=name [required]
35 Name of input raster map
36
37 config=name [required]
38 Configuration file
39
40 output=name [required]
41 Name for output raster map
42
44 r.li.mpa (mean pixel attribute) calculates the average value of the
45 attribute of all the non-null cells in the sampling area as:
46 with:
47
48 · i: attribute
49
50 · m: number of non-null attributes in the sampling area
51
52 · wi: number of cells of attribute i
53
54 · size: size of sampling area (in cells)
55
57 Do not use absolute path names for the config and output file/map
58 parameters. If the "moving window" method was selected in
59 g.gui.rlisetup, then the output will be a raster map, otherwise an
60 ASCII file will be generated in the folder C:\Users\userxy\App‐
61 Data\Roaming\GRASS7\r.li\output\ (MS-Windows) or
62 $HOME/.grass7/r.li/output/ (GNU/Linux).
63
64 If the input raster map contains only NULL values then r.li.mpa consid‐
65 ers to have 0 patches.
66 If area is 0 r.li.mpa returns -1; it is possible only if the raster is
67 masked
68 If you want to change these -1 values to NULL, run subsequently on the
69 resulting map:
70 r.null setnull=-1 input=my_map
71 after index calculation.
72
74 To calculate the mean pixel attribute index on map my_map, using
75 my_conf configuration file (previously defined with g.gui.rlisetup) and
76 saving results in my_out, run:
77 r.li.mpa input=my_map conf=my_conf output=my_out
78
79 Forest map (Spearfish sample dataset) example:
80 g.region raster=landcover.30m -p
81 r.mapcalc "forests = if(landcover.30m >= 41 && landcover.30m <= 43,1,null())"
82 r.li.mpa input=forests conf=movwindow7 out=forests_mpa_mov7
83 r.univar forests_mpa_mov7
84
85 Forest map (North Carolina sample dataset) example:
86 g.region raster=landclass96 -p
87 r.mapcalc "forests = if(landclass96 == 5, 1, null() )"
88 r.li.mpa input=forests conf=movwindow7 out=forests_mpa_mov7
89 # verify
90 r.univar forests_mpa_mov7
91 r.to.vect input=forests output=forests type=area
92 d.mon wx0
93 d.rast forests_mpa_mov7
94 d.vect forests type=boundary
95
97 r.li - package overview
98 g.gui.rlisetup
99
101 McGarigal, K., and B. J. Marks. 1995. FRAGSTATS: spatial pattern analy‐
102 sis program for quantifying landscape structure. USDA For. Serv. Gen.
103 Tech. Rep. PNW-351. (PDF)
104
106 Serena Pallecchi student of Computer Science University of Pisa
107 (Italy).
108 Commission from Faunalia Pontedera (PI), Italy (www.faunalia.it)
109 Markus Metz
110
111 Last changed: $Date: 2014-12-19 22:17:36 +0100 (Fri, 19 Dec 2014) $
112
114 Available at: r.li.mpa source code (history)
115
116 Main index | Raster index | Topics index | Keywords index | Graphical
117 index | Full index
118
119 © 2003-2019 GRASS Development Team, GRASS GIS 7.4.4 Reference Manual
120
121
122
123GRASS 7.4.4 r.li.mpa(1)