[GRASS-SVN] r72294 - in grass/branches/releasebranch_7_4: raster/r.external raster/r.in.gdal vector/v.external vector/v.in.ogr

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Mar 2 01:24:37 PST 2018


Author: martinl
Date: 2018-03-02 01:24:37 -0800 (Fri, 02 Mar 2018)
New Revision: 72294

Modified:
   grass/branches/releasebranch_7_4/raster/r.external/proj.c
   grass/branches/releasebranch_7_4/raster/r.in.gdal/proj.c
   grass/branches/releasebranch_7_4/vector/v.external/proj.c
   grass/branches/releasebranch_7_4/vector/v.in.ogr/proj.c
Log:
r.in.gdal: print only proj comparision when -j flag is given (r.in.gdal -j is mostly used in scripts)
r.in.gdal/r.external/v.in.ogr/v.external: sync projection check
           (merge r72255, r72258 from trunk)


Modified: grass/branches/releasebranch_7_4/raster/r.external/proj.c
===================================================================
--- grass/branches/releasebranch_7_4/raster/r.external/proj.c	2018-03-02 08:30:17 UTC (rev 72293)
+++ grass/branches/releasebranch_7_4/raster/r.external/proj.c	2018-03-02 09:24:37 UTC (rev 72294)
@@ -232,19 +232,21 @@
 				proj_units->value[i_value]);
 		}
 	    }
-	    strcat(error_msg,
-		   _("\nIn case of no significant differences in the projection definitions,"
-		     " use the -o flag to ignore them and use"
-		     " current location definition.\n"));
-	    strcat(error_msg,
-		   _("Consider generating a new location from the input dataset using "
-		    "the 'location' parameter.\n"));
+            if (!check_only) {
+		strcat(error_msg,
+		       _("\nIn case of no significant differences in the projection definitions,"
+			 " use the -o flag to ignore them and use"
+			 " current location definition.\n"));
+		strcat(error_msg,
+		       _("Consider generating a new location from the input dataset using "
+			"the 'location' parameter.\n"));
+	    }
 
 	    if (check_only)
 		msg_fn = G_warning;
 	    else
 		msg_fn = G_fatal_error;
-	    msg_fn(error_msg);
+	    msg_fn("%s", error_msg);
 	    if (check_only) {
 		GDALClose(hDS);
 		exit(EXIT_FAILURE);

Modified: grass/branches/releasebranch_7_4/raster/r.in.gdal/proj.c
===================================================================
--- grass/branches/releasebranch_7_4/raster/r.in.gdal/proj.c	2018-03-02 08:30:17 UTC (rev 72293)
+++ grass/branches/releasebranch_7_4/raster/r.in.gdal/proj.c	2018-03-02 09:24:37 UTC (rev 72294)
@@ -232,19 +232,21 @@
 				proj_units->value[i_value]);
 		}
 	    }
-	    strcat(error_msg,
-		   _("\nIn case of no significant differences in the projection definitions,"
-		     " use the -o flag to ignore them and use"
-		     " current location definition.\n"));
-	    strcat(error_msg,
-		   _("Consider generating a new location from the input dataset using "
-		    "the 'location' parameter.\n"));
-
+            if (!check_only) {
+                strcat(error_msg,
+                       _("\nIn case of no significant differences in the projection definitions,"
+                         " use the -o flag to ignore them and use"
+                         " current location definition.\n"));
+                strcat(error_msg,
+                       _("Consider generating a new location from the input dataset using "
+                         "the 'location' parameter.\n"));
+            }
+            
 	    if (check_only)
 		msg_fn = G_warning;
 	    else
 		msg_fn = G_fatal_error;
-	    msg_fn(error_msg);
+	    msg_fn("%s", error_msg);
 	    if (check_only) {
 		GDALClose(hDS);
 		exit(EXIT_FAILURE);

Modified: grass/branches/releasebranch_7_4/vector/v.external/proj.c
===================================================================
--- grass/branches/releasebranch_7_4/vector/v.external/proj.c	2018-03-02 08:30:17 UTC (rev 72293)
+++ grass/branches/releasebranch_7_4/vector/v.external/proj.c	2018-03-02 09:24:37 UTC (rev 72294)
@@ -324,19 +324,21 @@
 				proj_units->value[i_value]);
 		}
 	    }
-	    strcat(error_msg,
-		   _("\nIn case of no significant differences in the projection definitions,"
-		     " use the -o flag to ignore them and use"
-		     " current location definition.\n"));
-	    strcat(error_msg,
-		   _("Consider generating a new location from the input dataset using "
-		    "the 'location' parameter.\n"));
+            if (!check_only) {
+		strcat(error_msg,
+		       _("\nIn case of no significant differences in the projection definitions,"
+			 " use the -o flag to ignore them and use"
+			 " current location definition.\n"));
+		strcat(error_msg,
+		       _("Consider generating a new location from the input dataset using "
+			"the 'location' parameter.\n"));
+	    }
 
 	    if (check_only)
 		msg_fn = G_warning;
 	    else
 		msg_fn = G_fatal_error;
-	    msg_fn(error_msg);
+	    msg_fn("%s", error_msg);
 	    if (check_only) {
 		ds_close(hDS);
 		exit(EXIT_FAILURE);

Modified: grass/branches/releasebranch_7_4/vector/v.in.ogr/proj.c
===================================================================
--- grass/branches/releasebranch_7_4/vector/v.in.ogr/proj.c	2018-03-02 08:30:17 UTC (rev 72293)
+++ grass/branches/releasebranch_7_4/vector/v.in.ogr/proj.c	2018-03-02 09:24:37 UTC (rev 72294)
@@ -423,19 +423,21 @@
 				proj_units->value[i_value]);
 		}
 	    }
-	    strcat(error_msg,
-		   _("\nIn case of no significant differences in the projection definitions,"
-		     " use the -o flag to ignore them and use"
-		     " current location definition.\n"));
-	    strcat(error_msg,
-		   _("Consider generating a new location from the input dataset using "
-		    "the 'location' parameter.\n"));
+            if (!check_only) {
+		strcat(error_msg,
+		       _("\nIn case of no significant differences in the projection definitions,"
+			 " use the -o flag to ignore them and use"
+			 " current location definition.\n"));
+		strcat(error_msg,
+		       _("Consider generating a new location from the input dataset using "
+			"the 'location' parameter.\n"));
+	    }
 
 	    if (check_only)
 		msg_fn = G_warning;
 	    else
 		msg_fn = G_fatal_error;
-	    msg_fn(error_msg);
+	    msg_fn("%s", error_msg);
 	    if (check_only) {
 		ds_close(hDS);
 		exit(EXIT_FAILURE);



More information about the grass-commit mailing list