Skip to content

[GH-2231] Implement is_ring - #2232

Merged
jiayuasu merged 3 commits into
apache:masterfrom
petern48:is_ring
Aug 6, 2025
Merged

jiayuasu merged 3 commits into
apache:masterfrom
petern48:is_ring

Conversation

@petern48

@petern48 petern48 commented Aug 5, 2025

Copy link
Copy Markdown
Member

Did you read the Contributor Guide?

Is this PR related to a ticket?

What changes were proposed in this PR?

Implement is_ring

How was this patch tested?

Added tests

Did this PR include necessary documentation updates?

  • Yes, I have updated the documentation.

@petern48

petern48 commented Aug 5, 2025 •

Copy link
Copy Markdown
Member Author

Using this as an example PR for how to add a new geopandas function for this EPIC issue: #2230. All of the previous ones are a bit outdated after the refactors.

@petern48 petern48 mentioned this pull request Aug 5, 2025
66 of 77 tasks
@petern48
petern48 marked this pull request as ready for review August 5, 2025 22:14
@petern48
petern48 requested a review from jiayuasu as a code owner August 5, 2025 22:14
@jiayuasu
jiayuasu requested a review from Copilot August 6, 2025 03:48
@jiayuasu jiayuasu added this to the sedona-1.8.0 milestone Aug 6, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 is_ring property for GeoSeries, which tests if LineString geometries are closed rings (where the start and end points are identical).

  • Implements the is_ring property in both the base class and GeoSeries implementation
  • Adds comprehensive tests to verify functionality against GeoPandas behavior
  • Provides detailed documentation with examples

Reviewed Changes

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

File Description
python/sedona/spark/geopandas/geoseries.py Replaces NotImplementedError with actual ST_IsRing implementation
python/sedona/spark/geopandas/base.py Adds complete property definition with documentation and examples
python/tests/geopandas/test_geoseries.py Adds unit tests for the is_ring property with various geometry types
python/tests/geopandas/test_match_geopandas_series.py Adds compatibility test to ensure behavior matches GeoPandas

@jiayuasu
jiayuasu merged commit 7005e6e into apache:master Aug 6, 2025
@petern48
petern48 deleted the is_ring branch August 6, 2025 06:55
Kontinuation pushed a commit to Kontinuation/sedona that referenced this pull request Jan 21, 2026
* Implement is_ring

* Also add test for geodataframe

* Update python/tests/geopandas/test_match_geopandas_series.py

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Jia Yu <[email protected]>
Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Geopandas: Implement is_ring

3 participants