[GRASS-SVN] r33987 - grass/trunk/raster/r.out.gdal

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 23 02:47:03 EDT 2008


Author: hamish
Date: 2008-10-23 02:47:03 -0400 (Thu, 23 Oct 2008)
New Revision: 33987

Modified:
   grass/trunk/raster/r.out.gdal/main.c
Log:
user specified nodata was being clobbered by default if type= was not given; missing space in warning msg (merge from devbr6)

Modified: grass/trunk/raster/r.out.gdal/main.c
===================================================================
--- grass/trunk/raster/r.out.gdal/main.c	2008-10-23 06:43:20 UTC (rev 33986)
+++ grass/trunk/raster/r.out.gdal/main.c	2008-10-23 06:47:03 UTC (rev 33987)
@@ -334,15 +334,15 @@
 	}
     }
 
-    if (n_nulls > 0) {
+    if (n_nulls > 0) {  /* TODO: && nodata_param NOT specified */
 	if (maptype == CELL_TYPE)
 	    G_warning(_("Input raster map contains cells with NULL-value (no-data). "
-		       "The value %d was used to represent no-data values in the input map."
+		       "The value %d was used to represent no-data values in the input map. "
 		       "You can specify nodata value by %s parameter."),
 		      (int)nodataval, nodatakey);
 	else
 	    G_warning(_("Input raster map contains cells with NULL-value (no-data). "
-		       "The value %g was used to represent no-data values in the input map."
+		       "The value %g was used to represent no-data values in the input map. "
 		       "You can specify nodata value by %s parameter."),
 		      nodataval, nodatakey);
     }
@@ -599,11 +599,6 @@
 	}
     }
 
-    /* force nodata-value if needed */
-    if (nodataopt->answer) {
-	nodataval = atof(nodataopt->answer);
-    }
-
     /* If file type not set by user ... */
     /* Get min/max values. */
     if (G_read_fp_range(ref.file[0].name, ref.file[0].mapset, &sRange) == -1) {
@@ -645,6 +640,11 @@
 	}
     }
 
+    /* force nodata-value if needed */
+    if (nodataopt->answer) {
+	nodataval = atof(nodataopt->answer);
+    }
+
     G_debug(3, "Input map datatype=%s\n",
 	    (maptype == CELL_TYPE ? "CELL" :
 	     (maptype == DCELL_TYPE ? "DCELL" :



More information about the grass-commit mailing list