Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self-intersection handling #961

Merged
merged 2 commits into from
Nov 5, 2023
Merged

Self-intersection handling #961

merged 2 commits into from
Nov 5, 2023

Conversation

sergiev
Copy link
Contributor

@sergiev sergiev commented Nov 3, 2023

Sometimes you may occur labels that shapely considers invalid even if they are generally useful.
Here's my example: two closest points were placed in such order that in terms of shapely it's self-intersection and therefore attempt to get_intersection leads to shapely.errors.GEOSException
image
I propose a little workaround for such case: check validity and call make_valid if needed.

@fcakyon
Copy link
Collaborator

fcakyon commented Nov 5, 2023

@sergiev thanks a lot for your contribution! We can merge this once the tests pass 👍

@fcakyon fcakyon merged commit 3061811 into obss:main Nov 5, 2023
9 checks passed
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.

2 participants