logo separator

[mkgmap-dev] Bicycle routing improvements (reverting breakage from r1431)

From Marko Mäkelä marko.makela at iki.fi on Tue Aug 10 21:32:42 BST 2010

Hallo Felix,

On Tue, Aug 10, 2010 at 05:27:34PM +0200, Felix Hartmann wrote:
>I designed the routing in such a way, that it works much better for 
>motorcars/motorcycles (bare the Mapsource intertileroutingproblems). As 
>you cannot have different road_speed for cyclists vs cars, one should 
>better compromise on the bicycle side, as proper bicycle routing will 
>anyhow not work on a map that is rather made for motorcars.

Right, the default style has to work for all routing. We cannot tweak it 
to improve bicycle routing, if the tweaks would ruin car routing.

>highway=trunk and bicycle=no --- well that is based on the crap
>introduced by having country defaults. Were an international map, but 
>we fuck it up by introducing different rules by country (and those not 
>clear either).

I found this wiki page: 
http://wiki.openstreetmap.org/wiki/Trying_to_find_a_solution_for_country_specific_and_defaults_values

Perhaps we could get the default attributes for various kinds of ways 
from an enclosing boundary relation, e.g., country border. In that way, 
one could build a map that covers, say, Germany and France (with 
different default maxspeed for certain roads).

>Usually trunk roads suck outright for cyclists, if you don't add 
>bicycle=no, bicycles will primarily be routed on primaries and trunk 
>roads. That's good for people that take a pleasure in being able to 
>calculate a route for 200 or 300km distance, but bullshit if you want 
>to be routed on roads without much traffic.

On my Edge 705, which is designed for bicycle use, if I choose bicycle 
routing, it will prefer cycleways for the first and last couple of 
kilometers of the route. In the middle of the route (after riding a 
couple of kilometers), it will instruct me to turn from the cycleway to 
the car road and continue on that. If the car road is tagged bicycle=no, 
it will instruct me to take a detour. For example, the 2*70 km route 
that I made last weekend would have been something like 280 km with the 
bicycle routing option, using lesser car roads. With car routing 
"shortest route", it was 67 to 78 km, depending on whether to avoid 
unpaved roads and major roads. For long-distance bicycling, I would 
precompute the route and load it in *.gpx format to the device. Outside 
cities, I would use car routing with shortest distance.

>As long as there is no consensus worldwide whether or not cyclists by 
>default are allowed on trunk roads, I wouldn't add them (and even then 
>it probably makes not much sense, you would have to enter them as 
>road_class=0, road_speed=0 --> but that clashes with motorcar usage).

I would say that as long as there is no consensus how to define country 
defaults, we should not be adding any defaults ourselves. It is better 
to be explicit in the map data and define bicycle=no where appropriate: 
either on the affected ways themselves, or in the country defaults (once 
a standard for those is agreed upon).

What if we had a separate style for bicycle routing, with road_class and 
road_speed defined in such a way that minor roads are preferred?

>highway=path has usually tags like sac_scale, mtb:scale, tracktype and 
>similar attached, if not than it should be added, therefore roadspeed=1 
>is IMHO correct. Else pathes won't be chosen at all (except for tiny 
>distances).

How would sac_scale, mtb:scale, tracktype and similar affect the 
road_speed? In the default style, they only control the mkgmap:unpaved 
flag. There are so many categories of unpavedness. Unpaved roads that 
are forbidden from motor vehicles or are well maintained can be as 
pleasant as paved ones. I have not set "avoid unpaved roads", even 
though I ride narrow tires (28-622).

>Only road_speed=0 and road_speed=1 are taken for route priority,

Can you explain that once more? Is the bicycle speed assumed to be 
constant regardless of road_speed, or is road_speed=1 faster than 
road_speed=0?

Assuming that ways with road_speed=1 are preferred over ways with 
road_speed=0 in bicycle routing, I am suggesting that highway=path 
without bicycle=designated or bicycle=official should have road_speed=0, 
as it was before r1431. The bicycle-friendlier highway=path would be 
road_speed=1. Is my assumption correct? Can you see any problem with my 
suggestion?

>however TTP is still valid for bicycles as for motorcars, which of 
>course is clearly a default in the Garmin GPS Software, because even on 
>a trunk_road you will never need say 2 minutes to turn as a cyclist, 
>but this TTP is calculated.

TTP=tight turn penalty or turn time penalty? That we cannot do anything 
about, I guess, and I am not sure whether we even should. It is nicer to 
ride on routes with smooth turns.

>As I wrote back then, routing for cars would still work much better, if 
>indicated max_speed can only decrease road_speed, not increase it.  
>Loads of problems related to this fact here.

That I don't know much about. I hope that some day, there will be 
useable navigators running free software. Then it will be possible to 
take stuff like schedules into account (rush hours, railway crossings, 
ferries).

Best regards,

	Marko



More information about the mkgmap-dev mailing list