-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fix extent computation in QgsSpatiaLiteProvider #54917
Conversation
eb7eaea
to
af585e8
Compare
af585e8
to
99aff8d
Compare
3de2cd0
to
2cc125d
Compare
Looks like I had an unsubmitted comment for some reason. Looks fine, I guess, but I really think moving to the standard query API is a better idea. But even without that, this looks like an improvement and probably fixes the mentioned issue. |
2cc125d
to
cee6e6c
Compare
The basic fix here, I believe, is handling the NULL min/max values of extent when number of rows is zero. |
If the empty string check is not good (CI will tell, I guess?) we can consider using proper null checking. This may be useful in that case: https://stackoverflow.com/questions/8961457/how-to-check-a-value-in-a-sqlite-column-is-null-or-not-with-c-api |
cee6e6c
to
4b78fe6
Compare
Extent should be set to null if there are no rows or geometric field or computed min/max envelope ordinates are null. Also makes the implementation more readable (hopefully).
4b78fe6
to
03fe615
Compare
@elpaso I've addressed all your suggestions, are we ready to go now ? I need one approval to proceed |
Trying to debug #54646 (comment) I was lost in this function and thought I'd rewrite it.