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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Dec 16 09:54:28 EST 2008


Author: glynn
Date: 2008-12-16 09:54:28 -0500 (Tue, 16 Dec 2008)
New Revision: 34914

Modified:
   grass/trunk/raster/r.out.gdal/export_band.c
   grass/trunk/raster/r.out.gdal/main.c
Log:
Indent


Modified: grass/trunk/raster/r.out.gdal/export_band.c
===================================================================
--- grass/trunk/raster/r.out.gdal/export_band.c	2008-12-16 14:33:27 UTC (rev 34913)
+++ grass/trunk/raster/r.out.gdal/export_band.c	2008-12-16 14:54:28 UTC (rev 34914)
@@ -1,3 +1,4 @@
+
 /****************************************************************************
 *
 * MODULE:       r.out.gdal
@@ -62,8 +63,8 @@
 	G_get_fp_range_min_max(&sRange, &dfCellMin, &dfCellMax);
     }
 
-/* TODO: if data range exceeds export TYPE range exit with an error.
-   Otherwise the module doesn't know what to write for those values */
+    /* TODO: if data range exceeds export TYPE range exit with an error.
+       Otherwise the module doesn't know what to write for those values */
 
     /* suppress useless warnings */
     CPLPushErrorHandler(CPLQuietErrorHandler);
@@ -106,22 +107,23 @@
 	G_debug(3, "dfCellMin: %f, dfCellMax: %f, maxcolor: %d", dfCellMin,
 		dfCellMax, maxcolor);
 
-	if(!suppress_main_colortable) {
+	if (!suppress_main_colortable) {
 	    hCT = GDALCreateColorTable(GPI_RGB);
 
 	    for (iColor = 0; iColor <= maxcolor; iColor++) {
 		int nRed, nGreen, nBlue;
 		GDALColorEntry sColor;
 
-		if (G_get_color(iColor, &nRed, &nGreen, &nBlue, &sGrassColors)) {
+		if (G_get_color
+		    (iColor, &nRed, &nGreen, &nBlue, &sGrassColors)) {
 		    sColor.c1 = nRed;
 		    sColor.c2 = nGreen;
 		    sColor.c3 = nBlue;
 		    sColor.c4 = 255;
 
 		    G_debug(3,
-			"G_get_color: Y, rcount %d, nRed %d, nGreen %d, nBlue %d",
-			rcount, nRed, nGreen, nBlue);
+			    "G_get_color: Y, rcount %d, nRed %d, nGreen %d, nBlue %d",
+			    rcount, nRed, nGreen, nBlue);
 		    GDALSetColorEntry(hCT, iColor, &sColor);
 		}
 		else {
@@ -131,8 +133,8 @@
 		    sColor.c4 = 0;
 
 		    G_debug(3,
-			"G_get_color: N, rcount %d, nRed %d, nGreen %d, nBlue %d",
-			rcount, nRed, nGreen, nBlue);
+			    "G_get_color: N, rcount %d, nRed %d, nGreen %d, nBlue %d",
+			    rcount, nRed, nGreen, nBlue);
 		    GDALSetColorEntry(hCT, iColor, &sColor);
 		}
 	    }
@@ -160,11 +162,11 @@
 	    GDALSetMetadataItem(hBand, key, value, NULL);
 	}
 
-	if(!suppress_main_colortable)
+	if (!suppress_main_colortable)
 	    GDALSetRasterColorTable(hBand, hCT);
     }
     else {
-	if(!suppress_main_colortable) {
+	if (!suppress_main_colortable) {
 	    hCT = GDALCreateColorTable(GPI_RGB);
 	    GDALSetMetadataItem(hBand, "COLOR_TABLE_RULES_COUNT", "0", NULL);
 	    GDALSetRasterColorTable(hBand, hCT);
@@ -284,7 +286,7 @@
 	}
     }
 
-    if (n_nulls > 0) {  /* TODO: && nodata_param NOT specified */
+    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. "

Modified: grass/trunk/raster/r.out.gdal/main.c
===================================================================
--- grass/trunk/raster/r.out.gdal/main.c	2008-12-16 14:33:27 UTC (rev 34913)
+++ grass/trunk/raster/r.out.gdal/main.c	2008-12-16 14:54:28 UTC (rev 34914)
@@ -189,8 +189,7 @@
     metaopt = G_define_option();
     metaopt->key = "metaopt";
     metaopt->type = TYPE_STRING;
-    metaopt->label =
-	_("Metadata key(s) and value(s) to include");
+    metaopt->label = _("Metadata key(s) and value(s) to include");
     metaopt->description =
 	_("In the form of \"META-TAG=VALUE\", separate multiple entries "
 	  "with a comma. Not supported by all output format drivers.");
@@ -376,7 +375,7 @@
 		    nodataval = (double)(short)0x8000;
 		}
 		else {
-		    datatype = GDT_Int32;  /* need to fine tune this more? */
+		    datatype = GDT_Int32;	/* need to fine tune this more? */
 		    nodataval = (double)(int)0x80000000;
 		}
 	    }
@@ -388,10 +387,10 @@
 	nodataval = atof(nodataopt->answer);
     }
 
-/* TODO:
-    if( nodata_used && nodataval is out_of_type_range )
-	G_fatal_error(_("No-data value out of range for type %s"), type->answer);
-*/
+    /* TODO:
+       if( nodata_used && nodataval is out_of_type_range )
+       G_fatal_error(_("No-data value out of range for type %s"), type->answer);
+     */
 
     G_debug(3, "Input map datatype=%s\n",
 	    (maptype == CELL_TYPE ? "CELL" :
@@ -472,7 +471,8 @@
 	}
 	if (export_band
 	    (hCurrDS, band + 1, ref.file[band].name, ref.file[band].mapset,
-	     &cellhead, maptype, nodataval, nodataopt->key, flag_c->answer) < 0)
+	     &cellhead, maptype, nodataval, nodataopt->key,
+	     flag_c->answer) < 0)
 	    G_warning(_("Unable to export raster map <%s>"),
 		      ref.file[band].name);
     }



More information about the grass-commit mailing list