[GRASS-user] Re: r.neighbors modal filter for two raster layers

maning sambale emmanuel.sambale at gmail.com
Fri Jan 30 01:16:02 EST 2009


What operator in mapcalc should I use to evaluate a mode from a given window:
r.mapcalc "test_andmode = mode (map1[-1,-1] && map1[-1,0] &&
map1[-1,1] && map1[0,-1] && \
map1[1,-1] && map1[1,1] && map1[0,0] && map1[0,1] && map1[-1,0] &&
map2[-1,-1] && map2[-1,0] && \
map2[-1,1] && map2[0,-1] && map2[1,-1] && map2[1,1] && map2[0,0] &&
map2[0,1] && map2[-1,0])"

Is the && correct to list values?

On Fri, Jan 30, 2009 at 11:53 AM, maning sambale
<emmanuel.sambale at gmail.com> wrote:
> Hi,
>
> Any ideas in doing this:
>
> I want to get the mode of raster categorical values for a defined
> window based on 2 raster layers.
> For example, I set a window of 5x5, so I get mode value from 50 pixels
> (25 for raster a and 25 for raster 2).
>
> --
> cheers,
> maning
> ------------------------------------------------------
> "Freedom is still the most radical idea of all" -N.Branden
> wiki: http://esambale.wikispaces.com/
> blog: http://epsg4253.wordpress.com/
> ------------------------------------------------------
>



-- 
cheers,
maning
------------------------------------------------------
"Freedom is still the most radical idea of all" -N.Branden
wiki: http://esambale.wikispaces.com/
blog: http://epsg4253.wordpress.com/
------------------------------------------------------


More information about the grass-user mailing list