You are not logged in.
- Topics: Active | Unanswered
Announcement
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
#1 2014-01-14 10:29:38
- miramikes
- Member
- Registered: 2011-10-16
- Posts: 128
Start with routing
Hi all,
I just made my map finally routeable.
But I still missing some complex understanding how routable should be done.
1) using routable types
2) using road_class, road_speed, access
I looks like need some know-how
the only what I found is this:
mkgmap.jar --help=options doen't show anything about routing
some basic info is in mkgmap pdf documentation. ![]()
Can someone point me to some good complex info about routing pls?
regards
mira
Offline
#2 2014-01-14 20:48:33
- miramikes
- Member
- Registered: 2011-10-16
- Posts: 128
Re: Start with routing
The program mkgmap also handles a way with a non-routable type but with
road_class or road_speed as a routable way as long as the type is < 0x010000.
Does it mean that I can use these types (< 0x010000) for routing?
Or is there some limitation?
regards
mira
Offline
#3 2014-01-14 22:56:49
- ligfietser
- Member

- Registered: 2008-10-09
- Posts: 5,353
- Website
Re: Start with routing
The only routable line types are 0x01-0x09, 0x0a-0x0c, 0x16, 0x1a and 0x1b
Besides the mkgmap pdf manual and the mkgmap mailing list archives you can look in the cgpsmapper manual
http://cgpsmapper.com/download/cGPSmapp … -v02.5.pdf
Offline
#4 2014-01-19 02:25:52
- miramikes
- Member
- Registered: 2011-10-16
- Posts: 128
Re: Start with routing
The only routable line types are 0x01-0x09, 0x0a-0x0c, 0x16, 0x1a and 0x1b
Besides the mkgmap pdf manual and the mkgmap mailing list archives you can look in the cgpsmapper manual
http://cgpsmapper.com/download/cGPSmapp … -v02.5.pdf
The number of routable types is pretty limiting and I am sure that I am not first one who would like to have more routable types. ![]()
I am trying to use routable types as in cgpsmapper manual:
0x01 motorway
0x02 trunk
0x03 primary road
0x04 secondary road
0x05 tertiary
0x06 unclassified, motorway-trunk-primary links
0x07 service road, street road
0x08 footway
0x09 cycleway
0x0a path
0x0b hiking_route
0x0c cycle_route
0x16 track
0x1a steps
0x1b ferry
I would like to have working routing for cars, biking, hiking and backcountry skiing.
Everything is quite working like this, but I missing one routeable type for skiing.
Any suggestion?
mira
Offline
#5 2014-01-19 08:26:40
- ligfietser
- Member

- Registered: 2008-10-09
- Posts: 5,353
- Website
Re: Start with routing
You can use those routable line types for multiple activities by making them transparent, using continue and put another non routable on top that render the activity like walking, cycling or skying.
Note that 0x0c is reserved for junction=roundabout in the routing instruction.
Offline
#6 2014-01-19 13:22:26
- popej
- Member

- Registered: 2008-09-20
- Posts: 500
- Website
Re: Start with routing
Types 0x08, 0x09 are ramps, type 0x0A is unpaved road, types 0x1A, 0x1B are ferries, 0x0C is roundabout. They are treated specially by GPS, for example can cause specific announcement while navigating (ramps, roundabout) or can be excluded from routing by GPS settings (unpaved roads, ferries).
I think you can use for routing types 0x0D - 0x13 too but I haven't tested them all.
popej
Offline
#7 2014-01-19 13:45:30
- miramikes
- Member
- Registered: 2011-10-16
- Posts: 128
Re: Start with routing
You can use those routable line types for multiple activities by making them transparent, using continue and put another non routable on top that render the activity like walking, cycling or skying.
Note that 0x0c is reserved for junction=roundabout in the routing instruction.
Ok I got the idea.
Can be used just one transparent routable type for all activities and just distinguish it purpose by "access" tags?
Or rather use different transparent routable type for each activity?
mira
Offline
#8 2014-01-19 14:15:40
- miramikes
- Member
- Registered: 2011-10-16
- Posts: 128
Re: Start with routing
Types 0x08, 0x09 are ramps, type 0x0A is unpaved road, types 0x1A, 0x1B are ferries, 0x0C is roundabout. They are treated specially by GPS, for example can cause specific announcement while navigating (ramps, roundabout) or can be excluded from routing by GPS settings (unpaved roads, ferries).
Aha .. So in other words these types should be really used for what they are meant for.
Is it complete list of routable types which having "special purpose"?
I think you can use for routing types 0x0D - 0x13 too but I haven't tested them all.
This would be great ... I miss few (3-4) routable types which I can use freely ... I meant they don't have any "special purpose".
mira
Offline
#9 2014-01-19 15:04:09
- popej
- Member

- Registered: 2008-09-20
- Posts: 500
- Website
Re: Start with routing
Better use line types as defined in cgpsmapper manual. I think types 0x01 - 0x03 can have special meaning, they could be preferred when calculating fastest route and can be influenced by "avoid highways" settings (probably 0x01 only).
Some of line types can be invisible by default, you would have to add graphics definition in typ file to see them in device.
Garmin maps are designed for car routing, any other routing type, like for example bicycle routing, is difficult to obtain. If you'd like to create map for bicycle or skiing, than maybe you should use car mode using highway types for dedicated paths.
popej
Offline
#10 2014-01-19 15:12:33
- miramikes
- Member
- Registered: 2011-10-16
- Posts: 128
Re: Start with routing
Better use line types as defined in cgpsmapper manual. I think types 0x01 - 0x03 can have special meaning, they could be preferred when calculating fastest route and can be influenced by "avoid highways" settings (probably 0x01 only).
Some of line types can be invisible by default, you would have to add graphics definition in typ file to see them in device.
ok
Garmin maps are designed for car routing, any other routing type, like for example bicycle routing, is difficult to obtain. If you'd like to create map for bicycle or skiing, than maybe you should use car mode using highway types for dedicated paths.
My Garmin 78s has many options for navigation: car, bicikle, montain bike, walking, hiking, skiing.
mira
Offline
#11 2014-01-19 15:14:15
- miramikes
- Member
- Registered: 2011-10-16
- Posts: 128
Re: Start with routing
Types 0x08, 0x09 are ramps.
Hmmm ...For what I should use these types?
mira
Offline
#12 2014-01-19 16:50:31
- popej
- Member

- Registered: 2008-09-20
- Posts: 500
- Website
Re: Start with routing
These are connections between roads on interchange.
popej
Offline
#13 2014-01-19 17:01:43
- ligfietser
- Member

- Registered: 2008-10-09
- Posts: 5,353
- Website
Re: Start with routing
I think you can use for routing types 0x0D - 0x13 too but I haven't tested them all.
Yep, you can use 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12 and 0x13 for routing too.
0x14 is used for railways, but it is only rendered at very high zoom resolutions.
It is very odd that official Garmin topomaps hardly shows any railways, unless you zoom in very close. ![]()
Offline
#14 2014-01-19 18:11:54
- miramikes
- Member
- Registered: 2011-10-16
- Posts: 128
Re: Start with routing
These are connections between roads on interchange.
Aha ...;) got it. Thank you
Offline
#15 2014-01-19 18:18:43
- miramikes
- Member
- Registered: 2011-10-16
- Posts: 128
Re: Start with routing
popej wrote:I think you can use for routing types 0x0D - 0x13 too but I haven't tested them all.
Yep, you can use 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12 and 0x13 for routing too.
0x14 is used for railways, but it is only rendered at very high zoom resolutions.
It is very odd that official Garmin topomaps hardly shows any railways, unless you zoom in very close.
Excellent! Why this is not documented? ![]()
mira
Offline
#16 2014-01-19 21:35:27
- miramikes
- Member
- Registered: 2011-10-16
- Posts: 128
Re: Start with routing
Hi,
Another question is about routing priority.
If there are two options how to get from A to B on what depend decision?
The shorter is taken? Or quicker?
Is there any way how I can influence the choice by my personal preferencies?
e.g. I prefer bike on low-traffic roads or tracks, but tertiary road is acceptable if no other choice.
regards
mira
Last edited by miramikes (2014-01-19 23:48:46)
Offline
#17 2014-01-19 22:43:58
- ligfietser
- Member

- Registered: 2008-10-09
- Posts: 5,353
- Website
Re: Start with routing
Garmin looks at the road_speed and road_class parameters, the number of turns it has to make (less is better) and maybe sharp bends in the road?
You can play with road_class and speed. But it also depends on the activity, with the new activity routing it looks that cycling activities seem to prefer lower road classes and driving prefers higher road classes. In my cycling map I use higher road classes for cycleways and cycling routes, so the user with a modern garmin has to use the automobile profile instead of the cycling profiles. I also recommend this because there is also a "feature" or bug that blocks routing on every way tagged with access=no if carpool lanes avoidance is activated, which is default in the bicycle profiles. So cycleways with access=no & bicycle=yes will not route in the bicycle profile, unless you switch carpool avoidance off.
Offline
#18 2014-01-20 01:37:31
- miramikes
- Member
- Registered: 2011-10-16
- Posts: 128
Re: Start with routing
Garmin looks at the road_speed and road_class parameters, the number of turns it has to make (less is better) and maybe sharp bends in the road?
You can play with road_class and speed. But it also depends on the activity, with the new activity routing it looks that cycling activities seem to prefer lower road classes and driving prefers higher road classes. In my cycling map I use higher road classes for cycleways and cycling routes, so the user with a modern garmin has to use the automobile profile instead of the cycling profiles. I also recommend this because there is also a "feature" or bug that blocks routing on every way tagged with access=no if carpool lanes avoidance is activated, which is default in the bicycle profiles. So cycleways with access=no & bicycle=yes will not route in the bicycle profile, unless you switch carpool avoidance off.
To me it looks like Garmin should handle routing in clever way and I will not need do any tricky things.
I just finished big changes to my TYP file and lines file to improve using of routable types.
I build my map and make some test routing ... everything works surprisingly well. ![]()
There is only one disapointment ... I thought that my garmin also do ski routing, but it doesn't.
There are these options for routing:
direct routing
automobile driving
motorcycle driving
cycling
tour cycling
mountain biking
pedestrian walking
hiking
mountaneering
atv/off road driving
Is there any chance to make ski routing? For e.g. via "motocycle routing" option ... by making ski routes "super highly attractive" for motorcycle?
best regards
mira
Offline
#19 2014-01-20 08:09:40
- ligfietser
- Member

