.TH v.what.rast 1grass "" "GRASS 6.4.4" "Grass User's Manual" .SH NAME \fI\fBv.what.rast\fR\fR - Uploads raster values at positions of vector points to the table. .SH KEYWORDS vector, raster, attribute table .SH SYNOPSIS \fBv.what.rast\fR .br \fBv.what.rast help\fR .br \fBv.what.rast vector\fR=\fIname\fR \fBraster\fR=\fIname\fR [\fBlayer\fR=\fIinteger\fR] \fBcolumn\fR=\fIstring\fR [\fBwhere\fR=\fIsql_query\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] .SS Parameters: .IP "\fBvector\fR=\fIname\fR" 4m .br Name of input vector points map for which to edit attribute table .IP "\fBraster\fR=\fIname\fR" 4m .br Name of existing raster map to be queried .IP "\fBlayer\fR=\fIinteger\fR" 4m .br Layer number .br A single vector map can be connected to multiple database tables. This number determines which table to use. .br Default: \fI1\fR .IP "\fBcolumn\fR=\fIstring\fR" 4m .br Column name (will be updated by raster values) .IP "\fBwhere\fR=\fIsql_query\fR" 4m .br WHERE conditions of SQL statement without 'where' keyword .br Example: income = 10000 .PP .SH DESCRIPTION \fIv.what.rast\fR reads raster value for each point in the vector and updates \fBcol\fR 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. .SH NOTES \fIv.what.rast\fR operates on the attribute table. To modify the vector geometry instead, use \fIv.drape\fR. .SH EXAMPLES A) Reading values from raster map at position of vector points, writing these values into a column of the attribute table connected to the vector map: .br \fC .DS .br v.what.rast vect=pnts rast=elevation col=heights .br .DE \fR .PP 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 \fC .DS .br # create new random vector points map .br v.random pnts n=100 .br .br # add new table, link to map .br v.db.addtable pnts col="heights double precision" .br .br # query raster map and upload values to vector table into specified column .br g.region rast=elevation \-p .br v.what.rast vect=pnts raster=elevation column=heights .br .br # verify new attribute table: .br v.db.select pnts .br .br # verify statistics of uploaded values: .br v.univar map=pnts column=heights type=point .br .DE \fR .SH SEE ALSO \fI v.db.addtable, v.db.select, v.drape, v.univar, v.rast.stats, v.what.vect \fR .SH AUTHOR Radim Blazek .PP \fILast changed: $Date: 2012-02-08 22:39:58 +0100 (Wed, 08 Feb 2012) $\fR .PP Full index .PP © 2003-2014 GRASS Development Team