You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately there are some more "edge-cases" left after #8918 (thanks for fixing that so quickly!). Additional grid points are found as 'touched' if the coordinates of the other side of the polygon are not at the raster edges.
In the example below I think there should be only 64 cells.
Isn't it rather so that too few cells get selected? For example I would expect that the polygon "a" would select the whole leftmost column because those cells have a non-zero intersection area. This is based on an assumption that "ALL_TOUCHED" really means "ALL_WITH_AREAL_INTERSECTION" that may be wrong.
because those cells have a non-zero intersection area.
There is a threshold of 1e-4 (applied in parts of the code paths) to take into account for numerical imprecision so that very tiny intersections are considered to be non significant. So in theory I'd agree with the diagnostic of the OP. Fixing the code to achieve that in all situations is another thing.
What is the bug?
Unfortunately there are some more "edge-cases" left after #8918 (thanks for fixing that so quickly!). Additional grid points are found as 'touched' if the coordinates of the other side of the polygon are not at the raster edges.
In the example below I think there should be only 64 cells.
Steps to reproduce the issue
Versions and provenance
GDAL 3.9.1, released 2024/06/22
installed via conda-forge
Additional context
miny
must be between1 + 1e-4
and2 - 1e-4
", otherwise it does not happen.minx
must between1 - 1e-4
and1 - eps
maxx
must be exactly9.+1.e-4
(+-np.spacing(9)
or so)I used rasterio to create the mask for the plot as I am more used to it's interface.
The text was updated successfully, but these errors were encountered: