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

Closed
bhousel opened this Issue Jan 2, 2018 · 13 comments

Comments

Projects
None yet
9 participants
@bhousel
Member

bhousel commented Jan 2, 2018

Following #4602 , iD won't allow users to draw self intersecting polygons anymore:

self intersecting polygon

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:

self intersecting line

Is a line that self intersects (without a junction node) always an error?

@bhousel bhousel added the question label Jan 2, 2018

@JamesKingdom

This comment has been minimized.

Show comment
Hide comment
@JamesKingdom

JamesKingdom Jan 2, 2018

Collaborator

I don't think we should disallow self intersecting lines, as I use it to map things like carparks..
Example:

Collaborator

JamesKingdom commented Jan 2, 2018

I don't think we should disallow self intersecting lines, as I use it to map things like carparks..
Example:

@bhousel

This comment has been minimized.

Show comment
Hide comment
@bhousel

bhousel Jan 2, 2018

Member

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.

Member

bhousel commented Jan 2, 2018

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.

@bhousel

This comment has been minimized.

Show comment
Hide comment
@bhousel

bhousel Jan 2, 2018

Member

Another thought: for power infrastructure mapping, it's probably normal for wires and busbars to cross over themselves without a junction point.

Member

bhousel commented Jan 2, 2018

Another thought: for power infrastructure mapping, it's probably normal for wires and busbars to cross over themselves without a junction point.

@1ec5

This comment has been minimized.

Show comment
Hide comment
@1ec5

1ec5 Jan 2, 2018

Collaborator

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
http://www.openstreetmap.org/way/147561712

Collaborator

1ec5 commented Jan 2, 2018

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
http://www.openstreetmap.org/way/147561712

@mvexel

This comment has been minimized.

Show comment
Hide comment
@mvexel

mvexel Jan 2, 2018

Contributor

Perhaps let power users override it by holding some modifier key.
Like in JOSM you can prevent newly created points from snapping to existing ways by holding CTRL.

Contributor

mvexel commented Jan 2, 2018

Perhaps let power users override it by holding some modifier key.
Like in JOSM you can prevent newly created points from snapping to existing ways by holding CTRL.

@1ec5

This comment has been minimized.

Show comment
Hide comment
@1ec5

1ec5 Jan 2, 2018

Collaborator

Perhaps let power users override it by holding some modifier key.
Like in JOSM you can prevent newly created points from snapping to existing ways by holding CTRL.

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.

Collaborator

1ec5 commented Jan 2, 2018

Perhaps let power users override it by holding some modifier key.
Like in JOSM you can prevent newly created points from snapping to existing ways by holding CTRL.

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.

@jjiglesiasg

This comment has been minimized.

Show comment
Hide comment
@jjiglesiasg

jjiglesiasg Jan 3, 2018

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"

jjiglesiasg commented Jan 3, 2018

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"

@andrewharvey

This comment has been minimized.

Show comment
Hide comment
@andrewharvey

andrewharvey Jan 7, 2018

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:

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:
https://www.mapillary.com/app/?lat=-33.817064583333284&lng=151.2013371388889&z=17&pKey=pYSPbO5JFJcL8CyxdMb3WA&focus=photo&x=0.8825145612600467&y=0.5257477211896819&zoom=0

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

andrewharvey commented Jan 7, 2018

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:

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:
https://www.mapillary.com/app/?lat=-33.817064583333284&lng=151.2013371388889&z=17&pKey=pYSPbO5JFJcL8CyxdMb3WA&focus=photo&x=0.8825145612600467&y=0.5257477211896819&zoom=0

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

@systemed

This comment has been minimized.

Show comment
Hide comment
@systemed

systemed Jan 7, 2018

Collaborator

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.

Collaborator

systemed commented Jan 7, 2018

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.

@1ec5

This comment has been minimized.

Show comment
Hide comment
@1ec5

1ec5 Jan 7, 2018

Collaborator

Now ideally these would be split into non-self intersecting sections with a layer tag to know the actual order

I think the rationale in cases like these is that the incline tag already implies the correct layering, but yeah, splitting the way up would be more convenient for some data consumers.

Collaborator

1ec5 commented Jan 7, 2018

Now ideally these would be split into non-self intersecting sections with a layer tag to know the actual order

I think the rationale in cases like these is that the incline tag already implies the correct layering, but yeah, splitting the way up would be more convenient for some data consumers.

@bhousel

This comment has been minimized.

Show comment
Hide comment
@bhousel

bhousel Jan 9, 2018

Member

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.

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.

Member

bhousel commented Jan 9, 2018

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.

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.

@Carnildo

This comment has been minimized.

Show comment
Hide comment
@Carnildo

Carnildo Jan 16, 2018

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

Carnildo commented Jan 16, 2018

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

@verdy-p

This comment has been minimized.

Show comment
Hide comment
@verdy-p

verdy-p Jan 22, 2018

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.
But most quality controls should be done in the final validation step before sending: these self-intersections can be warned and listed before proceeding to confirm the data submission: a user may forget that he created and left a self-intersecting way.

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.

verdy-p commented Jan 22, 2018

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.
But most quality controls should be done in the final validation step before sending: these self-intersections can be warned and listed before proceeding to confirm the data submission: a user may forget that he created and left a self-intersecting way.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment