Преглед на файлове

v.db.select: fix '-r' for OGR support

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@39805 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa преди 15 години
родител
ревизия
12bf1114bf
променени са 1 файла, в които са добавени 4 реда и са изтрити 5 реда
  1. 4 5
      vector/v.db.select/main.c

+ 4 - 5
vector/v.db.select/main.c

@@ -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 @@ int main(int argc, char **argv)
 	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);