feat(rust/sedona-raster-functions): add RS_PixelAsPoint, RS_PixelAsCentroid, RS_PixelAsPolygon UDFs#614
Open
Kontinuation wants to merge 2 commits intoapache:mainfrom
Open
Conversation
8dec4cb to
0a3088b
Compare
0a3088b to
1bbba07
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds three new raster UDFs (RS_PixelAsPoint, RS_PixelAsCentroid, RS_PixelAsPolygon) to the sedona-raster-functions crate for converting raster pixel coordinates to geometry representations.
Changes:
- Introduced
AffineMatrixstruct inaffine_transformation.rsto cache affine transformation coefficients and avoid repeated metadata reads - Implemented three new UDFs that convert pixel coordinates to WKB geometries (upper-left point, centroid point, and bounding polygon)
- Added comprehensive unit tests and benchmark entries for the new functions
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| submodules/sedona-testing | Updated submodule commit reference |
| rust/sedona-raster/src/affine_transformation.rs | Added AffineMatrix struct with caching and refactored existing coordinate transformation functions to use it |
| rust/sedona-raster-functions/src/rs_pixel_functions.rs | New file implementing the three pixel-to-geometry UDFs with tests |
| rust/sedona-raster-functions/src/register.rs | Registered the three new UDFs in the default function set |
| rust/sedona-raster-functions/src/lib.rs | Added module declaration for rs_pixel_functions |
| rust/sedona-raster-functions/benches/native-raster-functions.rs | Added benchmark entries for the three new UDFs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
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.
Summary
RS_PixelAsPoint,RS_PixelAsCentroid, andRS_PixelAsPolygonraster UDFs tosedona-raster-functionsnative-raster-functions.rs