[GRASS-user] How to find the second largest value in a series of
rasters.
Marcello Gorini
gorini at gmail.com
Fri Dec 9 06:59:06 EST 2011
Marcello:
> I have to find the maximum value for each cell in a series
> > of rasters and generate both a maximum value map and a
> > categorical map with the raster number which contains the
> > maximum value.
>
>
Hamish:
> see also:
>
> http://grass.osgeo.org/wiki/Time_series#Common_legends_for_many_raster_maps
>
> it sounds like you have done something similar already, but
> maybe you could adapt it somehow, or it is faster.
>
> I think you'll have to use g.copy + r.null (or better r.reclass)
> to hide the highest values.
>
>
Thanks for the ideas. I still haven't quite figured out how to do it
without a loop, but I will keep trying.
Anyway, I found very useful this kind of expression:
for MAP in `g.mlist rast pattern=$MAP_PATTERN` ; do
eval `r.info -r $MAP`
I didn't know it was possible. Thanks.
Cheers,
Marcello.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20111209/7ae3bc0c/attachment.html
More information about the grass-user
mailing list