Skip to content

Conversation

@paleolimbot
Copy link
Member

@paleolimbot paleolimbot commented Jan 24, 2026

This PR adds the function ST_GeomFromEWKB (which constructs an item_crs, as opposed to ST_GeomFromWKB, which constructs a regular geometry).

In the process of completing the roundtrip testing I also realized that ST_SetSRID didn't support item CRS inputs, so I just fixed that so I could complete the roundtrip test.

Closes #489
Closes #490

@paleolimbot paleolimbot requested a review from Copilot January 26, 2026 19:04
Copy link
Contributor

Copilot AI left a 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 adds support for reading EWKB (Extended Well-Known Binary) geometries, which include CRS information, and fixes ST_SetSRID to properly handle item_crs inputs for complete roundtrip testing.

Changes:

  • Added ST_GeomFromEWKB function to construct geometries with CRS from EWKB format
  • Updated ST_SetSRID and ST_SetCRS to support item_crs inputs by using parse_item_crs_arg helper functions
  • Enhanced test coverage with roundtrip EWKB tests and parameterized tests for item_crs inputs

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
rust/sedona-functions/src/st_geomfromewkb.rs New file implementing ST_GeomFromEWKB function to parse EWKB and extract CRS information
rust/sedona-functions/src/st_setsrid.rs Updated to support item_crs inputs, refactored return type logic, and changed SRID validation from numeric to integer
rust/sedona-functions/src/register.rs Registered new ST_GeomFromEWKB function and reordered function list alphabetically
rust/sedona-functions/src/lib.rs Added module declaration for st_geomfromewkb
rust/sedona-expr/src/item_crs.rs Made helper functions public to support item_crs parsing in other modules
python/sedonadb/tests/functions/test_wkb.py Enhanced EWKB tests with roundtrip validation and updated test parameters
python/sedonadb/python/sedonadb/testing.py Added val_or_null helper method to format binary values as SQL literals for different engines

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant