<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>GRASS GIS: v.what.rast</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="grassdocs.css" type="text/css"> </head> <body bgcolor="white"> <img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade> <h2>NAME</h2> <em><b>v.what.rast</b></em> - Uploads raster values at positions of vector points to the table. <h2>KEYWORDS</h2> vector, raster, attribute table <h2>SYNOPSIS</h2> <b>v.what.rast</b><br> <b>v.what.rast help</b><br> <b>v.what.rast</b> <b>vector</b>=<em>name</em> <b>raster</b>=<em>name</em> [<b>layer</b>=<em>integer</em>] <b>column</b>=<em>string</em> [<b>where</b>=<em>sql_query</em>] [--<b>verbose</b>] [--<b>quiet</b>] <h3>Parameters:</h3> <DL> <DT><b>vector</b>=<em>name</em></DT> <DD>Name of input vector points map for which to edit attribute table</DD> <DT><b>raster</b>=<em>name</em></DT> <DD>Name of existing raster map to be queried</DD> <DT><b>layer</b>=<em>integer</em></DT> <DD>Layer number</DD> <DD>A single vector map can be connected to multiple database tables. This number determines which table to use.</DD> <DD>Default: <em>1</em></DD> <DT><b>column</b>=<em>string</em></DT> <DD>Column name (will be updated by raster values)</DD> <DT><b>where</b>=<em>sql_query</em></DT> <DD>WHERE conditions of SQL statement without 'where' keyword</DD> <DD>Example: income < 1000 and inhab >= 10000</DD> </DL> <H2>DESCRIPTION</H2> <em>v.what.rast</em> reads raster value for each point in the vector and updates <b>col</b> column in vector attribute table by this value. The column should be type number (integer, float, double, ... ). <br> If more points have the same category, attribute value is set to NULL. If raster values is NULL, attribute value is set to NULL. <H2>NOTES</H2> <em>v.what.rast</em> operates on the attribute table. To modify the vector 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: <br> <div class="code"><pre> v.what.rast vect=pnts rast=elevation col=heights </pre></div> <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. # add new table, link to map: v.db.addtable vectpoints col="cat integer, myvalue integer, otherval double precision" # query raster map and upload values to vector table into specified column: v.what.rast vect=vectpoints rast=rastmap col=myvalue # verify new attribute table: v.db.select vectpoints # verify statistics of uploaded values: v.univar map=vectpoints col=myvalue type=point </pre></div> <H2>SEE ALSO</H2> <EM> <a href="v.db.addtable.html">v.db.addtable</a>, <a HREF="v.db.select.html">v.db.select</a>, <A HREF="v.drape.html">v.drape</a>, <A HREF="v.univar.html">v.univar</a>, <a HREF="v.rast.stats.html">v.rast.stats</a>, <a href="v.what.vect.html">v.what.vect</a> </EM> <H2>AUTHOR</H2> Radim Blazek <p> <i>Last changed: $Date: 2007-06-10 13:23:21 +0200 (Sun, 10 Jun 2007) $</i> <HR> <P><a href="index.html">Main index</a> - <a href="vector.html">vector index</a> - <a href="full_index.html">Full index</a></P> <P>© 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p> </body> </html>