[..] Nikos A: > >> Please check the manual of r.mapcalc. There is "THE NEIGHBORHOOD > >> MODIFIER" which I think can be used to obtain what is asked. > >> So, for each of the off-current pixel, the modifiers would be like > >> RASTER_IN_PUSHED_ONE_ROW_UP: map[-1,0] > >> RASTER_IN_PUSHED_ONE_ROW_DOWN: map[1,0] > >> RASTER_IN_PUSHED_ONE_COLUMN_LEFT: map[0,-1] > >> RASTER_IN_PUSHED_ONE_COLUMN_RIGHT: map[0,1]
Markus Metz wrote: > r.mapcalc \ > "RASTER_OUT=round(abs((RASTER_IN - RASTER_IN[0,-1]) + \ > (RASTER_IN - RASTER_IN[0,1]) + \ > (RASTER_IN - RASTER_IN[-1,0]) + \ > (RASTER_IN - RASTER_IN[1,0])))" > Note that this is the same like > round(abs(4 * RASTER_IN - \ > (RASTER_IN[0,-1] + \ > RASTER_IN[0,1] + \ > RASTER_IN[-1,0] + \ > RASTER_IN[1,0]))) [..] Maybe we can add this example in the manual? Nikos _______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user