Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

splitting way doesn't work on loops #3495

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 4 comments
Closed

splitting way doesn't work on loops #3495

openstreetmap-trac opened this issue Jul 23, 2021 · 4 comments

Comments

@openstreetmap-trac
Copy link

Reporter: tko
[Submitted to the original trac issue database at 11.43am, Saturday, 29th January 2011]

When a way connects to itself, say forming a 'P' shape, selecting the node in the three way junction enables the 'split way' function but clicking the button doesn't actually do anything.

I was expecting it to separate the loop from the straight part.

@openstreetmap-trac
Copy link
Author

Author: stevage
[Added to the original trac issue at 2.53am, Monday, 31st January 2011]

Yes, I have seen this too. I'll take a look at it.

Question: how should splitting the junction on a figure-of-eight behave?

  1. Two separate loops (would require joining two sub-ways)
  2. One loop and two separate ways
  3. One "P" and a separate way
  4. Four separate ways

It currently does 3).

@openstreetmap-trac
Copy link
Author

Author: tko
[Added to the original trac issue at 11.52am, Monday, 31st January 2011]

I suppose I'd expect 1) .. or maybe 4) but I don't think it would matter much as long as you can split/merge it to any shape you want.

@openstreetmap-trac
Copy link
Author

Author: randomjunk
[Added to the original trac issue at 2.30pm, Monday, 31st January 2011]

This is not quite correct.[[BR]]
Behaviour splitting a loop is the same as splitting any other way -- it splits the way into two at the specified node, beginning->node and node->end. The problem is that on a loop this can appear a bit weird because the start/end point are the same and depend entirely on how the way was originally drawn.

If you try and split a way on the end point nothing happens.[[BR]]
What happens in a figure-of-eight depends where you started drawing it.

@openstreetmap-trac
Copy link
Author

Author: stevage
[Added to the original trac issue at 10.37pm, Monday, 31st January 2011]

I've fixed the original bug in [25204]. Now that I've investigated the problem a bit, the cause of confusion is distinguishing the node (which is reused at a junction) from the node index (which is unique).

A P-shaped way of length 10 that joins back to itself on node 5 is ambiguous when you click on that node: did you mean index 5, or index 9? Fortunately, pressing split resolves the ambiguity: you couldn't have wanted to split at index 9.

In the case of a figure 8 (let's extend the previous example, and loop from index 5 back to 0, with a total length of 15), it's still ambiguous: when you click the junction and press split, did you mean index 5 or index 9?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant