Skip to content

Improve handling of short ferries without duration tag - #2539

Merged
easbar merged 1 commit into
masterfrom
ferry_speed_min_speed
Mar 15, 2022
Merged

easbar merged 1 commit into
masterfrom
ferry_speed_min_speed

Conversation

@easbar

@easbar easbar commented Mar 15, 2022

Copy link
Copy Markdown
Member

In case there is a duration tag we need to use the distance of the entire way to calculate the speed (see #2528), but when it is missing we should actually use the distance of the edge instead, because there are some ferry ways that visit multiple places like this one: https://www.openstreetmap.org/way/996639224. There are also ferry ways that cross each other. In principle this could mean that a 'long' ferry is split into two 'shorter' parts for which we apply a slower speed (or will apply a slower speed when we fix #2532). But in reality this seems to only happen close to the harbour, so a long ferry really only might be split into a (still) long edge and a (very) short edge. In this case it would be fine to determine the speed for each edge separately, based on the distance of the edge not the entire way. Therefore, I now use the edge distance to determine the speed in case the duration tag is missing. So actually the same as before #2528, but different to what we did before #2457.

The other thing I changed here is I increase the distance limit under which we use the minimum speed for short ferries. Previously we used 300m, but now I use 500m, because since #2528 we use the real distance, not the beeline distance and this can be larger for curved ferry ways. One example is this ferry: https://www.openstreetmap.org/way/3549182 that otherwise would be (much) faster as the beeline distance was below 300m but the actual distance is above 300m. This would change the speed from speedFactor/2 to unknownSpeed (could be a change from 2km/h to 6km/h, so three times faster, if speedFactor was 2 for example). The idea here is that we rather use the lowest possible speed for such short ferries so they are more likely to be avoided.

@easbar easbar changed the title Improve handling of short ferries Improve handling of short ferries without duration tag Mar 15, 2022
@easbar
easbar merged commit 0189036 into master Mar 15, 2022
@easbar
easbar deleted the ferry_speed_min_speed branch March 15, 2022 18:12
@easbar easbar added this to the 5.0 milestone Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better handling for missing ferry duration tags

1 participant