-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fix sliproads scenario 4 #4566
Fix sliproads scenario 4 #4566
Conversation
Removing the link-class check here looks good but we really need to look at real-world situations to make a call here.
|
@oxidase before reviewing, could you provide the map of |
@MoKob here a map in DE and CA with 671 modified locations https://api.mapbox.com/styles/v1/oxidase/cj8ctmb3z8il92qmnnpzkt3q2.html?fresh=true&title=true&access_token=pk.eyJ1Ijoib3hpZGFzZSIsImEiOiJjaXcxNWMxYmswMDRlMnlxOWtlem0yamU3In0.PjtHAtgQDzxhZ1BE484Sqw#7.19/51.554/6.938 Most of nodes are like https://www.mapbox.com/get-directions/#17.24/51.54773/7.21275?coordinates=7.211749965246469,51.54783232143697;7.212753812634247,51.54772639593111 But in some rare cases https://www.mapbox.com/get-directions/#16.75/37.86651/-122.30449?coordinates=-122.30407045878566,37.86592529445568;-122.30339574159481,37.86677712776516 where a single instruction changed to "Turn right onto University Avenue" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The result of the changes I've seen on the map look fine. I am questioning whether allowing links
in general as main road could be a bit too generous, though. This PR is mostly targeting ramps, right? Do you think we could achieve the same with just allowing motorway-links, but not all links?
|
||
// nor the second road coming from the intersection we shotcut must be links | ||
// the second road coming from the intersection we shotcut must be a link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*shortcut
const auto &sliproad_data = node_based_graph.GetEdgeData(sliproad.eid); | ||
if (!sliproad_data.road_classification.IsLinkClass()) | ||
{ | ||
return true; | ||
} | ||
|
||
// otherwise neither the first road leading to the intersection we shortcut | ||
const auto &first_road_data = node_based_graph.GetEdgeData(first.eid); | ||
if (first_road_data.road_classification.IsLinkClass()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried what happens, if you explicitly allow MotorwayLink classes here? Ramps are different than the primary/.. links, right?
1338d12
to
ca065a3
Compare
@MoKob I have updated the map with a condition A typical example is https://www.mapbox.com/get-directions/#18.27/49.46407/8.50528?coordinates=8.50620676926198,49.464227828009285;8.505281415385014,49.46406952432184 |
@oxidase in that case, we can keep it with the complete removal. It looks like we didn't regress anywhere (or at least in no location I've seen). Good to go from my point of view. |
a402079
to
71916a4
Compare
71916a4
to
5e30b4a
Compare
Issue
PR fixes scenario 4 of #4348 by allowing sliproads from links via links.
Tasklist
Requirements / Relations
Link any requirements here. Other pull requests this PR is based on?