Include crossing=traffic_signals and use it for walking/cycling penalty on crossings#4574
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #4574 +/- ##
=============================================
+ Coverage 60.86% 60.95% +0.09%
- Complexity 12326 12356 +30
=============================================
Files 1594 1595 +1
Lines 63775 63808 +33
Branches 7004 6999 -5
=============================================
+ Hits 38814 38894 +80
+ Misses 22780 22738 -42
+ Partials 2181 2176 -5 ☔ View full report in Codecov by Sentry. |
|
BTW, I added car-only test cases for the speed test in #4608. If we merge that before this PR then we have a baseline for comparison of the perf impact. |
| } | ||
|
|
||
| public boolean hasTrafficLight() { | ||
| public boolean hasHighwayTrafficLight() { |
There was a problem hiding this comment.
Can these be renamed into what they are used for? Are they for vehicles and pedestrians respectively?
There was a problem hiding this comment.
Highway traffic light is also used for cyclists on car streets, I thought about this too and I ended up naming these like this so how these are used in different types of routing is decided elsewhere.
leonardehrenfried
left a comment
There was a problem hiding this comment.
I have a few requests.
It's actually very hard to predict what the outcome of this will be so I think I will have to trust HSL that they've tested this extensively.
| final var baseDuration = computeNonDrivingTraversalDuration(from, to, toSpeed); | ||
|
|
||
| if (isTurnAcrossTraffic(turnAngle)) { | ||
| if (v.hasCyclingTrafficLight()) { |
There was a problem hiding this comment.
Not sure if it's possible to have a vertex that is both a traffic light and a turn and even less sure if it matters. I'm happy to keep it that way and experiment with the values a bit.
There was a problem hiding this comment.
Yes I wasn't quite sure about this either, thought it might not make sense to apply both of these penalties.
I have tested this with Finland OSM and tag mapping. I would appreciate if someone could also test if this doesn't cause too much problems elsewhere as the tagging conventions etc. can differ. |
leonardehrenfried
left a comment
There was a problem hiding this comment.
I have tested this here in Berlin and found the times to be broadly correct.
Summary
Set a new "crossing traffic light" value on nodes based on crossing=traffic_signals tag and use it for walking/cycling penalty on crossings
Issue
closes #4573
Unit tests
Updated unit tests.
Documentation
Not needed to be updated