Note: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the current manual page.
Use the dmax parameter to control the query distance tolerance, i.e., how far map's points/centroids can be from the query_map features. For further options, use v.distance.
In case of a multipoint input 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 query_map polygons.
When transferring attributes from a point map into a polygon map, dmax has to be larger than zero, i.e., it will be determined by the distance between query points and polygon centroids. Importantly, distance is in meters for latitude-longitude locations.
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.
g.copy vect=hospitals,myhospitals v.db.addcolumn myhospitals column="urb_name varchar(25)" v.what.vect myhospitals query_map=urbanarea column=urb_name query_column=NAME # verification: v.db.select myhospitals
In this example, city names, population data and others from Geonames.org country files are transferred to selected EU CORINE landuse/landcover classes ("Continuous urban fabric", 111, and "Discontinuous urban fabric", 112). Note: The example is in UTM projection to which the input maps have been projected beforehand.
# extract populated places from geonames v.extract geonames_IT where="featurecla='P'" output=geonames_IT_cities # add new column v.db.addcol corine_code111_112_cities column="gnameid double precision" # transfer geonameid (3000m maximal distance between points and centroids) v.what.vect corine_code111_112_cities query_map=geonames_IT_cities column=gnameid \ query_column=geonameid dmax=3000 # now gnameid can be used for v.db.join to join further # attributes from geonames.org
Available at: v.what.vect source code (history)
Latest change: Thursday Feb 03 11:10:06 2022 in commit: 547ff44e6aecfb4c9cbf6a4717fc14e521bec0be
Note: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the current manual page.
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
© 2003-2023 GRASS Development Team, GRASS GIS 8.2.2dev Reference Manual