- Registered: 2008-10-09
- Posts: 5,353
- Website
Re: Start with routing
I'm glad it works for you but it surprises me you wont need any tricks.
You can use skirouting by using tricks like toll road avoidance, only if you dont use this feature of course.
First reset all roads by deleting all toll tags. Then apply mkgmap:toll=yes on all highway=* except the ski routes.
In your motorcycle profile activate toll road avoidance to use the ski pistes
and you are done.
I use this trick to cycle on bike routes. If you dont want to abuse toll roads, you can try the mkgmap:ferry option or maybe treat real toll roads as they were ferry routes to avoid them with the ferry avoidance option.
Offline
#20 2014-01-20 20:19:33
- miramikes
- Member
- Registered: 2011-10-16
- Posts: 128
Re: Start with routing
I'm glad it works for you but it surprises me you wont need any tricks.
I just tried find some routes in city and for car routing has been done on roads shortest possible way,
for bike it was done on bike_route and for hike it leaded shoter way on footways.
So for beginning I am happy ... I will find some issues latter for sure ![]()
You can use skirouting by using tricks like toll road avoidance, only if you dont use this feature of course.
First reset all roads by deleting all toll tags. Then apply mkgmap:toll=yes on all highway=* except the ski routes.
In your motorcycle profile activate toll road avoidance to use the ski pistesand you are done.
I use this trick to cycle on bike routes.
This sounds good to me, but I can't find "toll road avoidance" on my navigation
Should be this option on all garmin models?
If you dont want to abuse toll roads, you can try the mkgmap:ferry option or maybe treat real toll roads as they were ferry routes to avoid them with the ferry avoidance option.
Hmmm ... again I can't find "ferry avoidance" option.
mira
Offline
#21 2014-01-20 22:58:46
- miramikes
- Member
- Registered: 2011-10-16
- Posts: 128
Re: Start with routing
You can use skirouting by using tricks like toll road avoidance, only if you dont use this feature of course.
First reset all roads by deleting all toll tags. Then apply mkgmap:toll=yes on all highway=* except the ski routes.
In your motorcycle profile activate toll road avoidance to use the ski pistesand you are done.
What about just make all road motorcycle=no and just ski routes make motorcycle=yes
Something like this:
highway=* {add motorcycle=no}
piste:type=nordic {add motorcycle=yes}
Can I break something like this?
mira
Offline
#22 2014-01-21 09:57:11
- ligfietser
- Member

- Registered: 2008-10-09
- Posts: 5,353
- Website
Re: Start with routing
motorcycle is not understood by Garmin ![]()
I dont know anything about your gps, but in most modern types only car and foot are supported.
Even bicycle=yes or no is not respected anymore, only in the older gps devices.
All those routing types are somehow related with the road parameters but until now mkgmap does not know exactly how.
Offline
#23 2014-01-21 22:40:42
- miramikes
- Member
- Registered: 2011-10-16
- Posts: 128
Re: Start with routing
motorcycle is not understood by Garmin
I dont know anything about your gps, but in most modern types only car and foot are supported.
Even bicycle=yes or no is not respected anymore, only in the older gps devices.
All those routing types are somehow related with the road parameters but until now mkgmap does not know exactly how.
Hmmm .... Pretty limiting ![]()
But anyway I am quite happy for the moment.
Thank you for help!
mira
Offline
#24 2014-01-21 22:59:17
- ligfietser
- Member

- Registered: 2008-10-09
- Posts: 5,353
- Website
Re: Start with routing
What you also could do, is making separate transparent routable map layers with lines only for each activity and another non routable base layer with topography (landuse, water, pois etc). In every map layer you can choose which ways you want to make routable for each activity and which ways non routable (for instance in your ski map only the pistes are routable). The disadvantage is that you cannot view more layers at the same time in Basecamp or Mapsource.
Offline
#25 2014-01-22 22:29:15
- miramikes
- Member
- Registered: 2011-10-16
- Posts: 128
Re: Start with routing
What you also could do, is making separate transparent routable map layers with lines only for each activity and another non routable base layer with topography (landuse, water, pois etc). In every map layer you can choose which ways you want to make routable for each activity and which ways non routable (for instance in your ski map only the pistes are routable).
It is interesting ... I would like to try. How I can do this?
The disadvantage is that you cannot view more layers at the same time in Basecamp or Mapsource.
This is not big problem for me
mira
Offline