[GRASS-dev] r.series method=minimum yields float map when integer maps are used as input

Veronica Andreo veroandreo at gmail.com
Sun Aug 26 08:32:57 PDT 2018


Hi Nikos,

El dom., 26 ago. 2018 13:16, Nikos Alexandris <nik at nikosalexandris.net>
escribió:

> * Veronica Andreo <veroandreo at gmail.com> [2018-08-25 18:17:51 +0200]:
>
> >Hi devs,
> >
> >If I use a series of integer type maps as input to t.rast.series or
> >r.series and select minimum as method, the output is a floating point map.
> >I would have thought that if the input are integers then output should be
> >integer as well. I realized when I made a plot of the map and got a smooth
> >legend instead of integer numbers.
> >
> >Here an example:
> >
> >{{{
> >for i in `seq 1 6` ; do r.mapcalc expression="map${i} = ${i}" ; done
> >r.info map1 <<-- CELL
> >r.series input=`g.list rast pat=map* sep=,` method=minimum output=test_min
> >r.info test_min <<-- DCELL
> >}}}
> >
> >Is this an expected behaviour?
>
> Vero,
>
> just guessing,
>
> maybe it's similar to my question about 'count' in `r.stats.zonal` [0]:
> use of DCELL allows for integers larger than CELL (32-bit).


Thanks for your answer. I can understand the storage of 'count' output as
double since the count can exceed the length of input data type. But why
minimum? If I input integer data, the minimum of a set of integer numbers
should be integer, no? How can it exceed the CELL range if it is the
minimum of that range?

Just thinking out loud

Cheers,
Vero


> [0] https://lists.osgeo.org/pipermail/grass-dev/2018-August/089197.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20180826/c67d8cf9/attachment.html>


More information about the grass-dev mailing list