isciences / exactextract

Fast and accurate raster zonal statistics
Apache License 2.0
258 stars 33 forks source link

When use frac, the universe of pixels per each class is near to 1 but not exactly 1 #101

Closed WCMC-vblanque closed 5 months ago

WCMC-vblanque commented 5 months ago

All the pixels inside the polygon return a value of 0.99999 but not 1?

We are using a raster with decimal values and a polygon in projection EPSG:4326.

dbaston commented 5 months ago

exactextract is using single-precision floats for the coverage fractions, so we can only expect the sum to be within ~1e-6 of 1