Use dmax parameter to control query distance tolerance (how far points/centroids can be from qvector features). For more options, use v.distance instead.
In case of a multipoint input vector 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 qvector polygons.
When transferring attributes from a point map to a polygon map, usually dmax has to be larger than zero (determined by distance between query points and polygon centroids).
g.copy vect=archsites,myarchsites v.db.addcolumn myarchsites col="owner varchar(25)" v.what.vect myarchsites qvect=fields column=owner qcolumn=label # verification: v.db.select myarchsites
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:
# extract populated places from geonames v.extract geonames_IT where="featurecla='P'" out=geonames_IT_cities # add new column v.db.addcol corine_code111_112_cities col="gnameid double precision" # transfer geonameid (3000m maximal distance between points and centroids) v.what.vect corine_code111_112_cities qvect=geonames_IT_cities col=gnameid \ qcol=geonameid dmax=3000 # now gnameid can be used for v.db.join to join further # attributes in from Geonames.org
Last changed: $Date: 2009-11-29 02:13:58 -0800 (Sun, 29 Nov 2009) $
Main index - vector index - Full index
© 2003-2011 GRASS Development Team