浏览代码

better warn about memory use with extended stats;
error msg instead of segfault if zrange= is empty;
more accurate status message


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

Hamish Bowman 15 年之前
父节点
当前提交
8492ccd73d
共有 2 个文件被更改,包括 9 次插入3 次删除
  1. 5 2
      raster/r.in.xyz/main.c
  2. 4 1
      raster/r.in.xyz/r.in.xyz.html

+ 5 - 2
raster/r.in.xyz/main.c

@@ -302,7 +302,10 @@ int main(int argc, char *argv[])
 
     /* 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 @@ int main(int argc, char *argv[])
     /* 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;
 

+ 4 - 1
raster/r.in.xyz/r.in.xyz.html

@@ -52,7 +52,10 @@ min, max, sum</em> will also use less memory, while <em>stddev, variance,
 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>