[GRASS-user] how to count number of occurrences of a specific
category value in the neighborhood of a given pixel
hamish_b at yahoo.com
Wed Nov 23 18:36:09 EST 2011
> As always, there is surely a better way in GRASS
> (probably one single command),
"many roads lead to Rome" as the saying goes..
> but you could binarize your map (1 for your
> desired category and zero for everything else)
for this step, r.reclass will make things much
faster and save disk space too.
> and then use r.neighbors method=sum
> The result would be the desired count.
More information about the grass-user