[GRASS-SVN] r40166 - grass/branches/develbranch_6/raster/r.in.xyz

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 30 21:57:49 EST 2009


Author: hamish
Date: 2009-12-30 21:57:49 -0500 (Wed, 30 Dec 2009)
New Revision: 40166

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


Modified: grass/branches/develbranch_6/raster/r.in.xyz/description.html
===================================================================
--- grass/branches/develbranch_6/raster/r.in.xyz/description.html	2009-12-31 02:53:25 UTC (rev 40165)
+++ grass/branches/develbranch_6/raster/r.in.xyz/description.html	2009-12-31 02:57:49 UTC (rev 40166)
@@ -51,7 +51,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>
 

Modified: grass/branches/develbranch_6/raster/r.in.xyz/main.c
===================================================================
--- grass/branches/develbranch_6/raster/r.in.xyz/main.c	2009-12-31 02:53:25 UTC (rev 40165)
+++ grass/branches/develbranch_6/raster/r.in.xyz/main.c	2009-12-31 02:57:49 UTC (rev 40166)
@@ -297,7 +297,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;
@@ -515,7 +518,7 @@
     /* allocate memory for a single row of output data */
     raster_row = G_allocate_raster_buf(rtype);
 
-    G_message(_("Scanning data ..."));
+    G_message(_("Reading data ..."));
 
     count_total = 0;
 



More information about the grass-commit mailing list