-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arrow interface (RFC 86) returns features based on bounding box overlap instead of intersection when using spatial filter #8347
Comments
There is a ready made geopackage in the Geoserver sources, i believe it is good for testing https://github.com/geoserver/geoserver/blob/main/data/release/data/ne/natural_earth.gpkg. This returns just 'CAN' but I do not know what kind of filter my SQL is setting.
|
…not just bbox intersection) (fixes OSGeo#8347)
Fix in #8354 (will be in 3.8 only) |
Before fix:
After:
|
…not just bbox intersection) (fixes OSGeo#8347)
Thanks for the quick fix @rouault ! 🎉 |
…not just bbox intersection) (fixes OSGeo#8347)
…not just bbox intersection) (fixes OSGeo#8347)
…not just bbox intersection) (fixes OSGeo#8347)
…not just bbox intersection) (fixes OSGeo#8347)
…not just bbox intersection) (fixes OSGeo#8347)
Expected behavior and actual behavior.
Given a geometry spatial filter or a bounding box spatial filter, the Arrow interface returns more features than intersect the geometry for some drivers (GPKG, FlatGeobuf), whereas the regular interface returns the expected features. It appears that the Arrow interface uses the bounding boxes of the geometries in the data source instead of their actual geometries.
Other drivers tested (Shapefile, GeoJSON) produce expected results when using both the regular and Arrow interfaces.
For example when querying NaturalEarth countries (WGS84 coordinates), a point located in the middle of Canada returns only a single record for Canada when using the regular interface, whereas it returns Canada, Russia, and the USA when using the Arrow interface (bounding boxes for Russia and USA wrap around the anti-meridian).
First observed in pyogrio #285
Steps to reproduce the problem.
Using a test GPKG file created from NaturalEarth countries (1:110m)
Outputs:
Operating system
MacOS 12.6.5 (M1)
GDAL version and provenance
Reproduced using both:
gdal
python package (3.7.1.1) installed viapip
The text was updated successfully, but these errors were encountered: