-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support geometries with Z and M values #280
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ort to st_asgeojson
Does this support Z and M in the native representations as well or just in the GEOS one? |
Native too! + WKB/GeoJSON/GDAL support. Although I haven't added new vectorized representations like |
ah that was what I meant to ask! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes a major rework of the runtime geometry representation to enable support for Z and M values. Although no functions that specifically make use of the Z or M axis are implemented yet, and some existing functions may have limited support. Im not terribly happy with the vertex array abstraction yet but it works. Additionally:
There is a new GeometryProcessor abstraction which is used to unify deserialization to GEOS geometries and DuckDB native geometries while also enabling some operations to be performed while deserializing, "zero-copy"-style so as to avoid materializing the geometry hierarchy entirely. The only functions to make use of this so far is
ST_Area
,ST_AsWKB
,ST_(Min/Max)/X/Y/Z/M
andST_AsText
.We now use our own WKT parser instead of relying on GEOS. I don't expect it to be more efficient but it does allow us to handle empty Z and M geometries and provide better error messages (eventually, they're not that exact yet).
New
ST_Force2D
,ST_Force3DZ
,ST_Force3DM
andST_Force4DM
functions have been added.