Skip to content

feat(c/sedona-geos): Implement item crs support for GEOS-based kernels#509

Merged
paleolimbot merged 6 commits intoapache:mainfrom
paleolimbot:geos-item-crs-funs
Jan 15, 2026
Merged

feat(c/sedona-geos): Implement item crs support for GEOS-based kernels#509
paleolimbot merged 6 commits intoapache:mainfrom
paleolimbot:geos-item-crs-funs

Conversation

@paleolimbot
Copy link
Member

@paleolimbot paleolimbot commented Jan 12, 2026

A continuation of #492 for c/sedona-geos. 2/3 PRs to address #487 (c/sedona-tg, c/sedona-geoarrow-c remain).

@paleolimbot paleolimbot requested a review from Copilot January 12, 2026 22:25
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 implements item CRS (Coordinate Reference System) support for GEOS-based geometry kernels in Apache Sedona, enabling these functions to work with geometries that have embedded CRS information.

Changes:

  • Modified all GEOS kernel implementations to return Vec<ScalarKernelRef> instead of single ScalarKernelRef, wrapping implementations with ItemCrsKernel::wrap_impl()
  • Added comprehensive test coverage for item CRS support across all affected functions
  • Refactored the registration system to use declarative macros for cleaner kernel registration

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated no comments.

Show a summary per file
File Description
c/sedona-geos/src/st_unaryunion.rs Added item CRS support and test for ST_UnaryUnion
c/sedona-geos/src/st_snap.rs Added item CRS support and test for ST_Snap
c/sedona-geos/src/st_simplifypreservetopology.rs Added item CRS support and test for ST_SimplifyPreserveTopology
c/sedona-geos/src/st_simplify.rs Added item CRS support and test for ST_Simplify
c/sedona-geos/src/st_polygonize.rs Added item CRS support and test for ST_Polygonize
c/sedona-geos/src/st_perimeter.rs Added item CRS support to existing test for ST_Perimeter
c/sedona-geos/src/st_numpoints.rs Added item CRS support to existing test for ST_NumPoints
c/sedona-geos/src/st_numinteriorrings.rs Added item CRS support to existing test for ST_NumInteriorRings
c/sedona-geos/src/st_nrings.rs Added item CRS support to existing test for ST_NRings
c/sedona-geos/src/st_minimumclearance_line.rs Added item CRS support and test for ST_MinimumClearanceLine
c/sedona-geos/src/st_minimumclearance.rs Added item CRS support to existing test for ST_MinimumClearance
c/sedona-geos/src/st_makevalid.rs Added item CRS support and test for ST_MakeValid
c/sedona-geos/src/st_line_merge.rs Added item CRS support and test for ST_LineMerge
c/sedona-geos/src/st_length.rs Added item CRS support to existing test for ST_Length
c/sedona-geos/src/st_isvalidreason.rs Added item CRS support to existing test for ST_IsValidReason
c/sedona-geos/src/st_isvalid.rs Added item CRS support to existing test for ST_IsValid
c/sedona-geos/src/st_issimple.rs Added item CRS support to existing test for ST_IsSimple
c/sedona-geos/src/st_isring.rs Added item CRS support to existing test for ST_IsRing
c/sedona-geos/src/st_dwithin.rs Added item CRS support and updated existing test for ST_DWithin
c/sedona-geos/src/st_convexhull.rs Added item CRS support and test for ST_ConvexHull
c/sedona-geos/src/st_concavehull.rs Added item CRS support and test for ST_ConcaveHull
c/sedona-geos/src/st_centroid.rs Added item CRS support and test for ST_Centroid
c/sedona-geos/src/st_buffer.rs Added item CRS support and test for ST_Buffer
c/sedona-geos/src/st_boundary.rs Added item CRS support and test for ST_Boundary
c/sedona-geos/src/st_area.rs Added item CRS support to existing test for ST_Area
c/sedona-geos/src/register.rs Refactored kernel registration to use macros and support Vec return type

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

@paleolimbot paleolimbot marked this pull request as ready for review January 12, 2026 22:30
@paleolimbot paleolimbot merged commit 9065867 into apache:main Jan 15, 2026
15 checks passed
@paleolimbot paleolimbot deleted the geos-item-crs-funs branch January 15, 2026 14:54
pwrliang pushed a commit to pwrliang/sedona-db that referenced this pull request Jan 15, 2026
pwrliang pushed a commit to pwrliang/sedona-db that referenced this pull request Jan 15, 2026
@paleolimbot paleolimbot added this to the 0.3.0 milestone Jan 26, 2026
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.

3 participants