[GRASS-SVN] r39805 - grass/trunk/vector/v.db.select

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Nov 26 13:36:57 EST 2009


Author: martinl
Date: 2009-11-26 13:36:56 -0500 (Thu, 26 Nov 2009)
New Revision: 39805

Modified:
   grass/trunk/vector/v.db.select/main.c
Log:
v.db.select: fix '-r' for OGR support 


Modified: grass/trunk/vector/v.db.select/main.c
===================================================================
--- grass/trunk/vector/v.db.select/main.c	2009-11-26 18:31:05 UTC (rev 39804)
+++ grass/trunk/vector/v.db.select/main.c	2009-11-26 18:36:56 UTC (rev 39805)
@@ -10,10 +10,9 @@
  *               
  * COPYRIGHT:    (C) 2005-2009 by the GRASS Development Team
  *
- *               This program is free software under the 
- *               GNU General Public License (>=v2). 
- *               Read the file COPYING that comes with GRASS
- *               for details.
+ *               This program is free software under the GNU General
+ *               Public License (>=v2). Read the file COPYING that
+ *               comes with GRASS for details.
  *
  **************************************************************/
 
@@ -229,7 +228,7 @@
 	if (r_flag->answer) {
 	    /* get minimal region extent */
 	    /* TODO: support layer name */
-	    Vect_cidx_find_all(&Map, atoi(field_opt->answer), -1, cat, list_lines);
+	    Vect_cidx_find_all(&Map, Vect_get_field_number(&Map, field_opt->answer), -1, cat, list_lines);
 	    for (i = 0; i < list_lines->n_values; i++) {
 		line = list_lines->value[i];
 		area = Vect_get_centroid_area(&Map, line);



More information about the grass-commit mailing list