r.li.patchdensity.html 2.6 KB

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