[GRASS-SVN] r31253 - grass/branches/develbranch_6/vector/v.db.select

svn_grass at osgeo.org svn_grass at osgeo.org
Mon May 5 05:02:57 EDT 2008


Author: neteler
Date: 2008-05-05 05:02:57 -0400 (Mon, 05 May 2008)
New Revision: 31253

Modified:
   grass/branches/develbranch_6/vector/v.db.select/description.html
   grass/branches/develbranch_6/vector/v.db.select/main.c
Log:
support for multiple columns

Modified: grass/branches/develbranch_6/vector/v.db.select/description.html
===================================================================
--- grass/branches/develbranch_6/vector/v.db.select/description.html	2008-05-05 08:14:07 UTC (rev 31252)
+++ grass/branches/develbranch_6/vector/v.db.select/description.html	2008-05-05 09:02:57 UTC (rev 31253)
@@ -1,9 +1,11 @@
 <h2>DESCRIPTION</h2>
 
-<em>v.db.select</em> prints attributes of a vector map.
+<em>v.db.select</em> prints attributes of a vector map from one or several
+user selected attribute table columns.
 
 <h2>EXAMPLE</h2>
 
+Select and show entire table:
 <div class="code"><pre>
 v.db.select roads
 cat|label
@@ -15,6 +17,20 @@
 5|unimproved road
 </pre></div>
 
+<p>
+Select and show single column from table (multiple columns can be specified as comma separated list):
+<div class="code"><pre>
+v.db.select roads col=label
+label
+no data
+interstate
+primary highway, hard surface
+secondary highway, hard surface
+light-duty road, improved surface
+unimproved road
+</pre></div>
+
+
 <h2>SEE ALSO</h2>
 
 <em><a HREF="db.select.html">db.select</a></em>

Modified: grass/branches/develbranch_6/vector/v.db.select/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.db.select/main.c	2008-05-05 08:14:07 UTC (rev 31252)
+++ grass/branches/develbranch_6/vector/v.db.select/main.c	2008-05-05 09:02:57 UTC (rev 31253)
@@ -49,9 +49,9 @@
     map_opt = G_define_standard_option(G_OPT_V_MAP);
     field_opt = G_define_standard_option(G_OPT_V_FIELD) ;
 
-    col_opt 		= G_define_standard_option(G_OPT_COLUMN);
+    col_opt 		= G_define_standard_option(G_OPT_COLUMNS);
 
-    where_opt = G_define_standard_option(G_OPT_WHERE);
+    where_opt           = G_define_standard_option(G_OPT_WHERE);
 
     fs_opt 		= G_define_standard_option(G_OPT_F_SEP);
     fs_opt->description = _("Output field separator");



More information about the grass-commit mailing list