May be something like: (please, check several values!) r.mapcalc "B=if(A==0, sum(A[-1,-1], A[0, -1], A[1,-1], A[-1,0], A[1,0], A[-1,1], A[0, 1], A[1,1])/8, A") cheers
milton 2009/8/28 stephen sefick <[email protected]> > if(0, (sum([-1,1], [0, 1], [1,1], [-1,0], [0,0], [1,0],[-1,-1], > [0,-1],[1,-1])/8)) > > I want to use mapcalc to do the above. I am missing a syntax step. > if a value is zero take the average of the eight nearest neighbors and > replace the value with this. Otherwise, keep the value unchanged > > -- > Stephen Sefick > > Let's not spend our time and resources thinking about things that are > so little or so large that all they really do for us is puff us up and > make us feel like gods. We are mammals, and have not exhausted the > annoying little problems of being mammals. > > -K. Mullis > _______________________________________________ > grass-user mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/grass-user >
_______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
