r.surf.contour.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <h2>DESCRIPTION</h2>
  2. <em>r.surf.contour</em> creates a raster elevation map from a rasterized
  3. contour map. Elevation values are determined using procedures similar
  4. to a manual methods.
  5. To determine the elevation of a point on a contour map, an individual
  6. might interpolate its value from those of the two nearest contour lines
  7. (uphill and downhill).
  8. <p>
  9. <em>r.surf.contour</em> works in a similar way. Initially, a vector map of
  10. the contour lines is made with the elevation of each line as an attribute.
  11. When the program <em><a href="v.to.rast.html">v.to.rast</a></em>
  12. is run on the vector map, continuous "lines" of rasters containing the
  13. contour line values will be the input for <em>r.surf.contour</em>. For each
  14. cell in the input map, either the cell is a contour line cell (which is
  15. given that value), or a flood fill is generated from that spot until the
  16. fill comes to two unique values. So the <em>r.surf.contour</em> algorithm
  17. <strong>linearly interpolates</strong> between contour lines. The flood fill
  18. is not allowed to cross over
  19. the rasterized contour lines, thus ensuring that an uphill and downhill
  20. contour value will be the two values chosen. <em>r.surf.contour</em>
  21. interpolates from the uphill and downhill values by the true distance.
  22. <h3>Parameters:</h3>
  23. <dl>
  24. <dt><b>input=</b><em>name</em>
  25. <dd>Name of an existing raster map that contains a set of
  26. initial category values (i.e., some cells contain known elevation
  27. values (denoting contours) while the rest contain NULL values).
  28. <dt><b>output=</b><em>name</em>
  29. <dd>Name to be assigned to new output raster map that represents
  30. a smooth (e.g., elevation) surface generated from
  31. the known category values in the input raster map layer.
  32. </dl>
  33. <p>An existing MASK raster map is respected for both reading <em>input</em>
  34. and writing <em>output</em>.
  35. <h2>NOTES</h2>
  36. <em>r.surf.contour</em> works well under the following circumstances:
  37. 1) the contour lines extend to the the edge of the current region,
  38. 2) the program is run at the same resolution as that of the input map,
  39. 3) there are no disjointed contour lines,
  40. and 4) no spot elevation data BETWEEN contour lines exist. Spot elevations at
  41. the tops of hills and the bottoms of depressions, on the other hand, improve
  42. the output greatly.
  43. Violating these constraints will cause non-intuitive anomalies to appear in
  44. the output map. Run <em> <a href="r.slope.aspect.html">r.slope.aspect</a>
  45. </em> on <em>r.surf.contour</em> results to locate potential anomalies.
  46. <p>The running of <em>r.surf.contour</em> is very sensitive to the resolution of
  47. rasterized vector map. If multiple contour lines go through the same raster,
  48. slight anomalies may occur. The speed of <em>r.surf.contour</em> is dependent
  49. on how far "apart" the contour lines are from each other (as measured in
  50. raster cells). Since a flood fill algorithm is used, the program's running
  51. time will grow exponentially with the distance between contour lines.
  52. <h2>EXAMPLE</h2>
  53. Example to create contour lines from elevation model, then recreating DEM
  54. from these contour lines along with differences analysis (North Carolina
  55. sample data set):
  56. <div class="code"><pre>
  57. g.region raster=elevation -p
  58. # get minimum elevation value
  59. r.univar elevation
  60. # generate vector contour lines
  61. r.contour input=elevation output=contours_5m step=5 minlevel=50
  62. # rasterize contour lines
  63. v.info -c contours_5m
  64. v.to.rast input=contours_5m output=contours_5m use=attr attribute_column=level
  65. # generate DEM from rasterized contour lines
  66. r.surf.contour input=contours_5m output=elevation_from_cont5m
  67. # calculate difference map
  68. r.mapcalc "diff = elevation - elevation_from_cont5m"
  69. r.colors diff color=differences
  70. # analyze differences statistically
  71. r.univar diff
  72. </pre></div>
  73. <h2>SEE ALSO</h2>
  74. <em>
  75. <a href="r.mapcalc.html">r.mapcalc</a>,
  76. <a href="r.slope.aspect.html">r.slope.aspect</a>,
  77. <a href="r.surf.idw.html">r.surf.idw</a>,
  78. <a href="wxGUI.vdigit.html">wxGUI vector digitizer</a>,
  79. <a href="v.surf.idw.html">v.surf.idw</a>,
  80. <a href="v.surf.rst.html">v.surf.rst</a>,
  81. <a href="v.to.rast.html">v.to.rast</a>
  82. </em>
  83. <p>
  84. Overview: <a href="https://grasswiki.osgeo.org/wiki/Interpolation">Interpolation and Resampling</a> in GRASS GIS
  85. <h2>AUTHOR</h2>
  86. Chuck Ehlschlaeger, U.S. Army Construction Engineering Research Laboratory
  87. <p><i>Last changed: $Date$</i>