Parcourir la source

v.out.ogr: enable creating empty OGR layers

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58393 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa il y a 11 ans
Parent
commit
8cd4290890
1 fichiers modifiés avec 3 ajouts et 8 suppressions
  1. 3 8
      vector/v.out.ogr/main.c

+ 3 - 8
vector/v.out.ogr/main.c

@@ -177,8 +177,9 @@ int main(int argc, char *argv[])
 		}
 		}
 	    }
 	    }
 
 
-	    if (num_types == 0)
-		G_fatal_error(_("Unable to determine input map's vector feature type(s)."));
+	    if (num_types == 0) {
+		G_warning(_("Unable to determine input map's vector feature type(s)."));
+            }
 	}
 	}
     }
     }
 
 
@@ -388,12 +389,6 @@ int main(int argc, char *argv[])
 
 
     G_debug(1, "Requested to export %d features", num_to_export);
     G_debug(1, "Requested to export %d features", num_to_export);
 
 
-    if (num_to_export < 1) {
-	G_warning(_("Nothing to export"));
-	exit(EXIT_SUCCESS);
-    }
-
-
     /* Open OGR DSN */
     /* Open OGR DSN */
     G_debug(2, "driver count = %d", OGRGetDriverCount());
     G_debug(2, "driver count = %d", OGRGetDriverCount());
     drn = -1;
     drn = -1;