graphhopper / graphhopper

Open source routing engine for OpenStreetMap. Use it as Java library or standalone web server.

Home Page:https://www.graphhopper.com/open-source/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bike priority determination problem for tag combination of `cycleway:left` and `cycleway:right`

ratrun opened this issue · comments

Describe the bug
In case that an edge contains both tags cycleway:left and cycleway:right the better priority should be assigned, but this is currently not the case

This test fails passes:

        way.clearTags();
        way.setTag("highway", "primary");
        way.setTag("cycleway:right", "lane");
        assertPriority(SLIGHT_PREFER, way);

this test currently fails:

        way.clearTags();
        way.setTag("highway", "primary");
        way.setTag("cycleway:right", "lane");
        way.setTag("cycleway:left", "no");
        assertPriority(SLIGHT_PREFER, way);

To Reproduce
See https://community.openstreetmap.org/t/neue-routing-engine-valhalla/7204/55

The route is this one: http://localhost:8989/maps/?point=50.7897%2C6.0958&point=50.7872%2C6.0932&profile=bike&layer=OpenStreetMap

Expected behavior
The primary road should not be left and the gas station detour shall be avoided in this case

System Information

master

Screenshots & Logs

The internally assigned priority for the primary segment is "BAD":

Bildschirmfoto vom 2024-04-11 18-36-56-crop

I'll try to prepare a PR for it