-
-
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
GetFeatureCount one off with GPKG with wkt_filter? #8625
Comments
…st bounding box (fixes OSGeo#8625)
The GetFeatureCount() implementation in the GPKG driver only did bounding box intersection testing up to now. Extended to full geometry intersection when needed in #8626 |
The spatial filter in this case is a bounding box polygon; I tried using |
yes, I know. But if your feature geometry aren't rectangle, the current/past behaviour of doing bounding box intersection only doesn't lead to the same result as doing full geometry intersection Before the fix: After: |
Ah, I hadn't seen you fixed it already - fantastic, thanks! |
GPKG: make GetFeatureCount() do full geometry intersection and not just bounding box (fixes #8625)
This was raised here: r-spatial/sf#2248
Expected behavior and actual behavior.
I expect
GetFeatureCount
to return the number of features that can be read from a layer; here is an example where it seems to be one more than that, when reading a GPKG with a Spatial Filter set. When replacing the GPKG with the fgb file with identical contents it does not happen.Steps to reproduce the problem.
The example files are found here: https://uni-muenster.sciebo.de/s/Mn0iuk2xSkIP7D6 ; both were created by GDAL (using R package
sf
) see the original issue for how this was done.compile & run:
Operating system
ubuntu 22.04
GDAL version and provenance
3.6.4, but also observed with 3.7.2
The text was updated successfully, but these errors were encountered: