Jelajahi Sumber

r.ros: remove unnecessary checks which caused crash when using spotting, fix label, remove unused variable (merge from trunk, https://trac.osgeo.org/grass/changeset/64541, https://trac.osgeo.org/grass/changeset/64542)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@64600 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 tahun lalu
induk
melakukan
ae3d0f61ea
1 mengubah file dengan 6 tambahan dan 25 penghapusan
  1. 6 25
      raster/r.ros/main.c

+ 6 - 25
raster/r.ros/main.c

@@ -202,7 +202,6 @@ int main(int argc, char *argv[])
     } parm;
 
     /* please, remove before GRASS 7 released */
-    struct Flag *flag_s;
     struct GModule *module;
 
     /* initialize access to database and create temporary files */
@@ -273,8 +272,8 @@ int main(int argc, char *argv[])
     parm.vel = G_define_standard_option(G_OPT_R_INPUT);
     parm.vel->key = "velocity";
     parm.vel->required = NO;
-    parm.vel->description =
-	_("Raster map containing midflame wind velocitys (ft/min)");
+    parm.vel->label =
+	_("Raster map containing midflame wind velocities (ft/min)");
     parm.vel->description =
 	_("Name of an existing raster map layer in the user's "
 	  "current mapset search path containing wind velocities at half of the average "
@@ -351,7 +350,7 @@ int main(int argc, char *argv[])
     parm.spotdist->label =
 	_("Output raster map containing maximal spotting distance (m)");
     parm.spotdist->description =
-	_("The maximal potential spotting distance raster will be also generated"
+	_("The maximal potential spotting distance"
 	  " (requires elevation raster map to be provided).");
 
     /*   Parse command line */
@@ -449,27 +448,9 @@ int main(int argc, char *argv[])
     name_max = parm.max->answer;
     name_maxdir = parm.maxdir->answer;
 
-    /*check if the output layer names EXIST */
-    if (G_check_overwrite(argc, argv) == 0) {
-	if (G_find_raster2(name_base, G_mapset()))
-	    G_fatal_error(_("Raster map <%s> already exists in mapset <%s>"),
-			  name_base, G_mapset());
-	
-	if (G_find_raster2(name_max, G_mapset()))
-	    G_fatal_error(_("Raster map <%s> already exists in mapset <%s>"),
-			  name_max, G_mapset());
-	
-	if (G_find_raster2(name_maxdir, G_mapset()))
-	    G_fatal_error(_("Raster map <%s> already exists in mapset <%s>"),
-			  name_maxdir, G_mapset());
-	
-	/*assign a name to output SPOTTING distance layer */
-	if (spotting) {
-	    name_spotdist = parm.spotdist->answer;
-	    if (G_find_raster2(name_spotdist, G_mapset()))
-		G_fatal_error(_("Raster map <%s> already exists in mapset <%s>"),
-			      name_spotdist, G_mapset());
-	}
+    /*assign a name to output SPOTTING distance layer */
+    if (spotting) {
+        name_spotdist = parm.spotdist->answer;
     }
 
     /*  Get database window parameters  */