.TH v.what.vect 1grass "" "GRASS 6.4.2" "Grass User's Manual" .SH NAME \fI\fBv.what.vect\fR\fR - Uploads vector values at positions of vector points to the table. .SH KEYWORDS vector, database, attribute table .SH SYNOPSIS \fBv.what.vect\fR .br \fBv.what.vect help\fR .br \fBv.what.vect vector\fR=\fIname\fR [\fBlayer\fR=\fIinteger\fR] \fBcolumn\fR=\fIstring\fR \fBqvector\fR=\fIname\fR [\fBqlayer\fR=\fIinteger\fR] \fBqcolumn\fR=\fIstring\fR [\fBdmax\fR=\fIfloat\fR] [--\fBverbose\fR] [--\fBquiet\fR] .SS Parameters: .IP "\fBvector\fR=\fIname\fR" 4m .br Vector map to modify .IP "\fBlayer\fR=\fIinteger\fR" 4m .br Layer in the vector to be modified .br Default: \fI1\fR .IP "\fBcolumn\fR=\fIstring\fR" 4m .br Column to be updated with the query result .IP "\fBqvector\fR=\fIname\fR" 4m .br Vector map to be queried .IP "\fBqlayer\fR=\fIinteger\fR" 4m .br Layer of the query vector containing data .br Default: \fI1\fR .IP "\fBqcolumn\fR=\fIstring\fR" 4m .br Column to be queried .IP "\fBdmax\fR=\fIfloat\fR" 4m .br Maximum query distance in map units .br Default: \fI0.0\fR .PP .SH DESCRIPTION \fIv.what.vect\fR transfers attributes from the \fBqvector\fR's map attribute table into the attribute table of points present in the \fBvector\fR map. The script is based on \fIv.distance\fR. .SH NOTES The upload \fBcolumn\fR, into which the query results are stored, must be present in the \fBvector\fR map. Use \fIv.db.addcolumn\fR to add one if needed. .PP Use dmax parameter to control query distance tolerance (how far points/centroids can be from \fBqvector\fR features). For more options, use \fIv.distance\fR instead. .PP In case of a multipoint input \fBvector\fR map, with several points having the same category number, it can happen, that the query result is NULL, if the same category number falls into different \fBqvector\fR polygons. .PP When transferring attributes from a point map to a polygon map, usually \fBdmax\fR has to be larger than zero (determined by distance between query points and polygon centroids). .SH EXAMPLES In this example, the 'hospitals' point map in the North Carolina location is copied to the current mapset, a new attribute column is added and the urban names from the 'urbanarea' polygon map are transferred to the 'myhospitals' map at the hospital points' locations: \fC .DS .br g.copy vect=hospitals,myhospitals .br v.db.addcol myhospitals column="urb_name varchar(25)" .br v.what.vect myhospitals qvect=urbanarea column=urb_name qcolumn=NAME .br # verification: .br v.db.select myhospitals .br .DE \fR .PP In this example, city names, population data and more from Geonames.org country files are transferred to selected EU CORINE landuse/landcover classes ("Continuous urban fabric", 111, and "Discontinuous urban fabric", 112). Note: Example in UTM projection to which the input maps have been projected beforehand to have metric distances support: \fC .DS .br # extract populated places from geonames .br v.extract geonames_IT where="featurecla='P'" output=geonames_IT_cities .br # add new column .br v.db.addcol corine_code111_112_cities column="gnameid double precision" .br # transfer geonameid (3000m maximal distance between points and centroids) .br v.what.vect corine_code111_112_cities qvect=geonames_IT_cities column=gnameid \(rs .br qcolumn=geonameid dmax=3000 .br # now gnameid can be used for v.db.join to join further .br # attributes in from geonames.org .br .DE \fR .SH SEE ALSO \fI v.db.addcolumn, v.db.select, v.distance, v.rast.stats, v.what.rast \fR .SH AUTHOR Markus Neteler .PP \fILast changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $\fR .PP Full index .PP © 2003-2011 GRASS Development Team