Repository navigation
Add support for multi via-way restrictions - #2695
lukasalexanderweber wants to merge 5 commits into
Conversation
296fe5d to
73c62b1
Compare
|
I've added another test to show when this approach does not work: with the restrictions when turning right from e, we'll be detoured on b'. However, we cannot reach On the other hand, we can not reach SUMMARY The presented approach will fail if a via way of a multi-via-way-restriction is already in use by another via-way-restriction. I tested that this is the case in @easbar we already have the need of multiple artificial edges for overlapping ONLY restrictions. Do you think we should go in this direction or have you any concerns introducing them? |
|
Thanks for continuing with this. I won't be able to properly review this this year, but will definitely pick up on this afterwards.
I don't think introducing multiple such edges introduces conceptually new problems compared to using just one such edge, so I would not try to avoid this at all costs. However, I'd like to be able to tell whether an edge is an artificial one and which original edge it belongs to. Imagine you wanted to block a certain road after the OSM import. You'd have to know if there is a (or if there are any) artificial duplicates that also need to be blocked. Btw the single via-way restrictions are now live on graphhopper.com/maps and so far I heard no complaints :) |
This is also the case for single via-way restrictions: #2907, and not only for the 'only' restrictions which we already ignore. |
|
@easbar, this capability would be very useful for several turn restriction cases we're looking to add to a network, e.g., to avoid u-turns on dual carriageways (one-way edge -> two-way edge -> one-way edge). Is it looking like this PR will progress or has it run into a dead end? |
|
I'm actively working on this right now. Do you have some examples of cases you are looking at specifically? That would be very helpful. |
|
@dteirney @lukasalexanderweber I have created a new implementation that supports multi via-way restrictions as well as overlapping restrictions here: #3030 |
Follow up to #2689:
With the existing approach for single via way restrictions, multi via ways should become quite trivial:
A restriction
a via b via c to dis modeled as restrictionsa via 1 to b(so the route must procceed on artificialb')b' via 2 to c(so when being on a artificial edge we can't go back to the original graph) NEWc' via 3 to d(so we can't reach d when coming from a)using
bandc, we can reachdtrough other edges crossing at1or2I checked some real life examples from the via way restriction gist which all worked as expected:
1747816, 2063168, 2063172, 2081739, 2896789, 4497772, 4498302One thing I noticed for only restrictions (e.g. 4498302) is that the route becomes wrong if it ends within a (multi) via way restriction (same as OSRM). If it goes all the way to the end of the restriction it works perfectly fine.