-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 self-intersecting lines without a junction node? #4646
Comments
Yes @JamesKingdom - self intersecting lines with a junction node are common and valid.. I'm asking about the case of without a junction node. We can put up the nope 🚫 cursor if the user tries to cross their line without adding a junction node. |
Another thought: for power infrastructure mapping, it's probably normal for wires and busbars to cross over themselves without a junction point. |
I’m not sure if it’s valid, but I’ve seen some spiraling staircases mapped as single ways that double back on themselves without intersecting: http://www.openstreetmap.org/way/147561713 |
Perhaps let power users override it by holding some modifier key. |
Alt/Option does the same thing in iD. I like this idea: Alt/Option would become sort of a “force it to go here” modifier. Though I’m not sure what to do about the case where the user still wants to snap after doubling back on the way. |
I really loved if ID could NOT allow self intersecting lines of any kind without a junction node not just for polygons, but any kind of "ways" |
This is a great example, you could have a bridge that circles back on itself so you end up with a single way with a self intersection without a junction node. Now ideally these would be split into non-self intersecting sections with a layer tag to know the actual order, but I think iD shouldn't prevent someone mapping it out as a single way. This isn't quite it but a close example:
I prefer Ctrl like in JOSM, as Alt+Mouse on my window manager moves the whole window if dragging and detaches it from the grid if clicking. (I'm talking about on a PC keyboard) |
https://en.wikipedia.org/wiki/Spiral_(railway) I think there's at least one in China which is all-underground. Generally I guess you'd split these to have layer tags, but a single self-crossing way would be reasonable as a first pass. Still, it's pretty much a one-in-a-million edge case, and I like @mvexel's suggestion of a modifier key. |
I think the rationale in cases like these is that the |
Thanks for your feedback everyone!.. I added this 👍 iD will prevent you from drawing self-intersecting lines, but you can still override the geometry check by holding down Alt/Option. |
I've found a use case for self-intersecting lines, areas, multipolygons, or whatever. When I'm fixing a badly-traced object, I'll usually have nodes flying all over the place as I get them out of the way of my work. It's much easier if I can have things temporarily self-intersecting. (Incidentally, holding down "Alt" won't let me override the default behavior: my window manager uses "Alt+Click" to drag windows.) |
I agree that permitting self-intersectiong lines should be possible even if it requires a modifier key before clicking a new point position that creates such intersection.. So yes "Alt+Click" is OK: the user normally knows it adds a self intersection. The warning may be avoided automatically if the way is marked as "inclined" (spiraling highway in underground tunnels or within buildings, typically for parkings, where some levels in the spiral may not be publicly accessible so you'll turn several times and won't want to map every level), or as outdoor and indoor "stairs" (or "steps") (including stairs around towers to reach an elevated platform or sometimes the level for a bridge built between buildings (over streets or rivers) or from a tower building to the border of a hilll. |
Following #4602 , iD won't allow users to draw self intersecting polygons anymore:
This would be really easy to do for lines too. I just didn't include it because I wasn't completely sure if there is a valid use for this in OSM:
Is a line that self intersects (without a junction node) always an error?
The text was updated successfully, but these errors were encountered: