Skip to content
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

Bicycle profile routes around the edge of a movable bridge area #6609

Open
1ec5 opened this issue Apr 20, 2023 · 0 comments
Open

Bicycle profile routes around the edge of a movable bridge area #6609

1ec5 opened this issue Apr 20, 2023 · 0 comments

Comments

@1ec5
Copy link
Member

1ec5 commented Apr 20, 2023

Issue

A man_made=bridge area only represents the physical footprint of a bridge structure, not a routable closed loop. But the default bicycle profile routes around the edge of this man_made=bridge area in Milwaukee, Wisconsin, that happens to be tagged bridge=movable:

6th Street North Bascule Bridge

Though this example may seem contrived, it’s actually quite easy to encounter because any roadway that the bridge carries needs to be connected to the bridge area. Here, the bicycle profile is using the edge of the bridge area as a shortcut to hop off the curb from the sidewalk to the roadway:

6th Street

Diagnosis

The default bicycle route’s initial routability check passes, because the way has a man_made=* tag (and would also pass it if it only had a bridge=* tag):

data.bridge = way:get_value_by_key("bridge")
(not data.man_made or data.man_made=='') and
(not data.public_transport or data.public_transport=='') and
(not data.bridge or data.bridge=='')

The profile assumes that bikes can go 5 kilometers per hour along a movable bridge:

bridge_speeds = {
movable = 5
},

So it turns the bridge area into a highway=movable edge with a duration weight of 5:

local bridge_speed = profile.bridge_speeds[data.bridge]
if (bridge_speed and bridge_speed > 0) then
data.highway = data.bridge
if data.duration and durationIsValid(data.duration) then
result.duration = math.max( parseDuration(data.duration), 1 )
end
result.forward_speed = bridge_speed
result.backward_speed = bridge_speed
data.way_type_allows_pushing = true

The tests make clear that the profile isn’t checking for a routable highway=* value, as it should:

| cde | | movable | yes |

History

This issue was fixed in #3739, but contrary to the commit message, it was only fixed for the car profile. The foot profile theoretically has the same loophole, but it happens to avoid this issue because no speed is defined for any bridge=* value.

This issue was recently rediscovered by @kaneap in OSMUS Slack. By coincidence, this bridge exacerbates the problem, because each of the streets and paths that pass under the bridge also connects to the bridge area.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant