r.li.html 8.3 KB

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