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

prevent degenerate ways caused by deleting a corner of a triangle #10003

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

k-yle
Copy link
Collaborator

@k-yle k-yle commented Nov 25, 2023

Closes #9329

@tyrasd had some alternative ideas in #9329 (comment), this PR implements option 1: you can no longer create a degenerate way by deleting the third-last node.

@k-yle
Copy link
Collaborator Author

k-yle commented Nov 25, 2023

There's one test failing:

iD.osmWay({id: '-', nodes: ['a', 'b', 'a']})

It's a bit of a weird test, because if you try to use the circularlise operation on a way that loops back on itself (A -> B -> A), nothing happens anyway. I think it's better to change update this test case.

bhousel added a commit to facebook/Rapid that referenced this pull request Nov 29, 2023
@k-yle k-yle added the bug A bug - let's fix this! label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug - let's fix this!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create duplicate line segments by deleting node on line.
1 participant