I think r.mfilter will also let you customize your own matrix filters:
http://grass.itc.it/grass61/manuals/html61_user/r.mfilter.html
~ Eric.
-----Original Message-----
From: owner-GRASSLIST@baylor.edu
To: maning sambale
Cc: grasslist@baylor.edu
Sent: 3/23/2006 5:24 AM
Subject: [GRASSLIST:329] Re: Fwd: Developing a forest fragmentation index
What is bugging me is generating Pff, which counts from the moving
window the forest pixel pairs in 4 cardinal directions. (see
attached)
Read about the NEIGHBORHOOD MODIFIER in the r.mapcalc help page.
That gives you access to the cell above, below, to the left, and to the
right of the cell being processed.
"..., map[0,1] refers to the cell one column to the right of the current
cell. This syntax permits the development of neighborhood-type filters
within a single map or across multiple maps."
Or if you feel really keen you can create a new filter for r.neighbors
by modifying one of the old ones?
r.mapcalc is very powerful though and should let you win.
Hamish