[GRASS-SVN] r43853 - grass/trunk/raster/r.series

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 10 22:40:56 EDT 2010


Author: glynn
Date: 2010-10-10 19:40:56 -0700 (Sun, 10 Oct 2010)
New Revision: 43853

Modified:
   grass/trunk/raster/r.series/main.c
Log:
Revert r41667 (breaks quantile=)


Modified: grass/trunk/raster/r.series/main.c
===================================================================
--- grass/trunk/raster/r.series/main.c	2010-10-10 21:30:03 UTC (rev 43852)
+++ grass/trunk/raster/r.series/main.c	2010-10-11 02:40:56 UTC (rev 43853)
@@ -40,7 +40,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"},
@@ -69,7 +68,6 @@
     DCELL *buf;
     stat_func *method_fn;
     double quantile;
-    double threshold;
 };
 
 static char *build_method_list(void)
@@ -109,7 +107,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;
-
     parm.range = G_define_option();
     parm.range->key = "range";
     parm.range->type = TYPE_DOUBLE;
@@ -224,9 +215,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 = Rast_allocate_d_buf();
 	out->fd = Rast_open_new(output_name,
 				menu[method].is_int ? CELL_TYPE : DCELL_TYPE);
@@ -271,7 +259,7 @@
 		    Rast_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