[GRASS-SVN] r48480 - grass/branches/develbranch_6/raster/r.series
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Sep 26 15:18:23 EDT 2011
Author: glynn
Date: 2011-09-26 12:18:23 -0700 (Mon, 26 Sep 2011)
New Revision: 48480
Modified:
grass/branches/develbranch_6/raster/r.series/main.c
Log:
Revert r41666 (breaks quantile=)
Modified: grass/branches/develbranch_6/raster/r.series/main.c
===================================================================
--- grass/branches/develbranch_6/raster/r.series/main.c 2011-09-26 13:37:24 UTC (rev 48479)
+++ grass/branches/develbranch_6/raster/r.series/main.c 2011-09-26 19:18:23 UTC (rev 48480)
@@ -39,7 +39,6 @@
{c_stddev, 0, "stddev", "standard deviation"},
{c_range, 0, "range", "range of values"},
{c_sum, 0, "sum", "sum of values"},
- {c_thresh, 1, "threshold", "threshold value"},
{c_var, 0, "variance", "statistical variance"},
{c_divr, 1, "diversity", "number of different values"},
{c_reg_m, 0, "slope", "linear regression slope"},
@@ -68,7 +67,6 @@
DCELL *buf;
stat_func *method_fn;
double quantile;
- double threshold;
};
static char *build_method_list(void)
@@ -108,7 +106,7 @@
struct GModule *module;
struct
{
- struct Option *input, *output, *method, *quantile, *threshold, *range;
+ struct Option *input, *output, *method, *quantile, *range;
} parm;
struct
{
@@ -157,13 +155,6 @@
parm.quantile->options = "0.0-1.0";
parm.quantile->multiple = YES;
- parm.threshold = G_define_option();
- parm.threshold->key = "threshold";
- parm.threshold->type = TYPE_DOUBLE;
- parm.threshold->required = NO;
- parm.threshold->description = _("Threshold to calculate for method=threshold");
- parm.threshold->multiple = YES;
-
/* please, remove before GRASS 7 released */
flag.quiet = G_define_flag();
flag.quiet->key = 'q';
@@ -240,9 +231,6 @@
out->quantile = (parm.quantile->answer && parm.quantile->answers[i])
? atof(parm.quantile->answers[i])
: 0;
- out->threshold = (parm.threshold->answer && parm.threshold->answers[i])
- ? atof(parm.threshold->answers[i])
- : 0;
out->buf = G_allocate_d_raster_buf();
out->fd = G_open_raster_new(
output_name, menu[method].is_int ? CELL_TYPE : DCELL_TYPE);
@@ -289,7 +277,7 @@
G_set_d_null_value(&out->buf[col], 1);
else {
memcpy(values_tmp, values, num_inputs * sizeof(DCELL));
- (*out->method_fn)(&out->buf[col], values_tmp, num_inputs, &out->threshold);
+ (*out->method_fn)(&out->buf[col], values_tmp, num_inputs, &out->quantile);
}
}
}
More information about the grass-commit
mailing list