Skip to content
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

Support via-way restrictions for multiple vias #4439

Closed
danpat opened this issue Aug 24, 2017 · 10 comments · Fixed by #5907
Closed

Support via-way restrictions for multiple vias #4439

danpat opened this issue Aug 24, 2017 · 10 comments · Fixed by #5907

Comments

@danpat
Copy link
Member

danpat commented Aug 24, 2017

Over in #2681, support was added for turn restricitons in OSM that use a way as the via.

In theory, it's possible to have multiple vias for a turn, although in practice they're pretty rare, most restructions are expressed with a single via way or node.

For completeness, we should support multiple vias for turn restrictions.

@Andygol
Copy link

Andygol commented Nov 15, 2017

@danpat ✋ I'm really waiting for that moment when this feature would be implemented.
It will help to avoid adding tonnes of excessive TRs 🙄 👉 https://www.openstreetmap.org/#map=19/33.85192/-84.36983

java openstreetmap editor 2017-11-15 21-33-26

/cc @daniel-j-h

@danpat
Copy link
Member Author

danpat commented Nov 16, 2017

@Andygol This ticket is open, but we have no plans to work on it for a while.

Quick question about the modelling at this location. The highlighted node:

screen shot 2017-11-15 at 9 32 57 pm

has two via roles in turn restrictions. You could achieve the same result by simply disconnecting these ways.

@Andygol
Copy link

Andygol commented Nov 16, 2017

You could achieve the same result by simply disconnecting these ways.

Yeah, I know this approach. If we remove this node in order to disconnect the lines, this place will appear in one of the way-crossing validators and the point will be added again - this is not a solution to the problem.

The main goal is to encourage mappers to follow up our mapping guides and establish them as the best practices among OSM community. But without supporting multi-vias turn restriction it is hard to push this approach for mapping activities.

This is suggested mapping of SPI-junctions 👇

java openstreetmap editor 2017-11-09 16-42-54

@ElminsterAU
Copy link

This issue seems to be a lot more urgent now as "multiple via way" restrictions are about to become quite common as the updated turn restriction editor in iD creates them by default.

Here is a restriction that the updated turn restriction editor in iD created 2 days ago simply by clicking the appropriate "NO U-Turn" symbol in the editor:
https://www.openstreetmap.org/relation/8082503

And here is OSRM ignoring it:
https://www.openstreetmap.org/directions?engine=osrm_car&route=-27.22981%2C153.02138%3B-27.23005%2C153.02133#map=19/-27.22996/153.02177

Any chance to support these in OSRM soon?

@blinters
Copy link

I am experiencing the same issue mentioned by @eFrysTon too!. Any updates?

@1ec5
Copy link
Member

1ec5 commented Mar 14, 2018

For what it’s worth, there appear to be just over a thousand turn restriction relations containing multiple via ways. (The query isn’t foolproof; I see a lot of defective restriction relations in there.)

@ElminsterAU
Copy link

Well, may main point was that the graphic turn restriction editor in iD is now creating them with a single click without it even being noticeable that it's a multi-way via restriction or any indication that support for these is still lackluster in available routing engines. Which means they are likely to proliferate in the future.

@danpat
Copy link
Member Author

danpat commented Mar 14, 2018

@eFrysTon the holdup here is that the implementation is not trivial, and is relatively low priority when there aren't that many of these things out there yet.

The way OSRM models the road network as a graph makes it easy to support via-node restrictions (we simply delete an edge and the turn is no longer possible). For via-single-way restrictions, some "tricks" have been implemented, but can't be extended to support the multiple via way restrictions.

Supporting multi-via-way restrictions very likely requires some quite complicated graph transformation/expansion around intersections with multi-via-way restrictions.

As always, pull requests implementing the feature from the community are very welcome :-)

@yaofu1986
Copy link

Hi, I have a maybe silly question: is there any via-way(s) restriction in real-world road network? (I don't have a driving license yet :( )

I mean it seems most of via-ways restriction in OSM is a side product caused by a single physical intersection being divided into multiple OSM nodes.

For example, a classic # shape road, to disable a u-turn then a via-ways restriction is needed. But if we can treat these 4 nodes as a "big intersection node", then a simple "via-big-node" restriction should be sufficient.

But of course, if there really has some kind of via-way(s) restriction in real-life then this "big intersection" approach will be insufficient.

@miklcct
Copy link

miklcct commented Jun 14, 2018

I have modelled this forbidden route as a restriction of multiple via ways:

https://www.openstreetmap.org/relation/7139227#map=17/22.27908/114.18234

None of the OSM routers obey this restriction, but most commercial providers (with Google the most notable exception, where a lot of drivers followed and get caught by police) can avoid it correctly.

Is there any better method for that?

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

Successfully merging a pull request may close this issue.

7 participants