Skip to content

feat(rust/sedona-raster-functions): add RS_PixelAsPoint, RS_PixelAsCentroid, RS_PixelAsPolygon UDFs#614

Open
Kontinuation wants to merge 2 commits intoapache:mainfrom
Kontinuation:pr13-rs-pixel-functions
Open

feat(rust/sedona-raster-functions): add RS_PixelAsPoint, RS_PixelAsCentroid, RS_PixelAsPolygon UDFs#614
Kontinuation wants to merge 2 commits intoapache:mainfrom
Kontinuation:pr13-rs-pixel-functions

Conversation

@Kontinuation
Copy link
Member

Summary

  • Add RS_PixelAsPoint, RS_PixelAsCentroid, and RS_PixelAsPolygon raster UDFs to sedona-raster-functions
  • These functions convert raster pixel coordinates to geometry representations (point at upper-left corner, centroid point, or bounding polygon)
  • Supports column/row indexing with 1-based band index; outputs Sedona geometry types
  • Includes unit tests and benchmark entries in native-raster-functions.rs

@Kontinuation Kontinuation force-pushed the pr13-rs-pixel-functions branch 2 times, most recently from 8dec4cb to 0a3088b Compare February 19, 2026 02:27
@Kontinuation Kontinuation force-pushed the pr13-rs-pixel-functions branch from 0a3088b to 1bbba07 Compare February 20, 2026 16:56
@Kontinuation Kontinuation changed the title feat(raster): add RS_PixelAsPoint, RS_PixelAsCentroid, RS_PixelAsPolygon UDFs feat(rust/sedona-raster-functions): add RS_PixelAsPoint, RS_PixelAsCentroid, RS_PixelAsPolygon UDFs Feb 20, 2026
@Kontinuation Kontinuation requested a review from Copilot February 20, 2026 17: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 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 AffineMatrix struct in affine_transformation.rs to 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.

@Kontinuation Kontinuation marked this pull request as ready for review February 20, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments