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:
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.
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.
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.