소스 검색

examples prettified

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@50736 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 13 년 전
부모
커밋
8a32ff7f9c
1개의 변경된 파일14개의 추가작업 그리고 11개의 파일을 삭제
  1. 14 11
      vector/v.what.rast/v.what.rast.html

+ 14 - 11
vector/v.what.rast/v.what.rast.html

@@ -15,31 +15,33 @@ geometry instead, use <em>v.drape</em>.
 <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 @@ v.univar map=vectpoints column=myvalue type=point
 <h2>AUTHOR</h2>
 Radim Blazek
 
-<p><i>Last changed: $Date$</i>
+<p>
+<i>Last changed: $Date$</i>