[GRASS-SVN] r50737 - grass/branches/develbranch_6/vector/v.what.rast
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Feb 8 16:41:00 EST 2012
Author: neteler
Date: 2012-02-08 13:41:00 -0800 (Wed, 08 Feb 2012)
New Revision: 50737
Modified:
grass/branches/develbranch_6/vector/v.what.rast/description.html
Log:
examples prettified
Modified: grass/branches/develbranch_6/vector/v.what.rast/description.html
===================================================================
--- grass/branches/develbranch_6/vector/v.what.rast/description.html 2012-02-08 21:40:06 UTC (rev 50736)
+++ grass/branches/develbranch_6/vector/v.what.rast/description.html 2012-02-08 21:41:00 UTC (rev 50737)
@@ -15,7 +15,7 @@
<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 vect=pnts rast=elevation col=heights
@@ -27,20 +27,21 @@
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 col="cat integer, myvalue integer, otherval double precision"
+# add new table, link to map
+v.db.addtable pnts col="heights double precision"
-# query raster map and upload values to vector table into specified column:
-v.what.rast vect=vectpoints rast=rastmap col=myvalue
+# query raster map and upload values to vector table into specified column
+g.region rast=elevation -p
+v.what.rast vect=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 col=myvalue type=point
+v.univar map=pnts column=heights type=point
</pre></div>
<h2>SEE ALSO</h2>
More information about the grass-commit
mailing list