r.contour.html 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <h2>DESCRIPTION</h2>
  2. <em>r.contour</em> produces a vector map of specified contours from input raster map.
  3. Contours can be produced using a comma-separated list of values
  4. in <b>levels</b>, or at some regular increment using the <b>step</b>
  5. parameter, using <b>minlevel</b> and <b>maxlevel</b> as minimum and
  6. maximum contour values, respectively. If no <b>minlevel</b>
  7. or <b>maxlevel</b> is specified, the minimum and maximum cell values
  8. in the <b>input</b> raster map will be used.
  9. <h2>NOTES</h2>
  10. <em>r.contour</em> will either step through incremental contours or produce
  11. contours from a list of levels, not both. If both a list of levels and
  12. a step are specified, the list will be produced and the step will be ignored.
  13. <p>Zero is treated as a valid data value by <em>r.contour</em>.
  14. <p>If a contour level exactly matches a category value in the raster map,
  15. the contour line may backtrack on itself, causing illegal arcs to be produced
  16. in the output vector map.
  17. <p>The optional <b>cut</b> parameter allows the user to specify a minimum number of
  18. raster cells eligilble to be included in a contour line written to the <b>output</b>
  19. vector map. It acts like a filter, omitting spurs, single points, etc., making the output more generalized.
  20. <h2>EXAMPLES</h2>
  21. In the Spearfish location, produce a vector contour map from input raster <i>elevation.dem</i>
  22. with contour levels from 1000m to 2000m, 100m contour step, and a minimum of 200 input raster
  23. points contributing to the contour line:
  24. <div class="code"><pre>
  25. r.contour input=elevation.dem output=elevation_dem_contours \
  26. minlevel=1000 maxlevel=2000 step=100 cut=200
  27. </pre></div>
  28. <p>
  29. For an example of using levels with <em>r.contour</em> this example uses
  30. the elevation map from the North Carolina database:
  31. <div class="code"><pre>
  32. g.region raster=elevation
  33. r.contour in=elevation out=contours levels=60,90,120,150 --o
  34. d.mon wx0
  35. d.rast elevation_shade
  36. d.vect contours color=red
  37. </pre></div>
  38. <div align="center" style="margin: 10px">
  39. <a href="r_contour_using_levels.png">
  40. <img src="r_contour_using_levels.png" width="600" alt="r.contours example" border=0><br>
  41. </a>
  42. <i>Contour lines shown on shaded terrain map</i>
  43. </div>
  44. <p>
  45. For an example of using steps with <em>r.contour</em> this example uses
  46. the LiDAR data derived elevation map from the North Carolina database:
  47. <div class="code"><pre>
  48. g.region raster=elev_lid792_1m -p
  49. r.contour input=elev_lid792_1m output=elev_lid792_1m_contours \
  50. minlevel=100 maxlevel=150 step=10
  51. </pre></div>
  52. <h2>AUTHORS</h2>
  53. Terry Baker, U.S. Army Construction Engineering Research Laboratory<br>
  54. 3/2001: cut parameter and fixes by Andrea Aime (aaime@libero.it)
  55. <p>
  56. <i>Last changed: $Date$</i>