[GRASS-user] r.resamp.stats: how to count valid input pixels
peifer
peifer at gmx.eu
Thu Aug 14 09:38:08 PDT 2014
Glynn Clements wrote
> Create a validity map with e.g.
>
> r.mapcalc "valid = !isnull(input)"
>
> then use r.resamp.stats method=average on that.
Thanks for the hint.
After a second thought, I came up with something slightly different:
r.reclass input # valid pixels (cat 0..100)= 1, nodata pixels (cat
254,255) = 0
then r.resamp.stats method=sum # to get the count of valid pixels
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/r-resamp-stats-how-to-count-valid-input-pixels-tp5156214p5156444.html
Sent from the Grass - Users mailing list archive at Nabble.com.
More information about the grass-user
mailing list