[GRASS-dev] No 'count' method for r.statistics
markus.metz.giswork at gmail.com
Wed Aug 1 11:33:33 PDT 2018
On Wed, Aug 1, 2018 at 11:59 AM, Nikos Alexandris <nik at nikosalexandris.net>
> `r.statistics` which was/is meant for categorical raster maps, does not
> provide for a 'count' method.
> `r.stats.zonal`, on the other hand, which is meant for floating point
> raster maps, does so.
> This is rather unexpected. 'Count'ing pixels should rather derive 'CELL'
> maps and not 'FCELL'.
> At the moment, I require an extra mapcalc using the int() function.
> Any comments?
Counting pixels can produce a result that is too large for CELL (32 bit
integer), therefore storing the count as DCELL is a bit safer because it
can exactly store integers larger than the 32 bit maximum.
In short, use r.stats.zonal rather than r.statistics.
> grass-dev mailing list
> grass-dev at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-dev