Skip to content

Via way restrictions [WIP]#1828

Closed
rparanjpe-tesla wants to merge 4 commits intoProject-OSRM:developfrom
rparanjpe-tesla:viaway_restrictions
Closed

Via way restrictions [WIP]#1828
rparanjpe-tesla wants to merge 4 commits intoProject-OSRM:developfrom
rparanjpe-tesla:viaway_restrictions

Conversation

@rparanjpe-tesla
Copy link
Copy Markdown
Contributor

This is a branch under development to incorporate via way restrictions, currently with the 'no_' case with a 3-member restriction (from, via, to).

This will work as follows:

  • Read in restrictions if they are a "no_*" restriction on three ways: a->b->c
  • Write out the turn restrictions to the .restrictions file along with the regular restrictions in a special format (documented in the code)
  • Parse in restrictions and during the edge based graph building phase
  • Create extra edge based nodes for the middle way (the via), which essentially retain the state of coming from the "from" way.

Concretely, let's say we have three ways in the restriction: a->b->c (a is the from, b is the via, c is the to). We create a new edge based node (b') and take all of the outgoing edge_based_edges of b and duplicate them so that b' also has those outgoing edges. Next we delete the edge_based_edge connecting a to b and create an identically weighted one from a to b'. Finally we delete the edge from b' to c.

I'll be adding commits to this branch, but would love feedback as I continue development.

@TheMarex @danpat

@TheMarex
Copy link
Copy Markdown
Member

@rparanjpe-tesla The approach seems sound. Only concern seems the nearest neighbor search. Currently we assume that the nearest neighbor is unique - in the case of overlapping segments it obviously wouldn't be the case. As a result we might snap to (b') instead of (b) if we start a search on that segment and won't find a path to (c).

@TheMarex
Copy link
Copy Markdown
Member

Please reopen the PR for master, develop is going away.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants