[GRASS-SVN] r51508 - grass/trunk/vector/v.select
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Apr 24 03:35:21 EDT 2012
Author: mmetz
Date: 2012-04-24 00:35:20 -0700 (Tue, 24 Apr 2012)
New Revision: 51508
Modified:
grass/trunk/vector/v.select/main.c
Log:
v.select: GEOS is optional
Modified: grass/trunk/vector/v.select/main.c
===================================================================
--- grass/trunk/vector/v.select/main.c 2012-04-23 22:32:37 UTC (rev 51507)
+++ grass/trunk/vector/v.select/main.c 2012-04-24 07:35:20 UTC (rev 51508)
@@ -82,11 +82,17 @@
else
G_fatal_error(_("Unknown operator '%s'"), parm.operator->answer);
+#ifdef HAVE_GEOS
if (operator == OP_RELATE && !parm.relate->answer) {
G_fatal_error(_("Required parameter <%s> not set"),
parm.relate->key);
}
-
+#else
+ if (operator != OP_OVERLAP) {
+ G_warning(_("Operator can only be 'overlap'"));
+ operator = OP_OVERLAP;
+ }
+#endif
for (iopt = 0; iopt < 2; iopt++) {
itype[iopt] = Vect_option_to_types(parm.type[iopt]);
@@ -113,11 +119,19 @@
Vect_hist_command(&Out);
/* Select features */
+#ifdef HAVE_GEOS
nskipped = select_lines(&(In[0]), itype[0], ifield[0],
&(In[1]), itype[1], ifield[1],
flag.cat->answer ? 1 : 0, operator,
parm.relate->answer,
ALines);
+#else
+ nskipped = select_lines(&(In[0]), itype[0], ifield[0],
+ &(In[1]), itype[1], ifield[1],
+ flag.cat->answer ? 1 : 0, operator,
+ NULL,
+ ALines);
+#endif
Vect_close(&(In[1]));
More information about the grass-commit
mailing list