[GRASS-SVN] r53218 - grass/trunk/raster/r.surf.contour

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 18 13:39:43 PDT 2012


Author: neteler
Date: 2012-09-18 13:39:43 -0700 (Tue, 18 Sep 2012)
New Revision: 53218

Modified:
   grass/trunk/raster/r.surf.contour/r.surf.contour.html
Log:
new example

Modified: grass/trunk/raster/r.surf.contour/r.surf.contour.html
===================================================================
--- grass/trunk/raster/r.surf.contour/r.surf.contour.html	2012-09-18 20:39:11 UTC (rev 53217)
+++ grass/trunk/raster/r.surf.contour/r.surf.contour.html	2012-09-18 20:39:43 UTC (rev 53218)
@@ -7,7 +7,6 @@
 might interpolate its value from those of the two nearest contour lines
 (uphill and downhill).
 
-
 <p>
 <em>r.surf.contour</em> works in a similar way.  Initially, a vector map of
 the contour lines is made with the elevation of each line as an attribute.
@@ -65,6 +64,37 @@
 raster cells).  Since a flood fill algorithm is used, the program's running
 time will grow exponentially with the distance between contour lines.
 
+<h2>EXAMPLE</h2>
+
+Example to create contour lines from elevation model, then recreating DEM
+from these contour lines along with differences analysis (North Carolina
+sample data set):
+
+<div class="code"><pre>
+g.region rast=elevation -p
+
+# get minimum elevation value
+r.univar elevation
+
+# generate vector contour lines 
+r.contour input=elevation output=contours_5m step=5 minlevel=50
+
+# rasterize contour lines
+v.info -c contours_5m
+v.to.rast input=contours_5m output=contours_5m use=attr column=level
+
+# generate DEM from rasterized contour lines
+r.surf.contour input=contours_5m output=elevation_from_cont5m
+
+# calculate difference map
+r.mapcalc "diff = elevation - elevation_from_cont5m"
+r.colors diff color=differences
+
+# analyze differences statistically
+r.univar diff
+</pre></div>
+
+
 <h2>SEE ALSO</h2>
 
 <em>



More information about the grass-commit mailing list