More surprising : it seems that bicycle routing
always avoids tracks with tag tracktype=grade4 or grade5 (surface=soil/sand/grass, lack of hard material) :
https://github.com/osmandapp/OsmAnd-resources/blob/master/routing/routing.xml#L470(why is the value for grade4 lower than the one for grade5 ?)
I think it's not a good choice, because it doesn't satisfy any the two kinds of cyclists :
- people with a moutain bike (or an old bike) don't really care about cycling on tracks "grade4/5". So value could be higher (0.8 ?)
- people with a road bicycle (or a city bike) often want to avoid unpaved ways, unless there isn't really any other possibility.
About footways: a problem is that they are not always forbidden to bicycles (if it is, it should be tagged). Maybe their value could be lower (0.6 instead of 0.9 ?)
About paths: a problem is that "These routes may have any type of surface" Wiki. So they could be paved... For me, they are in most cases unpaved, so it'd be logical to avoid them in the avoid_unpaved strategy (although I read somewhere that in Germany cycleways are often tagged with highway=path; could someone confirm that ?).
So, what about this ?
<way attribute="priority">
<select value="0.1" t="highway" v="track">
<if param="avoid_unpaved"/>
</select>
<select value="0.1" t="highway" v="path">
<if param="avoid_unpaved"/>
</select>
<select value="0.8" t="tracktype" v="grade4"/>
<select value="0.8" t="tracktype" v="grade5"/>
<select value="1" t="highway" v="track"/>
<select value="1" t="highway" v="path"/>
<select value="0.6" t="highway" v="footway"/>