German way property set and improvements to bicycle routes - #3405
Conversation
fca4368 to
0c87cc6
Compare
|
Haven't taken a deep look at this but is "a more realistic turn cost model for bicycles that avoids left turns" still a valid concern in countries that use left-hand traffic? |
|
This exact question came up in the dev meeting and I will make it respect left hand traffic. |
| @@ -101,12 +108,25 @@ private double computeCyclingTraversalCost(IntersectionVertex v, StreetEdge from | |||
| var turnAngle = calculateTurnAngle(from, to, request); | |||
There was a problem hiding this comment.
RoutingRequest also contains a field for the driving direction (driveOnRight), which is used by calculateTurnAngle(). The code here seems to work independently of that.
There was a problem hiding this comment.
Well spotted!
Am I reading it correctly that when you set the driving direction then to left hand side, then a left turn is magically turned into a right hand one? If this is the case then I don't need change anything.
There was a problem hiding this comment.
Ok, after a bit of investigation, this does exactly what we need. I've added tests to verify.
fd95fc3 to
38033fe
Compare
|
It turns out that left/hand right hand traffic was already taken into account however the method and variable names made it hard to find out. I've added tests to make sure that it really is the case. I've also incorporated @abyrd's feedback. |
e19d1f1 to
106f26b
Compare
|
@abyrd I've removed the the request parameter I've caught more cases where someone uses logical ORs with an unsupported combination and an exception is thrown. @t2gran @abyrd @optionsome @gmellemstrand Since the improvements of the bicycle routing rests mainly on adding the mixin for lcn/rcn/ncn ways, should I add this to the default way property set? |
c62f119 to
e55a942
Compare
e55a942 to
f6363ec
Compare
f3fbeb5 to
889956d
Compare
…right hand to left hand drive
5881356 to
8209667
Compare
|
I've just taken on the feedback from today's meeting and the formatting feedback by @t2gran. I think this is good for another round of reviews. |
|
Unless there are more review comments, I think this one is ready to merge, isn't it? |
Summary
This PR improves the cycling algorithm by making the following improvements:
lcn,rcn,ncnfrom OSM cycling network relations to the relation's membersIssue
closes #3397
closes #3398
closes #3402
Unit tests
There are a tests covering the way property set and the logical OR.
I've also added a new test for applying the bike route relation tags to the ways.
Code style
✅
Documentation
I've added the way property set to the documentation and updated the documentation about how to prepare OSM data to include bicycle routes.
Changelog
✅