[GRASS-SVN] r44215 - grass/branches/develbranch_6/vector/v.select
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Nov 7 11:07:04 EST 2010
Author: martinl
Date: 2010-11-07 08:07:04 -0800 (Sun, 07 Nov 2010)
New Revision: 44215
Modified:
grass/branches/develbranch_6/vector/v.select/args.c
grass/branches/develbranch_6/vector/v.select/main.c
grass/branches/develbranch_6/vector/v.select/proto.h
Log:
v.select: don't skip features without category implemeneted as a flag
(merge r44036 from trunk)
Modified: grass/branches/develbranch_6/vector/v.select/args.c
===================================================================
--- grass/branches/develbranch_6/vector/v.select/args.c 2010-11-07 15:59:20 UTC (rev 44214)
+++ grass/branches/develbranch_6/vector/v.select/args.c 2010-11-07 16:07:04 UTC (rev 44215)
@@ -76,7 +76,11 @@
flag->table = G_define_flag();
flag->table->key = 't';
flag->table->description = _("Do not create attribute table");
-
+
+ flag->cat = G_define_flag();
+ flag->cat->key = 'c';
+ flag->cat->description = _("Do not skip features without category");
+
flag->reverse = G_define_flag();
flag->reverse->key = 'r';
flag->reverse->description = _("Reverse selection");
Modified: grass/branches/develbranch_6/vector/v.select/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.select/main.c 2010-11-07 15:59:20 UTC (rev 44214)
+++ grass/branches/develbranch_6/vector/v.select/main.c 2010-11-07 16:07:04 UTC (rev 44215)
@@ -6,7 +6,7 @@
* Glynn Clements <glynn gclements.plus.com>, Markus Neteler <neteler itc.it>
* Martin Landa <landa.martin gmail.com> (GEOS support)
* PURPOSE:
- * COPYRIGHT: (C) 2003-2009 by the GRASS Development Team
+ * COPYRIGHT: (C) 2003-2010 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
@@ -156,7 +156,7 @@
G_percent(aline, nalines, 2); /* must be before any continue */
/* Check category */
- if (Vect_get_line_cat(&(In[0]), aline, ifield[0]) < 0) {
+ if (!flag.cat->answer && Vect_get_line_cat(&(In[0]), aline, ifield[0]) < 0) {
nskipped++;
continue;
}
@@ -199,7 +199,7 @@
G_debug(3, " bline = %d", bline);
/* Check category */
- if (!Vect_get_line_cat(&(In[1]), bline, ifield[1]) < 0) {
+ if (!flag.cat->answer && Vect_get_line_cat(&(In[1]), bline, ifield[1]) < 0) {
nskipped++;
continue;
}
@@ -312,7 +312,7 @@
bline = List->value[i];
- if (Vect_get_line_cat(&(In[1]), bline, ifield[1]) < 0) {
+ if (!flag.cat->answer && Vect_get_line_cat(&(In[1]), bline, ifield[1]) < 0) {
nskipped++;
continue;
}
Modified: grass/branches/develbranch_6/vector/v.select/proto.h
===================================================================
--- grass/branches/develbranch_6/vector/v.select/proto.h 2010-11-07 15:59:20 UTC (rev 44214)
+++ grass/branches/develbranch_6/vector/v.select/proto.h 2010-11-07 16:07:04 UTC (rev 44215)
@@ -16,7 +16,7 @@
*operator, *relate;
};
struct GFlag {
- struct Flag *table, *reverse, *geos;
+ struct Flag *table, *reverse, *geos, *cat;
};
/* args.c */
More information about the grass-commit
mailing list