.TH v.what.vect 1grass "" "GRASS 7.2.0" "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, sampling, database, position, querying, attribute table .SH SYNOPSIS \fBv.what.vect\fR .br \fBv.what.vect \-\-help\fR .br \fBv.what.vect\fR \fBmap\fR=\fIname\fR [\fBlayer\fR=\fIstring\fR] \fBcolumn\fR=\fIname\fR \fBquery_map\fR=\fIname\fR [\fBquery_layer\fR=\fIstring\fR] \fBquery_column\fR=\fIname\fR [\fBdmax\fR=\fIfloat\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBmap\fR=\fIname\fR \fB[required]\fR" 4m .br Name of vector points map for which to edit attributes .br Or data source for direct OGR access .IP "\fBlayer\fR=\fIstring\fR" 4m .br Layer number or name .br Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name. .br Default: \fI1\fR .IP "\fBcolumn\fR=\fIname\fR \fB[required]\fR" 4m .br Name of attribute column to be updated with the query result .IP "\fBquery_map\fR=\fIname\fR \fB[required]\fR" 4m .br Name of vector map to be queried .br Or data source for direct OGR access .IP "\fBquery_layer\fR=\fIstring\fR" 4m .br Layer number or name .br Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name. .br Default: \fI1\fR .IP "\fBquery_column\fR=\fIname\fR \fB[required]\fR" 4m .br Name of attribute column to be queried .IP "\fBdmax\fR=\fIfloat\fR" 4m .br Maximum query distance in map units .br Default: \fI0.0\fR .SH DESCRIPTION \fIv.what.vect\fR transfers attributes from the \fBquery_map\fR\(cqs map attribute table into the attribute table of points present in the \fBmap\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 \fBmap\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 \fBquery_map\fR features). For more options, use \fIv.distance\fR instead. .PP In case of a multipoint input \fBmap\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 \fBquery_map\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). .PP In case that one or both input vector maps are 3D, features need to touch also in the 3rd dimension (z coordinate) in order to transfer attributes. .SH EXAMPLES In this example, the \(cqhospitals\(cq 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 \(cqurbanarea\(cq polygon map are transferred to the \(cqmyhospitals\(cq map at the hospital points\(cq locations: .br .nf \fC g.copy vect=hospitals,myhospitals v.db.addcolumn myhospitals column=\(dqurb_name varchar(25)\(dq v.what.vect myhospitals query_map=urbanarea column=urb_name query_column=NAME # verification: v.db.select myhospitals \fR .fi .PP In this example, city names, population data and more from Geonames.org country files are transferred to selected EU CORINE landuse/landcover classes (\(dqContinuous urban fabric\(dq, 111, and \(dqDiscontinuous urban fabric\(dq, 112). Note: Example in UTM projection to which the input maps have been projected beforehand to have metric distances support: .br .nf \fC # extract populated places from geonames v.extract geonames_IT where=\(dqfeaturecla=\(cqP\(cq\(dq output=geonames_IT_cities # add new column v.db.addcol corine_code111_112_cities column=\(dqgnameid double precision\(dq # transfer geonameid (3000m maximal distance between points and centroids) v.what.vect corine_code111_112_cities query_map=geonames_IT_cities column=gnameid \(rs query_column=geonameid dmax=3000 # now gnameid can be used for v.db.join to join further # attributes in from geonames.org \fR .fi .SH SEE ALSO \fI v.db.addcolumn, v.db.select, v.distance, v.rast.stats, v.what.rast, v.what.rast3, v.vect.stats \fR .SH AUTHOR Markus Neteler .PP \fILast changed: $Date: 2016\-08\-22 04:16:33 +0200 (Mon, 22 Aug 2016) $\fR .SH SOURCE CODE .PP Available at: v.what.vect source code (history) .PP Main index | Vector index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2016 GRASS Development Team, GRASS GIS 7.2.0 Reference Manual