Преглед изворни кода

r.surf.gauss: add progress info
clean up module description


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54526 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa пре 12 година
родитељ
комит
97680241f7
2 измењених фајлова са 7 додато и 7 уклоњено
  1. 2 1
      raster/r.surf.gauss/gaussurf.c
  2. 5 6
      raster/r.surf.gauss/main.c

+ 2 - 1
raster/r.surf.gauss/gaussurf.c

@@ -47,6 +47,7 @@ int gaussurf(char *out,		/* Name of raster maps to be opened.    */
 	/****** 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,7 +55,7 @@ int gaussurf(char *out,		/* Name of raster maps to be opened.    */
 	/* Write contents row by row */
 	Rast_put_d_row(fd_out, (DCELL *) row_out);
     }
-
+    G_percent(1, 1, 1);
 
 	/****** CLOSE THE CELL FILE ******/
 

+ 5 - 6
raster/r.surf.gauss/main.c

@@ -38,14 +38,13 @@ int main(int argc, char *argv[])
     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";