| 1 |
<!-- meta page name: r.li --> |
| 2 |
<!-- meta page name description: Landscape structure analysis package overview --> |
| 3 |
|
| 4 |
<h2>DESCRIPTION</h2> |
| 5 |
|
| 6 |
The <em>r.li</em> suite is a toolset for multiscale analysis of |
| 7 |
landscape structure. It aims at implementing metrics as found in |
| 8 |
external software for quantitative measures of landscape structure like |
| 9 |
FRAGSTATS (McGarigal and Marks 1995). |
| 10 |
<p> |
| 11 |
The <em>r.li</em> suite offers a set of patch and diversity indices. |
| 12 |
It supports analysis of landscapes composed of a mosaic of |
| 13 |
patches, but, more generally, the modules work with any two-dimensional |
| 14 |
raster map whose cell values are integer (e.g., 1, 2) or floating point |
| 15 |
(e.g., 1.1, 3.2) values. The <em>g.gui.rlisetup</em> module has options for |
| 16 |
controlling the shape, size, number, and distribution of sampling |
| 17 |
areas used to collect information about the landscape structure. |
| 18 |
Sampling area shapes can be the entire map or a moving |
| 19 |
window of square, rectangular or circular shape. The size of |
| 20 |
sampling areas can be changed, so that the landscape can be analyzed |
| 21 |
at a variety of spatial scales simultaneously. Sampling areas may be |
| 22 |
distributed across the landscape in a random, systematic, or |
| 23 |
stratified-random manner, or as a moving window. |
| 24 |
<p> |
| 25 |
The <em>r.li</em> modules can calculate a number of measures that produce |
| 26 |
single values as output (e.g. mean patch size in the sampling area), |
| 27 |
as well as measures that produce a distribution of values as output |
| 28 |
(e.g. frequency distribution of patch sizes in the sampling area). The |
| 29 |
results are stored as raster maps. |
| 30 |
<p> |
| 31 |
All modules require configuration file which can be created by the |
| 32 |
<em>g.gui.rlisetup</em> module which is a GUI tool providing a convenient |
| 33 |
way to set all necessary parameters. This file can be used repetitively |
| 34 |
saving user from the need to specify all parameters over and over again. |
| 35 |
|
| 36 |
<h2>NOTES</h2> |
| 37 |
|
| 38 |
The general procedure to calculate an index from a raster map is two-fold: |
| 39 |
|
| 40 |
<ol> |
| 41 |
<li>run <em>g.gui.rlisetup</em>: create a configuration file selecting |
| 42 |
the parts of raster map to be analyzed. This file allows re-running |
| 43 |
an analysis easily. It is stored on Windows in the directory <code>C:\Users\userxy\AppData\Roaming\GRASS8\r.li\</code>, on GNU/Linux in |
| 44 |
<code>$HOME/.grass8/r.li/</code>.</li> <!-- TODO: and Mac OSX? --> |
| 45 |
|
| 46 |
<li>run one or more of the <em>r.li.<b>[index]</b></em> modules (e.g., |
| 47 |
<em>r.li.<b>patchdensity</b></em>) to calculate the selected index |
| 48 |
using on the areas selected on configuration file.</li> |
| 49 |
</ol> |
| 50 |
|
| 51 |
<!-- mhh ??: |
| 52 |
The <em>r.li.daemon</em> source code has a "main" function front-end |
| 53 |
which can be run, but it is only a template for development of new |
| 54 |
indices. |
| 55 |
--> |
| 56 |
|
| 57 |
<h2>EXAMPLES</h2> |
| 58 |
|
| 59 |
Calculate a patch density index on the entire 'geology' raster map |
| 60 |
in the Spearfish sample dataset, using a 5x5 moving window: |
| 61 |
|
| 62 |
<!-- TODO: update to new wxGUI: --> |
| 63 |
|
| 64 |
<ol> |
| 65 |
<li> CREATE A NEW CONFIGURATION FILE |
| 66 |
<ol> |
| 67 |
<li> run |
| 68 |
<div class="code"><pre> |
| 69 |
g.gui.rlisetup |
| 70 |
</pre></div> |
| 71 |
</li> |
| 72 |
<li> The main <em>g.gui.rlisetup</em> window is displayed, click on "New"</li> |
| 73 |
<li> The new configuration window is now displayed, enter the<br> |
| 74 |
configuration file name (e.g., "my_conf", do not use absolute paths) |
| 75 |
<br><br> |
| 76 |
Now the new configuration window is displayed.<br> |
| 77 |
Enter the configuration file name (e.g., "my_conf", do not use absolute paths)<br> |
| 78 |
and the name of raster map (e.g., "geology").<br> |
| 79 |
The other fields are not needed for this configuration.</li> |
| 80 |
<li> Click on "Setup sampling frame", select "Whole map layer" and click "OK"</li> |
| 81 |
<li> Click on "Setup sampling areas", select "Moving window" and click "OK"</li> |
| 82 |
<li> Click on "Use keyboard to enter moving window dimension"</li> |
| 83 |
<li> Select "Rectangle" and enter 5 in the "height" and "width" fields</li> |
| 84 |
<li> Click on "Save settings"</li> |
| 85 |
<li> Close the <em>g.gui.rlisetup</em> window</li> |
| 86 |
</ol></li> |
| 87 |
|
| 88 |
<li> CALCULATE PATCHDENSITY INDEX |
| 89 |
<ol> |
| 90 |
<li> set the region settings to the "<code>geology</code>" raster map: |
| 91 |
<div class="code"><pre> |
| 92 |
g.region raster=geology -p |
| 93 |
</pre></div> |
| 94 |
</li> |
| 95 |
<li> run <em>r.li.patchdensity</em>: |
| 96 |
<div class="code"><pre> |
| 97 |
r.li.patchdensity input=geology conf=my_conf out=patchdens |
| 98 |
</pre></div> |
| 99 |
</li> |
| 100 |
</ol></li> |
| 101 |
</ol> |
| 102 |
|
| 103 |
The resulting patch density is stored in "<code>patchdens</code>" raster map. |
| 104 |
|
| 105 |
You can verify the result for example with contour lines: |
| 106 |
<div class="code"><pre> |
| 107 |
r.contour in=patchdens out=patchdens step=5 |
| 108 |
d.rast patchdens |
| 109 |
d.vect -c patchdens |
| 110 |
</pre></div> |
| 111 |
|
| 112 |
Note that if you want to run another index with the same area |
| 113 |
configuration, you don't have to create another configuration file. |
| 114 |
|
| 115 |
You can also use the same area configuration file on another map. The |
| 116 |
program rescale it automatically. For instance if you have selected a |
| 117 |
5x5 sample area on 100x100 raster map, and you use the same |
| 118 |
configuration file on a 200x200 raster map, then the sample area is |
| 119 |
10x10. |
| 120 |
|
| 121 |
<h2>SEE ALSO</h2> |
| 122 |
|
| 123 |
<b>GUI tools</b>: |
| 124 |
<ul> |
| 125 |
<li> <a href="g.gui.rlisetup.html">g.gui.rlisetup</a>: Configuration editor for the <code>r.li.*</code> module where <code>*</code> is name of the index</li> |
| 126 |
</ul> |
| 127 |
|
| 128 |
<b>Patch indices</b>: |
| 129 |
<ul> |
| 130 |
<li>Indices based on patch number: |
| 131 |
<ul> |
| 132 |
<li> <a href="r.li.patchdensity.html">r.li.patchdensity</a>: Calculates patch density index on a raster map, using a 4 neighbour algorithm</li> |
| 133 |
<li> <a href="r.li.patchnum.html">r.li.patchnum</a>: Calculates patch number index on a raster map, using a 4 neighbour algorithm</li> |
| 134 |
</ul> |
| 135 |
|
| 136 |
<li>Indices based on patch dimension: |
| 137 |
<ul> |
| 138 |
<li> <a href="r.li.mps.html">r.li.mps</a>: Calculates mean patch size index on a raster map, using a 4 neighbour algorithm</li> |
| 139 |
<li> <a href="r.li.padcv.html">r.li.padcv</a>: Calculates coefficient of variation of patch area on a raster map</li> |
| 140 |
<li> <a href="r.li.padrange.html">r.li.padrange</a>: Calculates range of patch area size on a raster map</li> |
| 141 |
<li> <a href="r.li.padsd.html">r.li.padsd</a>: Calculates standard deviation of patch area a raster map</li> |
| 142 |
</ul> |
| 143 |
|
| 144 |
<li>Indices based on patch shape: |
| 145 |
<ul> |
| 146 |
<li> <a href="r.li.shape.html">r.li.shape</a>: Calculates shape index on a raster map</li> |
| 147 |
</ul> |
| 148 |
|
| 149 |
<li>Indices based on patch edge: <!-- border? --> |
| 150 |
<ul> |
| 151 |
<li> <a href="r.li.edgedensity.html">r.li.edgedensity</a>: Calculates edge density index on a raster map, using a 4 neighbour algorithm</li> |
| 152 |
</ul> |
| 153 |
|
| 154 |
<li>Indices based on patch attributes: |
| 155 |
<ul> |
| 156 |
<li> <a href="r.li.cwed.html">r.li.cwed</a>: Calculates contrast Weighted Edge Density index on a raster map</li> |
| 157 |
<li> <a href="r.li.mpa.html">r.li.mpa</a>: Calculates mean pixel attribute index on a raster map</li> |
| 158 |
</ul> |
| 159 |
|
| 160 |
</ul> |
| 161 |
|
| 162 |
<b>Diversity indices</b>: |
| 163 |
<ul> |
| 164 |
<li> <a href="r.li.dominance.html">r.li.dominance</a>: Calculates dominance diversity index on a raster map</li> |
| 165 |
<li> <a href="r.li.pielou.html">r.li.pielou</a>: Calculates Pielou eveness index on a raster map</li> |
| 166 |
<li> <a href="r.li.renyi.html">r.li.renyi</a>: Calculates Renyi entropy on a raster map</li> |
| 167 |
<li> <a href="r.li.richness.html">r.li.richness</a>: Calculates richness diversity index on a raster map</li> |
| 168 |
<li> <a href="r.li.shannon.html">r.li.shannon</a>: Calculates Shannon diversity index on a raster map</li> |
| 169 |
<li> <a href="r.li.simpson.html">r.li.simpson</a>: Calculates Simpson diversity index on a raster map</li> |
| 170 |
</ul> |
| 171 |
|
| 172 |
<b>Core library</b>: |
| 173 |
<ul> |
| 174 |
<li> <a href="r.li.daemon.html">r.li.daemon</a>: library with common functionality (not visible to the user)</li> |
| 175 |
</ul> |
| 176 |
|
| 177 |
<h2>ADDING NEW INDICES</h2> |
| 178 |
|
| 179 |
New indices can be defined and implemented by any C programmer, without |
| 180 |
having to deal with all basic functions (IO etc.). The computing |
| 181 |
architecture and the functions are clearly separated, thus allowing an |
| 182 |
easy expandability. Every index is defined separately, placed in a |
| 183 |
directory along with its Makefile for compiling it and a file |
| 184 |
<module_name>.html which describes the index including a simple |
| 185 |
example of use. See <a href="r.li.daemon.html">r.li.daemon</a> |
| 186 |
for more information about development. |
| 187 |
|
| 188 |
<h2>REFERENCES</h2> |
| 189 |
|
| 190 |
<ul> |
| 191 |
<li> |
| 192 |
McGarigal, K., and B. J. Marks. 1995. FRAGSTATS: spatial pattern |
| 193 |
analysis program for quantifying landscape structure. USDA For. Serv. |
| 194 |
Gen. Tech. Rep. PNW-351 |
| 195 |
(<a href="https://doi.org/10.2737/PNW-GTR-351">PDF</a>).</li> |
| 196 |
|
| 197 |
<li> |
| 198 |
Baker, W.L. and Y. Cai. 1992. The r.le programs for multiscale analysis of |
| 199 |
landscape structure using the GRASS geographical information system. |
| 200 |
Landscape Ecology 7(4):291-302.</li> |
| 201 |
</ul> |
| 202 |
|
| 203 |
<h2>AUTHORS</h2> |
| 204 |
|
| 205 |
Claudio Porta and Lucio Davide Spano, students of Computer Science, |
| 206 |
University of Pisa (Italy).<br> |
| 207 |
Commission from Faunalia Pontedera (PI) |
| 208 |
<p> |
| 209 |
Partially rewritten by Markus Metz |