[GRASS-SVN] r39582 - grass/trunk/imagery/i.pca

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 19 06:05:23 EDT 2009


Author: martinl
Date: 2009-10-19 06:05:23 -0400 (Mon, 19 Oct 2009)
New Revision: 39582

Modified:
   grass/trunk/imagery/i.pca/main.c
Log:
i.pca: be more verbose on std level
       (merge r39581 from devbr6)


Modified: grass/trunk/imagery/i.pca/main.c
===================================================================
--- grass/trunk/imagery/i.pca/main.c	2009-10-19 10:01:52 UTC (rev 39581)
+++ grass/trunk/imagery/i.pca/main.c	2009-10-19 10:05:23 UTC (rev 39582)
@@ -245,12 +245,11 @@
 	if ((rowbuf = Rast_allocate_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 (Rast_get_row(fds[i], rowbuf, row, maptype) < 0)
 		G_fatal_error(_("Unable to read raster map row %d"), row);
@@ -295,13 +294,12 @@
 	if ((rowbuf1 = Rast_allocate_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 (Rast_get_row(fds[j], rowbuf1, row, maptype) < 0)
 		G_fatal_error(_("Unable to read raster map row %d"), row);
@@ -384,7 +382,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)
@@ -403,7 +401,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;
@@ -413,8 +411,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++)
@@ -516,8 +513,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