You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
remove handling of missing estimated_distance. It will never be missing and if it is it's not our fault.
Or what was the reasoning behind this?
use precise distance, not some estimate, because we can
Currently we use the distance between the tower nodes. At some point we used the distance between the first and last way point. I'm not sure if this was ever considered, but what if the way went beyond the map borders? It could happen that a way is only included partially, so the distance would be changed, but e.g. the duration tag would remain the same which could lead to wrong speeds.
Also why do we sometimes return speedFactor/2 and sometimes unknownSpeed depending on distance <= 300?
Currently we use the distance between the tower nodes. At some point we used the distance between the first and last way point. I'm not sure if this was ever considered, but what if the way went beyond the map borders? It could happen that a way is only included partially, so the distance would be changed, but e.g. the duration tag would remain the same which could lead to wrong speeds.
This is a problem actually. First of all, the duration tag refers to the entire way, but in some cases ferry ways are split into several edges (e.g. when different ferry ways share the same nodes, which happens sometimes close to a harbor). Using the duration tag to calculate the speed of each edge is incorrect in this case.
The case of a missing estimated_distance occurred when the first/last node of a ferry way was missing: #2528 (comment)
Also why do we sometimes return speedFactor/2 and sometimes unknownSpeed depending on distance <= 300?
The intention here was probably to make short ferries (like those that just cross a river) as slow as possible to (somewhat) account for the waiting time that might be much longer than the (short) ferry actually takes.
Activity
easbar commentedon Mar 1, 2022
Or what was the reasoning behind this?
Currently we use the distance between the tower nodes. At some point we used the distance between the first and last way point. I'm not sure if this was ever considered, but what if the way went beyond the map borders? It could happen that a way is only included partially, so the distance would be changed, but e.g. the duration tag would remain the same which could lead to wrong speeds.
Also why do we sometimes return
speedFactor/2and sometimesunknownSpeeddepending ondistance <= 300?graphhopper/core/src/test/java/com/graphhopper/routing/util/FerrySpeedCalculatorTest.java
Lines 42 to 46 in c5ea470
graphhopper/core/src/test/java/com/graphhopper/routing/util/FerrySpeedCalculatorTest.java
Lines 56 to 58 in c5ea470
easbar commentedon Mar 8, 2022
This is a problem actually. First of all, the
durationtag refers to the entire way, but in some cases ferry ways are split into several edges (e.g. when different ferry ways share the same nodes, which happens sometimes close to a harbor). Using the duration tag to calculate the speed of each edge is incorrect in this case.The case of a missing
estimated_distanceoccurred when the first/last node of a ferry way was missing: #2528 (comment)The intention here was probably to make short ferries (like those that just cross a river) as slow as possible to (somewhat) account for the waiting time that might be much longer than the (short) ferry actually takes.