[GRASS-dev] r.series thresholds?

Markus Neteler neteler at osgeo.org
Sun Oct 10 04:07:38 EDT 2010


Hi Hamish,

On Sun, Oct 10, 2010 at 8:42 AM, Hamish <hamish_b at yahoo.com> wrote:
> Hi, I was trying to figure out how to use the r.series threshold=
> parameter to make a MASK only where all channels of some Landsat
> data were >0 (extant),

Perhaps use the count parameter with -n for null propagation?

> without needing to use r.null and the extra disk
> space to store a NULL file for each of the input bands (the files take up
> enough disk space as it is). so something like "output cells contain the
> count of input maps with data values >=1". for 6 input bands the output
> range would be 0-6, or null and 1-6.

So the sum parameter sounds better.

> ... but I was having a difficult time of understanding how it was
> supposed to work. the only mention in the man page has to do with the
> range= option.
>
> Remembering there was some discussion about it I just found this:
>  http://article.gmane.org/gmane.comp.gis.grass.devel/22002/
>
> .. so was the html part of the patch just never applied? or did things
> change since then? ie is it still true that the -n flag makes it ignored?
> (perhaps then issue a G_warning()?)

Time to reverse engineer the code :)


> Is threshold= not even related to the method=threshold option?!

Here a usage example:

# Growing Degree Days maps thresholding, seeking 1350 GDD
r.series in=gdd1,gdd2,gdd3,gdd4,...,gdd365 \
         out=gdd_daynum.thresh1350 threshold=1350 method=threshold

The output is, for eacxh pixel, the map number in which 1350 GDD have
been reached.

I agree that documentation could be better...

Markus


More information about the grass-dev mailing list