Skip to content

bicycle profile does not handle forward/backward/oneway properly #3052

Open
@danpat

Description

@danpat

If we have a motorway (implied oneway), and it has both foot:forward=yes and foot:backward=yes, then we end up with only the forward direction routable.

The logic in bicycle.lua is incorrect.

These lines should be independent if statements: https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/bicycle.lua#L307-L314 not elseif, as having both tags on a way is valid. We should not assume that the opposite direction is inaccessible either.

Also, https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/bicycle.lua#L312 should be backward_speed not forward_speed.

ALSO, the logic here is difficult to follow because we initially default the travel mode to bicycle here: https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/bicycle.lua#L189-L190

which means that instead of "deny everything, allow some things", we're defaulting to "allow everything, deny some things", but the forward/backward logic isn't working like that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions