[GRASS-SVN] r43510 - grass/branches/releasebranch_6_4/imagery/i.pca

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 18 12:15:16 EDT 2010


Author: neteler
Date: 2010-09-18 16:15:16 +0000 (Sat, 18 Sep 2010)
New Revision: 43510

Modified:
   grass/branches/releasebranch_6_4/imagery/i.pca/main.c
Log:
backport: verbose messages

Modified: grass/branches/releasebranch_6_4/imagery/i.pca/main.c
===================================================================
--- grass/branches/releasebranch_6_4/imagery/i.pca/main.c	2010-09-18 16:12:09 UTC (rev 43509)
+++ grass/branches/releasebranch_6_4/imagery/i.pca/main.c	2010-09-18 16:15:16 UTC (rev 43510)
@@ -248,12 +248,11 @@
 	if ((rowbuf = G_allocate_raster_buf(maptype)) == NULL)
 	    G_fatal_error(_("Unable allocate memory for row buffer"));
 
-	G_verbose_message(_("Computing means for band %d..."), i + 1);
+	G_message(_("Computing means for band %d..."), i + 1);
 	for (row = 0; row < rows; row++) {
 	    void *ptr = rowbuf;
 
-	    if(G_verbose() > G_verbose_std())
-		G_percent(row, rows - 1, 2);
+	    G_percent(row, rows - 1, 2);
 
 	    if (G_get_raster_row(fds[i], rowbuf, row, maptype) < 0)
 		G_fatal_error(_("Unable to read raster map row %d"), row);
@@ -298,13 +297,12 @@
 	if ((rowbuf1 = G_allocate_raster_buf(maptype)) == NULL)
 	    G_fatal_error(_("Unable allocate memory for row buffer"));
 
-	G_verbose_message(_("Computing row %d of covariance matrix..."),
-			  j + 1);
+	G_message(_("Computing row %d (of %d) of covariance matrix..."),
+		  j + 1, bands);
 	for (row = 0; row < rows; row++) {
 	    void *ptr1, *ptr2;
 
-	    if(G_verbose() > G_verbose_std())
-		G_percent(row, rows - 1, 2);
+	    G_percent(row, rows - 1, 2);
 
 	    if (G_get_raster_row(fds[j], rowbuf1, row, maptype) < 0)
 		G_fatal_error(_("Unable to read raster map row %d"), row);
@@ -387,7 +385,7 @@
 
 	sprintf(name, "%s.%d", out_basename, i + 1);
 
-	G_verbose_message(_("Transforming <%s>..."), name);
+	G_message(_("Transforming <%s>..."), name);
 
 	/* open a new file for output */
 	if (scale)
@@ -406,7 +404,7 @@
 	    int row, col;
 
 	    if (scale && (pass == PASSES)) {
-		G_verbose_message(_("Rescaling <%s> to range %d,%d..."),
+		G_message(_("Rescaling <%s> to range %d,%d..."),
 			  name, scale_min, scale_max);
 
 		old_range = max - min;
@@ -416,8 +414,7 @@
 	    for (row = 0; row < rows; row++) {
 		void *rowptr;
 
-		if(G_verbose() > G_verbose_std())
-		    G_percent(row, rows, 2);
+		G_percent(row, rows, 2);
 
 		/* reset d_buf */
 		for (col = 0; col < cols; col++)
@@ -519,8 +516,7 @@
 		}
 	    }
 
-	    if(G_verbose() > G_verbose_std())
-		G_percent(row, rows, 2);
+	    G_percent(row, rows, 2);
 
 	    /* close output file */
 	    if (pass == PASSES)



More information about the grass-commit mailing list