[GRASS-dev] r.mapcalc bug on max and min?

Anna Petrášová kratochanna at gmail.com
Mon Oct 6 06:39:41 PDT 2014


On Mon, Oct 6, 2014 at 9:07 AM, Pietro <peter.zamb at gmail.com> wrote:

> On Mon, Oct 6, 2014 at 2:25 PM, Anna Petrášová <kratochanna at gmail.com>
> wrote:
> > On Mon, Oct 6, 2014 at 4:51 AM, Pietro <peter.zamb at gmail.com> wrote:
> >> Again everything is NULL, I'm doing something wrong or it is a bug?
> >
> >
> > Glynn could perhaps give you some more precise comment, but basically,
> max
> > doesn't operate on the entire map but only on the current cell. So for
> > example, r.macalc "map_max = max(elevation1, elevation2, elevation3)"
> > creates a map where each cell is the largest value of the corresponding
> > cells in the 3 elevation maps.
>
> Ahh, I misunderstood the documentation I thought it was not pixel by
> pixel but for the whole raster map...
> now the results are explained! :-)
>
> Perhaps we could add two new functions, like: rmin and rmax that stay
> for range min and range max that give this information, do you think
> could be useful?
>

Yes, definitely, I was also missing this functionality. I assume it
shouldn't be too difficult since range is stored in the map anyway.

Anna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20141006/438b7b60/attachment.html>


More information about the grass-dev mailing list