Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Via way restrictions [WIP] #1828

Conversation

rparanjpe-tesla
Copy link
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
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
Member

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants