[GRASS-SVN] r59277 - grass/trunk/vector/v.overlay

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Mar 17 10:38:14 PDT 2014


Author: martinl
Date: 2014-03-17 10:38:14 -0700 (Mon, 17 Mar 2014)
New Revision: 59277

Modified:
   grass/trunk/vector/v.overlay/main.c
Log:
v.overlay: fix `atype=auto` for area type


Modified: grass/trunk/vector/v.overlay/main.c
===================================================================
--- grass/trunk/vector/v.overlay/main.c	2014-03-17 17:08:16 UTC (rev 59276)
+++ grass/trunk/vector/v.overlay/main.c	2014-03-17 17:38:14 UTC (rev 59277)
@@ -182,9 +182,12 @@
         if (type[0] == -1)
             G_fatal_error(_("Unable to determine feature type for <%s>"),
                           in_opt[0]->key);
+        if (type[0] & (GV_BOUNDARY | GV_CENTROID))
+            type[0] = GV_AREA;
+               
         if (!(type[0] & (GV_LINE | GV_AREA)))
-            G_fatal_error(_("Invalid feature type for <%s>. Only '%s' or '%s' supported."),
-                          in_opt[0]->key, "line", "area");
+            G_fatal_error(_("Invalid feature type (%d) for <%s>. Only '%s' or '%s' supported."),
+                          type[0], in_opt[0]->key, "line", "area");
         G_debug(1, "auto -> atype=%d", type[0]);
     }
 



More information about the grass-commit mailing list