[GRASS-SVN] r40165 - grass/trunk/raster/r.in.xyz

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 30 21:53:26 EST 2009


Author: hamish
Date: 2009-12-30 21:53:25 -0500 (Wed, 30 Dec 2009)
New Revision: 40165

Modified:
   grass/trunk/raster/r.in.xyz/main.c
   grass/trunk/raster/r.in.xyz/r.in.xyz.html
Log:
better warn about memory use with extended stats;
error msg instead of segfault if zrange= is empty;
more accurate status message


Modified: grass/trunk/raster/r.in.xyz/main.c
===================================================================
--- grass/trunk/raster/r.in.xyz/main.c	2009-12-30 19:20:23 UTC (rev 40164)
+++ grass/trunk/raster/r.in.xyz/main.c	2009-12-31 02:53:25 UTC (rev 40165)
@@ -302,7 +302,10 @@
 
     /* parse zrange */
     do_zfilter = FALSE;
-    if (zrange_opt->answer != NULL) {	/* should this be answerS ? */
+    if (zrange_opt->answer != NULL) {
+	if (zrange_opt->answers[0] == NULL)
+	    G_fatal_error(_("Invalid zrange"));
+
 	sscanf(zrange_opt->answers[0], "%lf", &zrange_min);
 	sscanf(zrange_opt->answers[1], "%lf", &zrange_max);
 	do_zfilter = TRUE;
@@ -520,7 +523,7 @@
     /* allocate memory for a single row of output data */
     raster_row = Rast_allocate_buf(rtype);
 
-    G_message(_("Scanning data ..."));
+    G_message(_("Reading data ..."));
 
     count_total = 0;
 

Modified: grass/trunk/raster/r.in.xyz/r.in.xyz.html
===================================================================
--- grass/trunk/raster/r.in.xyz/r.in.xyz.html	2009-12-30 19:20:23 UTC (rev 40164)
+++ grass/trunk/raster/r.in.xyz/r.in.xyz.html	2009-12-31 02:53:25 UTC (rev 40165)
@@ -52,7 +52,10 @@
 and coeff_var</em> will use more.
 
 The aggregate functions <em>median, percentile, skewness</em> and
-<em>trimmed mean</em> will also use more memory.
+<em>trimmed mean</em> will use even more memory and may not be appropriate
+for use with arbitrarily large input files<!-- without a small value for percent= -->.
+<!-- explained: memory use for regular stats will be based solely on region size,
+ but for the aggregate fns it will also depend on the number of data points. (?) -->
 
 <p>
 



More information about the grass-commit mailing list