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

Split Road does not always work #1419

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

Split Road does not always work #1419

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

Comments

@openstreetmap-trac
Copy link

Reporter: LonelyPixel
[Submitted to the original trac issue database at 8.26pm, Friday, 19th December 2008]

I want to cut a street at a certain point but the option "cut street" (not sure how it's named in English) is disabled. The point is this:

The road to cut is this:

The option has worked with other roads, but not so this time.

OS: Windows XP, Version: Merkaartor 0.12

@openstreetmap-trac
Copy link
Author

Author: dantje
[Added to the original trac issue at 10.20pm, Sunday, 21st December 2008]

This is because the node is part of two roads and the code currently is not clever enough to understand what should be the obvious action. Actually the menu action "split" is inactive
in this case, but the keyboard shortcut is not complaining or doing anything.

Workaround: Select the road you are trying to split, then hold CTRL and select the node at which the road should be broken up. Then try to split again.

@openstreetmap-trac
Copy link
Author

Author: LonelyPixel
[Added to the original trac issue at 7.18pm, Friday, 9th January 2009]

Closed my ticket in mistake...

This patch improves the situation about splitting roads with only a node
selected but no road.

Currently the Split Road command works with only a node selected if the
node is only part of a single road. If a node is part of two roads, once
in the middle of the road and once at the end of a road (the node that
connects the end of one road to the middle of another road - a road
junction node), it cannot determine the road to split, although it's
obvious.

This patch adds code to determine whether a node is the first or last
node of a road. This new test is used to determine whether a node is
part of a single road where it's not at the end. As a side effect, this
also disables the Split Road command if a single node at the end of a
road is selected, in which situation splitting doesn't make sense
anyway. I also found duplicate code to determine the node-on-single-road
situation and eliminated it by calling the other function.

To not confuse existing code, I have added separate functions that do
the "inner" check. Some of the previous functions/variables are not used
anymore for now. I have left them in the code in case somebody wants to
use them or for possible future extensions.

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 1.27pm, Wednesday, 14th January 2009]

(In [13205]) ADD : Single-node splitting of roads even with a connection to the extremity of another road (by Yves Goergen) (closes #1419)

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