[GRASS-SVN] r43650 - grass/trunk/raster/r.surf.random

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Sep 23 09:34:54 EDT 2010


Author: martinl
Date: 2010-09-23 13:34:53 +0000 (Thu, 23 Sep 2010)
New Revision: 43650

Modified:
   grass/trunk/raster/r.surf.random/main.c
   grass/trunk/raster/r.surf.random/randsurf.c
Log:
r.surf.random: be more verbose
(merge r43648 from devbr6)


Modified: grass/trunk/raster/r.surf.random/main.c
===================================================================
--- grass/trunk/raster/r.surf.random/main.c	2010-09-23 13:29:50 UTC (rev 43649)
+++ grass/trunk/raster/r.surf.random/main.c	2010-09-23 13:34:53 UTC (rev 43650)
@@ -6,7 +6,7 @@
  *               Midlands Regional Research Laboratory (ASSIST)
  * AUTHOR(S):    Markus Neteler <neteler itc.it> (original contributor)
  * PURPOSE:      produces a raster map layer of uniform random deviates
- * COPYRIGHT:    (C) 1999-2006 by the GRASS Development Team
+ * COPYRIGHT:    (C) 1999-2006, 2010 by the GRASS Development Team
  *
  *               This program is free software under the GNU General Public
  *               License (>=v2). Read the file COPYING that comes with GRASS
@@ -37,10 +37,9 @@
     G_add_keyword(_("surface"));
     G_add_keyword(_("random"));
     module->description =
-	_("Produces a raster map layer of uniform random "
+	_("Produces a raster map of uniform random "
 	  "deviates whose range can be expressed by the user.");
 
-
     out = G_define_standard_option(G_OPT_R_OUTPUT);
 
     min = G_define_option();
@@ -57,7 +56,7 @@
 
     i_flag = G_define_flag();
     i_flag->key = 'i';
-    i_flag->description = _("Create an integer map");
+    i_flag->description = _("Create an integer raster map");
 
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
@@ -65,5 +64,7 @@
     randsurf(out->answer, atoi(min->answer), atoi(max->answer),
 	     i_flag->answer);
 
+    G_done_msg(_("Raster map <%s> generated."), out->answer);
+    
     exit(EXIT_SUCCESS);
 }

Modified: grass/trunk/raster/r.surf.random/randsurf.c
===================================================================
--- grass/trunk/raster/r.surf.random/randsurf.c	2010-09-23 13:29:50 UTC (rev 43649)
+++ grass/trunk/raster/r.surf.random/randsurf.c	2010-09-23 13:34:53 UTC (rev 43650)
@@ -36,6 +36,7 @@
 
 	/****** PASS THROUGH EACH CELL ASSIGNING RANDOM VALUE ******/
     for (row_count = 0; row_count < nrows; row_count++) {
+	G_percent(row_count, nrows, 2);
 	for (col_count = 0; col_count < ncols; col_count++) {
 	    if (int_map)
 		*(row_out_C + col_count) =
@@ -53,7 +54,8 @@
 	else
 	    Rast_put_d_row(fd_out, (DCELL *) row_out_D);
     }
-
+    G_percent(1, 1, 1);
+    
     Rast_close(fd_out);
 
     return 0;



More information about the grass-commit mailing list