[GRASS-SVN] r39852 - grass/branches/releasebranch_6_4/scripts/v.what.vect

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Nov 29 05:12:00 EST 2009

Author: neteler
Date: 2009-11-29 05:12:00 -0500 (Sun, 29 Nov 2009)
New Revision: 39852

works also with polygon maps

Modified: grass/branches/releasebranch_6_4/scripts/v.what.vect/description.html
--- grass/branches/releasebranch_6_4/scripts/v.what.vect/description.html	2009-11-29 06:10:46 UTC (rev 39851)
+++ grass/branches/releasebranch_6_4/scripts/v.what.vect/description.html	2009-11-29 10:12:00 UTC (rev 39852)
@@ -9,15 +9,19 @@
 The upload <b>column</b>, into which the query results are stored, must be
 present in the <b>vector</b> map. Use <em>v.db.addcol</em> to add one if needed.
-Use dmax parameter to control query distance tolerance (how far points can be from 
-<b>qvector</b> features). For more options, use
+Use dmax parameter to control query distance tolerance (how far points/centroids
+can be from <b>qvector</b> features). For more options, use
 <em>v.distance</em> instead.
 In case of a multipoint input <b>vector</b> 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 <b>qvector</b> polygons.
+When transferring attributes from a point map to a polygon map, usually <b>dmax</b>
+has to be larger than zero (determined by distance between query points and
+polygon centroids).
 In this example, the 'archsites' point map in the Spearfish location is copied
 to the current mapset, a new attribute column is added and the owner
@@ -31,8 +35,27 @@
 # verification:
 v.db.select myarchsites
+In this example, city names, population data and more from
+<a href="http://download.geonames.org/export/dump/">Geonames.org country files</a> 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:
+<div class="code"><pre>
+# 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
 <h2>SEE ALSO</h2>

Modified: grass/branches/releasebranch_6_4/scripts/v.what.vect/v.what.vect
--- grass/branches/releasebranch_6_4/scripts/v.what.vect/v.what.vect	2009-11-29 06:10:46 UTC (rev 39851)
+++ grass/branches/releasebranch_6_4/scripts/v.what.vect/v.what.vect	2009-11-29 10:12:00 UTC (rev 39852)
@@ -4,7 +4,7 @@
 # MODULE:       v.what.vect
 # AUTHOR(S):    Markus Neteler
-# PURPOSE:      Uploads attributes at the location of vector points to the table.
+# PURPOSE:      Uploads attributes at the location of vector points/centroid to the table.
 # COPYRIGHT:    (C) 2005 by the GRASS Development Team
 #               This program is free software under the GNU General Public
@@ -23,7 +23,7 @@
 #% type: string
 #% key_desc: name
 #% gisprompt: old,vector,vector
-#% description: Points vector map to modify
+#% description: Vector map to modify
 #% required : yes

More information about the grass-commit mailing list