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 way as via role in turn restriction #483

Closed
S0Cool opened this issue Oct 18, 2012 · 13 comments
Closed

Support way as via role in turn restriction #483

S0Cool opened this issue Oct 18, 2012 · 13 comments
Milestone

Comments

@S0Cool
Copy link

S0Cool commented Oct 18, 2012

OSRM does not route properly through crossing http://osrm.at/1y3.
Probably the reason is applying role "via" in routing relation "only_straight_on" not on node but way. The tagging in OSM database seems to be used correctly but routing algorithms do not include such situation.
Another routing service provides correct driving directions.
Comparison

@tyrasd
Copy link
Contributor

tyrasd commented Oct 18, 2012

By "routing relation" you mean a turn restriction (relation), don't you? As far as I know, turn restrictions with a "via" way (or multiple via ways) are not supported by OSRM for now...

@UmpPCPL
Copy link

UmpPCPL commented Oct 18, 2012

Yes. OSRM supports only simple 3-element relations (Way)->(Node)->(Way).
Something more complicated is not supported.

@S0Cool
Copy link
Author

S0Cool commented Oct 18, 2012

Yes, I mean turn restriction relation.
Are there any plans to support this feature (way->way->way)?

@DennisOSRM
Copy link
Collaborator

Yes, at some point in the future.

@Janjko
Copy link

Janjko commented Jan 23, 2013

There are 2593 turn restrictions OSRM isn't using because of this bug:

http://taginfo.openstreetmap.org/relations/restriction#roles

@seav
Copy link

seav commented Mar 1, 2013

There was an announcement on the osm-dev mailing list about the release of OSRM v0.3.3. I thought that this bug was fixed for that release. Apparently it's not.

Here's a solution, I think:

At least for simple turn restrictions containing a single way with a "via" role, these can be decomposed in the routing graph as several turn restrictions each with a node with a "via" role.

Let's say there's a routing graph with nodes A, B, C, D and edges AB, BC, and CD. The 3 edges are in a turn restriction with AB as "from", BC as "via" and CD as "to". You can then decompose this as follows:

  1. In the routing graph, duplicate the edge BC (noted here as "bc") and mark edge bc as a one-way edge from B to C.
  2. Compose a turn restriction with edge AB as "from", node B as "via", and edge BC as "to".
  3. Compose a turn restriction with edge bc as "from", node C as "via", and edge CD as "to".
  4. Finally, compose turn restrictions for each of the edges that end at node B (noted as XB) with each edge XB as "from", node B as "via", and edge bc as "to"

@woodbri
Copy link

woodbri commented Dec 3, 2013

Do you have any idea when this might be in the plans? I'm running into this problem trying to convert some 3rd party datasets into the normalized file structures. This is also a problem when I try to load pgRouting graphs because we support multiple via nodes there also and my convertor has no way to convert the restriction table to the OSRM normalized files without support for this.

In pgrouting, we defined restrictions as:

cost, to_node, via_nodeN, ..., via_node1, from_node

Where we could either apply an additional cost to make the restricted turn or by setting the cost to -1 to forbid it all together.

The way to understand this restriction definition is:

If you are at to_node, and your parent node is via_nodeN and its parent is via_node... and its parent node is via_node1 and its parent node is from_node, then apply the cost or disallow the path. So we obviously apply these during in Dijkstra solver.

@UmpPCPL
Copy link

UmpPCPL commented Dec 4, 2013

My short comment.
It is most important bug/feature request for me.

@Janjko
Copy link

Janjko commented Dec 5, 2013

There are now 3570 turn restrictions OSRM isn't using because of this bug:

http://taginfo.openstreetmap.org/relations/restriction#roles

@DennisOSRM
Copy link
Collaborator

It is not a bug, but the feature will be implemented in due time.

@UmpPCPL
Copy link

UmpPCPL commented Dec 5, 2013

We know Dennis that it is not so easy. We only want to let you know that it is important feature and many people wait for this. So treat it only as a friendly push in that direction :-)

@woodbri
Copy link

woodbri commented Feb 12, 2015

@DennisOSRM Any idea/update on where this might fit into your plans time wise?

@TheMarex TheMarex modified the milestones: 5.1.0, 5.0 Mar 9, 2016
@TheMarex TheMarex changed the title Ignored routing relation with via role set on way Support way as via role in turn restriction Apr 25, 2016
@TheMarex TheMarex modified the milestones: 5.2.0, 5.1.0 Apr 28, 2016
@TheMarex TheMarex modified the milestones: 5.3.0, 5.2.0 May 11, 2016
@TheMarex TheMarex modified the milestones: 6.1, 5.3.0 Jun 22, 2016
@daniel-j-h
Copy link
Member

The plan for handling via way restrictions is outlined in #2681. Closing this in favor of #2681.

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

No branches or pull requests

9 participants