Browse Source

v.in.lidar: improve no import handling

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48579 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 13 năm trước cách đây
mục cha
commit
1803c89087
1 tập tin đã thay đổi với 12 bổ sung11 xóa
  1. 12 11
      vector/v.in.lidar/main.c

+ 12 - 11
vector/v.in.lidar/main.c

@@ -217,6 +217,7 @@ int main(int argc, char *argv[])
     no_import_flag->description =
 	_("Create the location specified by the \"location\" parameter and exit."
           " Do not import the vector file.");
+    no_import_flag->suppress_required = YES;
 
     notopo_flag = G_define_flag();
     notopo_flag->key = 'b';
@@ -266,17 +267,6 @@ int main(int argc, char *argv[])
 	exit(EXIT_SUCCESS);
     }
 
-    if (!outloc_opt->answer) {	/* Check if the map exists */
-	if (G_find_vector2(out_opt->answer, G_mapset())) {
-	    if (overwrite)
-		G_warning(_("Vector map <%s> already exists and will be overwritten"),
-			  out_opt->answer);
-	    else
-		G_fatal_error(_("Vector map <%s> already exists"),
-			      out_opt->answer);
-	}
-    }
-
     return_filter = LAS_ALL;
     if (filter_opt->answer) {
 	if (strcmp(filter_opt->answer, "first") == 0)
@@ -478,6 +468,17 @@ int main(int argc, char *argv[])
     db_init_string(&sql);
     db_init_string(&strval);
 
+    if (!outloc_opt->answer) {	/* Check if the map exists */
+	if (G_find_vector2(out_opt->answer, G_mapset())) {
+	    if (overwrite)
+		G_warning(_("Vector map <%s> already exists and will be overwritten"),
+			  out_opt->answer);
+	    else
+		G_fatal_error(_("Vector map <%s> already exists"),
+			      out_opt->answer);
+	}
+    }
+
     /* open output vector */
     sprintf(buf, "%s", out_opt->answer);
     /* strip any @mapset from vector output name */