OSM Tools

A collection of ideas to enhance your maps can be downloaded here:'Tricks with Styles'

What are Style files?

To convert osm to an img file mkgmap needs style files to tell it what to render

To obtain your default style files start here.

points pois,bus stops etc amenity=bar [0x3005 resolution 21]
lines highways,polylines highway=motorway [0x01 road_class=4 road_speed=6 resolution 14]
polygons areas landuse=residential [0x02 resolution 18]
overlays bridges,fancy cycle paths 0x215: 0x01, 0x10718`
relations bus/cycle/hiking routes see below

example:amenity=bar [0x3005 resolution 24]

resolution 24 specifies at what zoom level the poi becomes visible.The higher the resolution the deeper the zoom level.

0x3005 specifies the corresponding typ number found in your typ file. Although there is an 'official' list of Garmin types found in the cgpsmapper manual you could select a different number; this is generally not recommended and can cause some unexpected results, particularly in Mapsource.

To capture any pois that have slipped through the net you can place the following AT THE END of your points file:

   amenity=* [0x3018 resolution 24]
historic=* [0x3018 resolution 24]
tourism=* [0x3018 resolution 24]
man_made=* [0x3018 resolution 24]

POI 0x3018 could be a 'question mark' . This will show up on Basecamp as a question mark - replace 3018 if already used!)

Points and use of ~ symbol

This symbol means nearest equivalent. Many satnavs use logos for petrol stations. To obtain the same effect on your nuvis the following may be useful:

  amenity=fuel & operator ~ 'Tes.*'  [0x6106 resolution 20    ]
amenity=fuel & name ~ 'Tes.*' [0x6106 resolution 20 ]

This ensures one icon for all filling stations beginning with Tes , ie Tesco , Tesco Express , Tesco Bristol etc

   amenity=fuel & operator ~ '[Tt]es.*'  [0x6106 resolution 20    ] 

This allows for lowercase entries, ie tesco



  highway=motorway  [0x01 road_class=4 road_speed=6 resolution 14]

road_class=4 refers to routing:the higher the number the more important the highway;road_class=1 would apply to a foot path.
road_speed=6 refers to the maximum speed. The higher the number the faster the speed.

Remember to create a 0x01 in your TYP file.

other examples:

  highway=path  [0x0e road_class=0 road_speed=1 resolution 21]  
railway=disused [0x31 road_class=0 road_speed=1 resolution 21]
railway=platform [0x38 resolution 21]
boundary=national [0x1e resolution 17]
aerialway=cable_car | aerialway=gondola [0x24 resolution 21]

The | symbol means 'OR' . In the above examble both cable car and gondula have the same typ number.
You could also use it to capture misspellings or alternative taggings - see polygons.

Showing Bus/Cycle/Walking routes

  At the beginning of your lines file place :
 bus_route1=yes [0x10301 resolution 18 continue] 
In your relations file place:
 type=route & route=bus { apply { {add bus_route1=yes} }
In TYPwiz create a polyline with width 15 and borders 4 and type number 103 subtype 01

In the following example several tags are rendered in the same way:

landuse=meadow | landuse=grass | landuse=recreation_ground
 | landuse=conservation [0x17 resolution 18]

You can basically render ANYTHING found in the OSM file:

leisure=pitch  [0x17 resolution 23 ]
sport=tennis [0x14 resolution 23 ]
sport=cricket [0x15 resolution 23 ]
sport=basketball [0x16 resolution 23]
sport=soccer | sport=football [0x33 resolution 23]
sport=rugby | sport=rugby_union [0x17 resolution 23]
sport=bowls [0x0E resolution 23]

However, remember that mkgmap stops looking further down the list as soon as it has found a match unless you add 'continue' - ie leisure=pitch [0x17 resolution 23 continue]

So, if someone has tagged an area as:leisure=pitch followed by sport=soccer mkgmap will stop after it has found the 'pitch' tag :the soccer pitch will be rendered as 0x17 ,NOT 0x33.

Solution: place the leisure=pitch at the bottom of the list. (You could also experiment with using the 'continue' command. Insert it after resolution 23,eg

leisure=pitch  [0x17 resolution 23 continue]

. You must do this for all sports except for the last line.