r.li.mps.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <h2>DESCRIPTION</h2>
  2. <em>r.li.mps</em> (mean patch size) calculates the mean size of the
  3. patches in the sampling area as:<br>
  4. <!--
  5. <img src="rlimps_formula.png" alt="rliMps formula"><br>
  6. -->
  7. <div class="code"><pre>
  8. MPS = A / Npatch
  9. </pre></div>
  10. with:
  11. <ul>
  12. <li><b>A</b>:sampling area size without null cells</li>
  13. <li><b>Npatch</b>: number of patches</li>
  14. </ul>
  15. The unit of the mean size is hectare.
  16. <p>
  17. This index is calculated using a 4 neighbour algorithm, diagonal cells
  18. are ignored when tracing a patch.
  19. <h2>NOTES</h2>
  20. Do not use absolute path names for the <b>config</b> and <b>output</b>
  21. file/map parameters.
  22. If the "moving window" method was selected in <b>g.gui.rlisetup</b>, then the
  23. output will be a raster map, otherwise an ASCII file will be generated in
  24. the folder <tt>C:\Users\userxy\AppData\Roaming\GRASS7\r.li\output\</tt>
  25. (MS-Windows) or <tt>$HOME/.grass7/r.li/output/</tt> (GNU/Linux).
  26. <p>
  27. If the sample area contains only NULL value cells, <em>r.li.mps</em>
  28. returns 0 (zero). <br>
  29. <h2>EXAMPLES</h2>
  30. To calculate mean path size index on map <em>my_map</em>, using
  31. <em>my_conf</em> configuration file (previously defined with
  32. <em>g.gui.rlisetup</em>) and saving results in <em>my_out</em>, run:
  33. <div class="code"><pre>
  34. r.li.mps input=my_map conf=my_conf output=my_out
  35. </pre></div>
  36. <p>
  37. Forest map (Spearfish sample dataset) example:
  38. <div class="code"><pre>
  39. g.region raster=landcover.30m -p
  40. r.mapcalc "forests = if(landcover.30m >= 41 && landcover.30m <= 43,1,null())"
  41. r.li.mps input=forests conf=movwindow7 out=forests_mps_mov7
  42. r.univar forests_mps_mov7
  43. </pre></div>
  44. <p>
  45. Forest map (North Carolina sample dataset) example:
  46. <div class="code"><pre>
  47. g.region raster=landclass96 -p
  48. r.mapcalc "forests = if(landclass96 == 5, 1, null() )"
  49. r.li.mps input=forests conf=movwindow7 out=forests_mps_mov7
  50. # verify
  51. r.univar forests_mps_mov7
  52. r.to.vect input=forests output=forests type=area
  53. d.mon wx0
  54. d.rast forests_mps_mov7
  55. d.vect forests type=boundary
  56. </pre></div>
  57. <h2>SEE ALSO</h2>
  58. <em>
  59. <a href="r.li.html">r.li</a> - package overview<br>
  60. <a href="g.gui.rlisetup.html">g.gui.rlisetup</a>
  61. </em>
  62. <h2>REFERENCES</h2>
  63. McGarigal, K., and B. J. Marks. 1995. FRAGSTATS: spatial pattern
  64. analysis program for quantifying landscape structure. USDA For. Serv.
  65. Gen. Tech. Rep. PNW-351. (<a href="http://treesearch.fs.fed.us/pubs/3064">PDF</a>)
  66. <h2>AUTHORS</h2>
  67. Michael Shapiro - CERL (patch identification)<br>
  68. Markus Metz (statistics)
  69. <p>
  70. <i>Last changed: $Date$</i>