Skip to content

[GH-2396] Making splitting polygon by line robust by removing the computation of line-polygon intersection#2598

Merged
jiayuasu merged 2 commits intoapache:masterfrom
Kontinuation:fix-split-polygon-by-line
Jan 22, 2026
Merged

[GH-2396] Making splitting polygon by line robust by removing the computation of line-polygon intersection#2598
jiayuasu merged 2 commits intoapache:masterfrom
Kontinuation:fix-split-polygon-by-line

Conversation

@Kontinuation
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?

This patch fixes splitting a polygon using linestring by porting the corresponding logic from PostGIS. Relevant PostGIS code: https://github.com/postgis/postgis/blob/3.6.1/liblwgeom/lwgeom_geos_split.c#L349-L491

How was this patch tested?

Added the case mentioned in the issue as a unit test and pass it.

Did this PR include necessary documentation updates?

  • No, this PR does not affect any public API so no need to change the documentation.

@Kontinuation Kontinuation marked this pull request as ready for review January 22, 2026 01:41
@Kontinuation
Copy link
Copy Markdown
Member Author

The Python test failures is likely caused by the release of Pandas 3.0. I'll fix it in another PR.

@jiayuasu jiayuasu added this to the sedona-1.9.0 milestone Jan 22, 2026
@jiayuasu jiayuasu merged commit 995b5b1 into apache:master Jan 22, 2026
40 of 63 checks passed
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.

GeometrySplitter.split returns empty geometry

2 participants