[GRASS-SVN] r48104 - grass/trunk/scripts/v.what.vect

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Sep 4 06:12:42 EDT 2011


Author: neteler
Date: 2011-09-04 03:12:42 -0700 (Sun, 04 Sep 2011)
New Revision: 48104

Modified:
   grass/trunk/scripts/v.what.vect/v.what.vect.html
   grass/trunk/scripts/v.what.vect/v.what.vect.py
Log:
fix broken script; added NC example

Modified: grass/trunk/scripts/v.what.vect/v.what.vect.html
===================================================================
--- grass/trunk/scripts/v.what.vect/v.what.vect.html	2011-09-04 09:45:43 UTC (rev 48103)
+++ grass/trunk/scripts/v.what.vect/v.what.vect.html	2011-09-04 10:12:42 UTC (rev 48104)
@@ -29,11 +29,11 @@
 map at points' locations:
 
 <div class="code"><pre>
-g.copy vect=archsites,myarchsites
-v.db.addcolumn myarchsites col="owner varchar(25)"
-v.what.vect myarchsites qvect=fields column=owner qcolumn=label
+g.copy vect=hospitals,myhospitals
+v.db.addcolumn myhospitals column="urb_name varchar(25)"
+v.what.vect myhospitals qmap=urbanarea column=urb_name qcolumn=NAME
 # verification:
-v.db.select myarchsites
+v.db.select myhospitals
 </pre></div>
 <P>
 
@@ -48,10 +48,10 @@
 # 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"
+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 qvect=geonames_IT_cities col=gnameid \
-            qcol=geonameid dmax=3000
+v.what.vect corine_code111_112_cities qmap=geonames_IT_cities column=gnameid \
+            qcolumn=geonameid dmax=3000
 # now gnameid can be used for v.db.join to join further
 # attributes in from Geonames.org
 </pre></div>

Modified: grass/trunk/scripts/v.what.vect/v.what.vect.py
===================================================================
--- grass/trunk/scripts/v.what.vect/v.what.vect.py	2011-09-04 09:45:43 UTC (rev 48103)
+++ grass/trunk/scripts/v.what.vect/v.what.vect.py	2011-09-04 10:12:42 UTC (rev 48104)
@@ -55,8 +55,8 @@
 def main():
     grass.exec_command(
 	"v.distance",
-	_from = options['vector'],
-	to = options['qvector'],
+	_from = options['map'],
+	to = options['qmap'],
 	column = options['column'],
 	to_column = options['qcolumn'],
 	upload = "to_attr",



More information about the grass-commit mailing list