[GRASS-SVN] r54526 - grass/trunk/raster/r.surf.gauss

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jan 4 06:12:35 PST 2013


Author: martinl
Date: 2013-01-04 06:12:35 -0800 (Fri, 04 Jan 2013)
New Revision: 54526

Modified:
   grass/trunk/raster/r.surf.gauss/gaussurf.c
   grass/trunk/raster/r.surf.gauss/main.c
Log:
r.surf.gauss: add progress info
	      clean up module description


Modified: grass/trunk/raster/r.surf.gauss/gaussurf.c
===================================================================
--- grass/trunk/raster/r.surf.gauss/gaussurf.c	2013-01-04 13:51:55 UTC (rev 54525)
+++ grass/trunk/raster/r.surf.gauss/gaussurf.c	2013-01-04 14:12:35 UTC (rev 54526)
@@ -47,6 +47,7 @@
 	/****** PASS THROUGH EACH CELL ASSIGNING RANDOM VALUE ******/
 
     for (row_count = 0; row_count < nrows; row_count++) {
+	G_percent(row_count, nrows, 5);
 	for (col_count = 0; col_count < ncols; col_count++)
 	    *(row_out + col_count) =
 		(DCELL) (G_math_rand_gauss(2742, sigma) + mean);
@@ -54,8 +55,8 @@
 	/* Write contents row by row */
 	Rast_put_d_row(fd_out, (DCELL *) row_out);
     }
+    G_percent(1, 1, 1);
 
-
 	/****** CLOSE THE CELL FILE ******/
 
     Rast_close(fd_out);

Modified: grass/trunk/raster/r.surf.gauss/main.c
===================================================================
--- grass/trunk/raster/r.surf.gauss/main.c	2013-01-04 13:51:55 UTC (rev 54525)
+++ grass/trunk/raster/r.surf.gauss/main.c	2013-01-04 14:12:35 UTC (rev 54526)
@@ -38,14 +38,13 @@
     G_add_keyword(_("raster"));
     G_add_keyword(_("surface"));
     G_add_keyword(_("random"));
-    module->description =
-	_("GRASS module to produce a raster map layer of "
-	  "gaussian deviates whose mean and standard deviation "
-	  "can be expressed by the user. It uses a gaussian "
+    module->label =
+	_("Generates a raster map using gaussian "
 	  "random number generator.");
-
+    module->description = _("Mean and standard deviation of gaussian deviates "
+			    "can be expressed by the user.");
+    
     out = G_define_standard_option(G_OPT_R_OUTPUT);
-    out->description = _("Name of the output random surface");
 
     mean = G_define_option();
     mean->key = "mean";



More information about the grass-commit mailing list