r.buffer.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <h2>DESCRIPTION</h2>
  2. <em>r.buffer</em> creates a new raster map showing
  3. buffer (a.k.a. "distance" or "proximity") zones around all
  4. cells that contain non-NULL category values in an existing
  5. raster map. The distances of buffer zones from cells with
  6. non-zero category values are user-chosen and must be positive value(s).
  7. Suppose, for example, that you want to place buffer zones around
  8. roads. This program could create the raster map
  9. shown below on the right based on road information
  10. contained in the raster map shown on the left.
  11. <div class="code"><pre>
  12. 000000000000000000000000 222233333333333333444444
  13. 111000000000000000000000 111222222222223333333333
  14. 000111111111100000000000 222111111111122223333333
  15. 000000001000011100000000 332222221222211122222222
  16. 000000001000000011111111 333333321233222211111111
  17. 000000001000000000000000 433333321233333222222222
  18. 000000001000000000000000 444443321233333333333333
  19. 000000001000000000000000 444443321233443333333333
  20. 000000001000000000000000 444443321233444444444444
  21. Category 0: No roads
  22. Category 1: Road location
  23. Category 2: Buffer Zone 1 around roads
  24. Category 3: Buffer Zone 2 around roads
  25. Category 4: Buffer Zone 3 around roads
  26. </pre></div>
  27. <h2>NOTES</h2>
  28. The user has the option of identifying up to 250 continuous zones.
  29. The zones are identified by specifying the upper limit of each desired
  30. zone (<em>r.buffer</em> assumes that <tt>0</tt> is the starting
  31. point). "Continuous" is used in the sense that each category zone's
  32. lower value is the previous zone's upper value. The first buffer zone
  33. always has distance <tt>0</tt> as its lower bound. Buffer distances
  34. can be specified using one of five units with the <b>units</b> parameter.
  35. <p>
  36. <!-- ??? is this the real method used or some ancient option ??? -->
  37. Distances from cells containing the user-specified category values
  38. are calculated using the "fromcell" method. This method locates each
  39. cell that contains a category value from which distances are to be
  40. calculated, and draws the requested distance rings around
  41. them. This method works very fast when there are few cells
  42. containing the category values of interest, but works
  43. slowly when there are numerous cells containing the
  44. category values of interest spread throughout the area.
  45. <p>
  46. <em>r.buffer</em> measures distances from center of cell to
  47. center of cell using Euclidean distance measure for
  48. planimetric locations (like UTM) and using ellipsoidal
  49. geodesic distance measure for latitude/longitude locations.
  50. <p>
  51. <em>r.buffer</em> calculates distance zones from all cells having
  52. non-NULL category values in the <b>input</b> map. If the user wishes
  53. to calculate distances from only selected <b>input</b> map category
  54. values, the user should run (for example)
  55. <em><a href="r.reclass.html">r.reclass</a></em> prior to
  56. <em>r.buffer</em>, to reclass all categories from which distance zones
  57. are not desired to be calculated into category NULL.
  58. <p>
  59. The <b>-z</b> flag can be used to ignore raster values of zero instead of NULL
  60. values in the input raster map.
  61. <p>
  62. When working with massive raster regions consider
  63. the <em><a href="r.buffer.lowmem.html">r.buffer.lowmem</a></em> module
  64. if RAM use becomes a problem. The lowmem version can be &gt; 40x
  65. slower, but will work with minimal memory requirements. The
  66. classic <em>r.buffer</em> should be able to deal with raster maps of
  67. 32000x32000 size on a system with 1 GB RAM, and rasters of 90000x90000
  68. on a system with 8 GB RAM without going into swap.
  69. <h2>EXAMPLE</h2>
  70. In the following example (North Carolina sample dataset), the buffer zones
  71. would be (in the default map units of meters): 0-100, 101-200, 201-300,
  72. 301-400 and 401-500.
  73. <br>
  74. <div class="code"><pre>
  75. g.region raster=roadsmajor -p
  76. r.buffer input=roadsmajor output=roadsmajor_buf distances=100,200,300,400,500
  77. </pre></div>
  78. Result:
  79. <div class="code"><pre>
  80. r.category input=roads.buf
  81. 1 distances calculated from these locations
  82. 2 0-100 meters
  83. 3 100-200 meters
  84. 4 200-300 meters
  85. 5 300-400 meters
  86. 6 400-500 meters
  87. </pre></div>
  88. <center>
  89. <img src="r_buffer_road.png" border=1><br>
  90. <i>Distances to road</i>
  91. </center>
  92. <h2>SEE ALSO</h2>
  93. <em>
  94. <a href="r.buffer.lowmem.html">r.buffer.lowmem</a>,
  95. <a href="r.grow.html">r.grow</a>,
  96. <a href="v.buffer.html">v.buffer</a>
  97. </em>
  98. <p>
  99. <em>
  100. <a href="g.region.html">g.region</a>,
  101. <a href="r.cost.html">r.cost</a>,
  102. <a href="r.distance.html">r.distance</a>,
  103. <a href="r.grow.distance.html">r.grow.distance</a>,
  104. <a href="r.mapcalc.html">r.mapcalc</a>,
  105. <a href="r.reclass.html">r.reclass</a>
  106. </em>
  107. <h2>AUTHORS</h2>
  108. Michael Shapiro, U.S. Army Construction Engineering
  109. Research Laboratory
  110. <br>
  111. James Westervelt, U.S. Army Construction Engineering
  112. Research Laboratory
  113. <!--
  114. <p>
  115. <i>Last changed: $Date$</i>
  116. -->