Browse Source

v.overlay: fix `atype=auto` for area type

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59277 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 11 years ago
parent
commit
e9d9cb07d4
1 changed files with 5 additions and 2 deletions
  1. 5 2
      vector/v.overlay/main.c

+ 5 - 2
vector/v.overlay/main.c

@@ -182,9 +182,12 @@ int main(int argc, char *argv[])
         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]);
     }