Closed amarbler closed 3 years ago
Thanks for the report.
You can see a total coverage fraction > 1 when two input polygons overlap within a grid cell, causing some area to be counted in the coverage fraction of both polygons. I wouldn't expect this for GADM.
More likely, you're just seeing some floating point noise the addition of two coverage fractions that are calculated as single-precision floating point numbers. exactextractr
uses single-precision numbers for coverage fractions to save memory, but I've wondered if there should be an option to use full double precision.
Does this result cause a problem for you?
Ok, thanks that makes sense. It's probably just floating point noise. If there would be an option available preventing this, that would be nice. But it's not a big problem for me, because it's always a very very small number for one of the coverage fractions, so I simply set it to 0.
Hi,
I just found an unexpected outcome using the function coverage_fraction:
If I understand the documentation correctly this should actually never happen, right?