I’m using mkgmap to build garmin maps, which works very well, except for a minor problem: ferry’s are not recognized as such when calculating routes in Mapsource, i.e. when you use the setting “try to avoid fery’s” it has no effect. In the definition file “lines” I have the following lines (courtesy of openfietsmap.nl):

route=ferry {add mkgmap:ferry=1} [0x10017 resolution 21-18 continue]
route=ferry [0x1b road_class=1 road_speed=0 resolution 22]

Is there a solution for this?

Hi Joep,
Yes now you mention it, it doesnt work like it should. In other maps with the default mkgmap style this ferry avoidance does work, maybe you can try
route=ferry {add mkgmap:ferry=1} [0x1b road_class=3 road_speed=0 resolution 22]
like it is used in the default style? Or perhaps I’d better use continue with_actions instead of continue:

route=ferry {add mkgmap:ferry=1} [0x10017 resolution 21-18 continue with_actions]
route=ferry [0x1b road_class=3 road_speed=0 resolution 22]

Thanx. that seems to work!
I have yet another question: is there a way to utilize the “avoid date and time closures” in Mapsource? I have found there are tags in OSM (hour_off/hour_on, day_on/day_off, opening_hours) but they don’t seem to be used in mkgmap. I would like to have some way of blocking touristic ferry’s that are only operational in summer/holidays/weekends.

You can only try to set a different line on those ferries, for instance a red line instead of blue (seasonal ferries) and/or make them non-routable. Or make the hour on/off labels visible to put them in the name tag.
But not in a way that mkgmap looks what time or date it is and then calculate a route using those ferries in the weekends or holidays etc or not.

Maybe I’ll make a “summer” and a “winter” map, where the seasonal ferry’s are only routable on the summer map. Displaying extra info in the name tag is a good idea. I’ll have to provide that info myself to OSM first as it seems not to be entered so far in the Netherlands

Of course you should not add this info to the name tag in osm, but only in your style file, something like this:
route=ferry {name ‘${name} / ${opening_hours}’ | ‘${name} / ${hour_on} - ${hour_off}’}

I have added the rules also to my openfietsmap:
route=ferry {add mkgmap:ferry=1} [0x10017 resolution 21-18 continue with_actions]
route=ferry [0x1b road_class=3 road_speed=0 resolution 22]

However, it doesn’t see mkgmap:ferry=1 if there is a bicycle route connected to the ferry route and so it will not avoid it. Ferries without a bike route are avoided. Maybe I should add another rule in the very beginning of my line styles: route=ferry {add mkgmap:ferry=1} I hope that it will cover bicycle routes as well but haven’t tested it yet.

I also noticed that, and moving the ferry statements above the bicycleroute statement fixed it indeed


I had the same issue when defining the secondary roads in another style (small black line) in the zoomlevels that were a littel zoomed out. Result was strange routing and direct routing in all levels. Seems the split view on different zoom levels is not consistent in routing. 2 different styles are not compatible even tough the name “secondary roads” or in this case “ferry” are the same.

gr Wim