r.li.patchnum.html 2.2 KB

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