[GRASS-user] how to count number of occurrences of a specific
category value in the neighborhood of a given pixel
gorini at gmail.com
Wed Nov 23 11:41:16 EST 2011
> Does anyone see an easy way to count the number of times a specific
> category value occurs in a given neighborhood of a central pixel ?
As always, there is surely a better way in GRASS (probably one single
command), but you could binarize your map (1 for your desired category and
zero for everything else) and then use r.neighbors method=sum
The result would be the desired count.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-user