[GRASS-SVN] r50736 - grass/trunk/vector/v.what.rast

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 8 16:40:06 EST 2012


Author: neteler
Date: 2012-02-08 13:40:06 -0800 (Wed, 08 Feb 2012)
New Revision: 50736

Modified:
   grass/trunk/vector/v.what.rast/v.what.rast.html
Log:
examples prettified

Modified: grass/trunk/vector/v.what.rast/v.what.rast.html
===================================================================
--- grass/trunk/vector/v.what.rast/v.what.rast.html	2012-02-08 21:39:58 UTC (rev 50735)
+++ grass/trunk/vector/v.what.rast/v.what.rast.html	2012-02-08 21:40:06 UTC (rev 50736)
@@ -15,31 +15,33 @@
 <h2>EXAMPLES</h2>
 
 A) Reading values from raster map at position of vector points, writing these values
-   into column of vector map:
+   into a column of the attribute table connected to the vector map:
 <br>
 <div class="code"><pre>
 v.what.rast map=pnts raster=elevation column=heights
 </pre></div>
 
-<p>B) In case of a vector map without attached attribute table, first add
+<p>
+B) In case of a vector map without attached attribute table, first add
 a new attribute table. This table is then populated with values
 queried from the raster map:
 <br>
 <div class="code"><pre>
-v.db.connect -p vectpoints
-# .. no table yet.
+# create new random vector points map
+v.random pnts n=100
 
-# add new table, link to map:
-v.db.addtable vectpoints column="cat integer, myvalue integer, otherval double precision"
+# add new table, link to map
+v.db.addtable pnts column="heights double precision"
 
-# query raster map and upload values to vector table into specified column:
-v.what.rast map=vectpoints raster=rastmap column=myvalue
+# query raster map and upload values to vector table into specified column
+g.region rast=elevation -p
+v.what.rast map=pnts raster=elevation column=heights
 
 # verify new attribute table:
-v.db.select vectpoints
+v.db.select pnts
 
 # verify statistics of uploaded values:
-v.univar map=vectpoints column=myvalue type=point
+v.univar map=pnts column=heights type=point
 </pre></div>
 
 <h2>SEE ALSO</h2>
@@ -56,4 +58,5 @@
 <h2>AUTHOR</h2>
 Radim Blazek
 
-<p><i>Last changed: $Date$</i>
+<p>
+<i>Last changed: $Date$</i>



More information about the grass-commit mailing list