Bicycle routing: Would expect higher priority for bicycle roads

Hi,

in the following example the default bicycle routing preferes not a route along a bicycle road:

The bicycle road is here:

I would expect it to prefere the bicycle road (here correctly tagged in osm as: bicycle_road=yes & bicycle=designated), especially because the distances are almost the same and the surface on the bicycle road is even better (asphalt) than on the proposed route (high share of paving stones).
Here is the expected route for me:

Is there a way to change the priority for bicycle roads with custom routing?

Indeed this looks strange and not much of a change is sufficient to use the bike route. You can copy&paste the following custom model:

{
  "priority": [
    { "if": "bike_network == MISSING", "multiply_by": "0.9" }
  ]
}

Maybe @ratrun has an idea why we prefer the other road by default ? Probably the highway=cycleway gets a boost over the highway=residential?

2 Likes

I verified that the problem is that we classify a bicycle route relation with the network=lcn tag as PREFER only, and highway=cycleway gets VERY_NICE, which does not seem right. Probably we should also classify lcn relations as VERY_NICE. But if we boost this by one level we would treat lcn the same like rcn, which also does not seem optimal.

1 Like

Is this such a big issue? Is it more likely to get worse the more local it gets?

You are right. In the meantime I came to the conclusion that treating lcn and rcn is the best option we have. Usually rcn is a litte bit better, but this are probably rare cases and location dependent. I’m going to provide a PR.

1 Like

As bicycle roads ( https://wiki.openstreetmap.org/wiki/Tag:bicycle_road%3Dyes ) and bicycle routes ( https://wiki.openstreetmap.org/wiki/Cycle_routes , represented by bike_network in GH) are a very different concept in OSM and reality, think it would be better to be able to prioritize them also separately in GH.
Bicycle roads are “real” designated cycling infrastructure (in OSM as way) while bicycle routes are just a chain of OSM ways assembled into a OSM relation. Some of a bicycle route’s ways can be “real” designated cycling infrastructure, but some will also be just roads without any “real” designated cycling infrastructure.

Here is an example for Berlin. You can see that there are many bicycle roads (“blue”), that are not part of any bicycle routes (“green”):

I know it might be much to ask for, but I think it would make sense to create a distinct “road attribute” like “cycling_infrastucture” to address dedicated cycling infrastructure and its routing in GH:

I would be happy to provide the OSM tag-sets for this, however I might unfortunately not able to implement that myself in Java.