[GRASS-SVN] r54378 - grass/trunk/raster/r.viewshed

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 23 12:00:46 PST 2012


Author: martinl
Date: 2012-12-23 12:00:42 -0800 (Sun, 23 Dec 2012)
New Revision: 54378

Modified:
   grass/trunk/raster/r.viewshed/grass.cpp
   grass/trunk/raster/r.viewshed/viewshed.cpp
Log:
r.viewshed: progress messages cosmetics


Modified: grass/trunk/raster/r.viewshed/grass.cpp
===================================================================
--- grass/trunk/raster/r.viewshed/grass.cpp	2012-12-23 14:53:55 UTC (rev 54377)
+++ grass/trunk/raster/r.viewshed/grass.cpp	2012-12-23 20:00:42 UTC (rev 54378)
@@ -127,7 +127,7 @@
     hd->ns_res = region->ns_res;
     //store the null value of the map
     Rast_set_null_value(&(hd->nodata_value), 1, G_SURFACE_TYPE);
-    G_message("Nodata value set to %f", hd->nodata_value);
+    G_verbose_message("Nodata value set to %f", hd->nodata_value);
     
     
     
@@ -616,7 +616,7 @@
 		   float (*fun) (float))
 {
 
-    G_message(_("Saving grid to <%s>"), filename);
+    G_important_message(_("Writing output raster map..."));
     assert(grid && filename);
 
     /*open the new raster  */
@@ -633,6 +633,7 @@
     dimensionType i, j;
 
     for (i = 0; i < Rast_window_rows(); i++) {
+        G_percent(i, Rast_window_rows(), 5);
 	for (j = 0; j < Rast_window_cols(); j++) {
 
 	    if (is_visible(grid->grid_data[i][j])) {
@@ -653,7 +654,8 @@
 	}			/* for j */
 	Rast_put_row(outfd, outrast, type);
     }				/* for i */
-
+    G_percent(1, 1, 1);
+    
     Rast_close(outfd);
     return;
 }

Modified: grass/trunk/raster/r.viewshed/viewshed.cpp
===================================================================
--- grass/trunk/raster/r.viewshed/viewshed.cpp	2012-12-23 14:53:55 UTC (rev 54377)
+++ grass/trunk/raster/r.viewshed/viewshed.cpp	2012-12-23 20:00:42 UTC (rev 54378)
@@ -320,7 +320,7 @@
     long nvis = 0;		/*number of visible cells */
     AEvent *e;
 
-    G_message(_("Determine visibility..."));
+    G_important_message(_("Computing visibility..."));
     G_percent(0, 100, 2);
 
     for (size_t i = 0; i < nevents; i++) {



More information about the grass-commit mailing list