-
Notifications
You must be signed in to change notification settings - Fork 41
feat(rust/sedona-function): Implement ST_AsEWKB with item CRS support #535
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements the ST_AsEWKB function with support for CRS (Coordinate Reference System) metadata, enabling EWKB (Extended Well-Known Binary) output that includes SRID information.
Changes:
- Adds EWKB writer implementation with SRID support for all geometry types
- Implements
ST_AsEWKBscalar UDF with both type-level and item-level CRS support - Adds comprehensive test coverage for EWKB serialization across geometry types and dimensions
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| rust/sedona-geometry/src/lib.rs | Exports new ewkb_factory module |
| rust/sedona-geometry/src/ewkb_factory.rs | Implements EWKB writer with SRID encoding for all geometry types |
| rust/sedona-functions/src/st_asewkb.rs | Implements ST_AsEWKB UDF with CRS support |
| rust/sedona-functions/src/register.rs | Registers ST_AsEWKB function in default function set |
| rust/sedona-functions/src/lib.rs | Declares st_asewkb module |
| rust/sedona-functions/src/executor.rs | Adds support for iterating over item CRS struct types |
| python/sedonadb/tests/functions/test_wkb.py | Adds parametrized tests comparing SedonaDB and PostGIS EWKB output |
| python/sedonadb/python/sedonadb/testing.py | Extends geom_or_null helper to support SRID parameter |
| python/sedonadb/pyproject.toml | Adds pandas version constraint as workaround |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This PR implements an EWKB writer and uses it to implement ST_AsEWKB.