[GRASS-SVN] r45446 - grass/branches/releasebranch_6_4/raster/r.to.rast3elev

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 22 02:47:38 EST 2011


Author: neteler
Date: 2011-02-21 23:47:37 -0800 (Mon, 21 Feb 2011)
New Revision: 45446

Modified:
   grass/branches/releasebranch_6_4/raster/r.to.rast3elev/description.html
Log:
Fixed wrong module names and added new multi layer example (backport from trunk, r45443)

Modified: grass/branches/releasebranch_6_4/raster/r.to.rast3elev/description.html
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.to.rast3elev/description.html	2011-02-22 06:42:07 UTC (rev 45445)
+++ grass/branches/releasebranch_6_4/raster/r.to.rast3elev/description.html	2011-02-22 07:47:37 UTC (rev 45446)
@@ -25,25 +25,43 @@
 Simple Spearfish example
 
 <div class="code"><pre>
-g.region -d
-g.region res=200 res3=200 t=5000 b=0 tbres=100
+g.region rast=elevation.10m
+g.region res=200 res3=200 t=2000 b=0 tbres=20
 
 # Write the values of raster map soils based on the elevation of elevation.10m
 # to the 3D map volev
 
-r.elev.to.rast3 in=soils elev=elevation.10m out=volev
+r.to.rast3elev --o in=soils elev=elevation.10m out=volev
 
 # Write the values of map soils based on the elevation of elevation.10m
 # to the 3D map volev_l and fill the lower cells with the soils map values
 
-r.elev.to.rast3 in=soils elev=elevation.10m out=volev_l -l
+r.to.rast3elev --o in=soils elev=elevation.10m out=volev_l -l
 
 # Write the values of map soils based on the elevation of elevation.10m
 # to the 3D map volev_u and fill the upper cells with the soils map values
 
-r.elev.to.rast3 in=soils elev=elevation.10m out=volev_u -u
+r.to.rast3elev --o in=soils elev=elevation.10m out=volev_u -u
 
+# And Example with multiple elevation maps.
+## first we need three support maps
 
+r.mapcalc --o expression="one = 1" 
+r.mapcalc --o expression="two = 2" 
+r.mapcalc --o expression="three = 3" 
+
+## Now we generate the new evelation maps
+
+r.mapcalc --o expression="elev_mid = elevation.10m - 500"
+r.mapcalc --o expression="elev_bottom = elevation.10m - 1000"
+
+## Now fill the lower cells below the elevation maps with the values one, two and three
+
+r.to.rast3elev --o -l input=one,two,three elevation=elevation.10m,elev_mid,elev_bottom output=threelayer
+
+## Export the map for visualization with paraview
+r3.out.vtk --o input=threelayer output=/tmp/threelayer.vtk
+
 </pre></div>                                                                           
 
 <h2>SEE ALSO</h2>



More information about the grass-commit mailing list