Skip to content

Conversation

@petern48
Copy link
Collaborator

@petern48 petern48 commented Aug 5, 2025

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
Copy link
Collaborator Author

petern48 commented Aug 5, 2025

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 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
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 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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jiayuasu jiayuasu merged commit 7005e6e into apache:master Aug 6, 2025
30 checks passed
@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 <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Jia Yu <jiayu@wherobots.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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

2 participants