[GRASS-SVN] r39581 - grass/branches/develbranch_6/imagery/i.pca

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 19 06:01:53 EDT 2009


Author: martinl
Date: 2009-10-19 06:01:52 -0400 (Mon, 19 Oct 2009)
New Revision: 39581

Modified:
   grass/branches/develbranch_6/imagery/i.pca/main.c
Log:
i.pca: be more verbose on std level


Modified: grass/branches/develbranch_6/imagery/i.pca/main.c
===================================================================
--- grass/branches/develbranch_6/imagery/i.pca/main.c	2009-10-19 08:55:31 UTC (rev 39580)
+++ grass/branches/develbranch_6/imagery/i.pca/main.c	2009-10-19 10:01:52 UTC (rev 39581)
@@ -245,12 +245,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);
@@ -295,13 +294,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);
@@ -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