[GRASS-SVN] r33986 - grass/branches/develbranch_6/raster/r.out.gdal

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 23 02:43:21 EDT 2008


Author: hamish
Date: 2008-10-23 02:43:20 -0400 (Thu, 23 Oct 2008)
New Revision: 33986

Modified:
   grass/branches/develbranch_6/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

Modified: grass/branches/develbranch_6/raster/r.out.gdal/main.c
===================================================================
--- grass/branches/develbranch_6/raster/r.out.gdal/main.c	2008-10-22 21:59:36 UTC (rev 33985)
+++ grass/branches/develbranch_6/raster/r.out.gdal/main.c	2008-10-23 06:43:20 UTC (rev 33986)
@@ -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