Opened 8 years ago

Closed 8 years ago

#3495 closed defect (fixed)

splitting way doesn't work on loops

Reported by: Tommi Komulainen Owned by: potlatch-dev@…
Priority: minor Milestone:
Component: potlatch2 Version:
Keywords: Cc:

Description

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.

Change History (4)

comment:1 Changed 8 years ago by stevage

Priority: majorminor

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

comment:2 Changed 8 years ago by Tommi Komulainen

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.

comment:3 Changed 8 years ago by randomjunk

This is not quite correct.
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.
What happens in a figure-of-eight depends where you started drawing it.

comment:4 Changed 8 years ago by stevage

Resolution: fixed
Status: newclosed

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?

Note: See TracTickets for help on using tickets.