Creating IMG files from OSM .map files is Typwiz and MapUploader

From OpenStreetMap Wiki
Jump to: navigation, search


Living in the South of Luxembourg, I plot mainly in the Grand Duchy and Northern France. For this I use a Garmin Oregon 450. My hobby is creating informative maps for use by walkers, and Luxembourg is a real paradise for anyone interested in walking in undisturbed peace. My mad ambition is to plot all the official and local walks in Luxembourg. There are so many, so it will take a few years.


Software I use for creating IMG files from OSM .map files is Typwiz and MapUploader, both published by Pinns.
Pinns MapsourceUploader will convert any .osm map into an .img file which can then be uploaded effortlessly via Mapset Toolkit into Mapsource/your GPS.
It needs a TYP file, and various associated style files, and the beauty of Typwiz is that it comes with essental sample files to get you going. Bored of motorways being blue,houses being black,paths not showing up, Typwiz will put you in charge to change the look of your map the way it suits you best.

Two caveats however.
As style files define how the TYP hexcodes are being applied, you can not use a third party's TYP file without having also its associated style files. Eg. your normal style polygon file may define landuse=residential [0x02 resolution 18] but another TYP file may have been created where landuse=residential [0x09 resolution 18]. Example below will show the effect of such a case where landuse=residential colour would change from dark grey to light blue.

A further Caveat, associated with the above:
Garmin's Mapinstall software will not transfer your own created TYP files with the IMGs. Instead, it uses its default TYP file for any IMGs imported and thus will show a bare minimum of data on your GPS. Fortunately, its predecessor, "Mapsource", does the IMG transfer correctly.

How does Typwiz Work?

Below three screenshots of making a residential polygon grey.

STEP ONE (using Typwiz Style Editor - polygons)


STEP TWO (using Typwiz - polygons)


STEP THREE (using Garmin Mapsource or Basecamp)

Map below shows the residential area as dark grey (ie. 0x0200).
Other features showing how the map was customised are the yellow triangle on a blue background, the white/red bar and yellow CFL symbols denoting the walkroutes Sentier du Sud, GR5 and CFL3. The local busroute 9 has been programmed to be flanked by a light bright green line, and roads in dark pink indicate that no streetnames have been declared.
If the map appears to be "over the top", this has been done deliberately to show what can be done. It can easily be tweeked to an individual's taste using the style files that come with Typwiz. Note, that the contours are not from OSM, but come from Garmin.


Below the same map as customised by Openfietsmap with no POIs .


and by OpenMountainbike, again not showing any POIs .


How do I transfer a map into my Garmin?

Introducing Typwiz's companion, MapUploader

This is another essential bit of software from Pinns. It creates the gmapsupp.img file which is the map Garmin can read. Following procedure needs to be followed first before using the software:

(a) Export the .osm file from OSM, or use any .osm/.osm.pbf file from another source (such as Geofabrik [ ]) (see BLUE 1 below; note: for files over 30MB you need also to have installed latest version of the OSM Splitter [1] )
(b) Have your Style directory in place containing the relations/lines/polygons/points files (see BLUE 2 below)
(c) Have your .TYP file in place (see BLUE 4 below)

Clicking on the Auto Create will produce an img file that loads onto Basecamp/Mapsource, plus a gmapsupp.img file for your Garmin. There are some very advanced features in this software such as using Splitter that are all described in the comprehensive manual.
An explanitory Youtube video can be viewed at [2] .

Below my example of a map created for the East of Rumelange, GD of Luxembourg with a plethora of walking routes and the lone PC8 cyclist route. The French flags show where the country border lies with France.


And this shows the numerous walks around Troisvierges in the very North West of Luxembourg


If you are happy with the default Garmin TYP file, below walks in the Bech-Kleinmacher area of Luxembourg.


Creating OSM relations

That dreaded 'Advanced' button

OSM enables walks,cycle or busroutes to be plotted by means of creating a unique "relation". Fortunately, this is easier than it seems at first sight. To create a relation, a number of menus have to be battled with as shown.


Minimum tags required

Having reached this far, the following tags should now be added into the next Menu (5):

ref=... (user defined)
name=... (user defined)
osmc:symbol=... (enter if a symbol meets the OSM list of available symbols, otherwise do not create this tag; see below) 
network=... (options are: network=lwn,network=rwn,network=iwn indicating resp. local,regional or international walks)


Now exit by clicking the X button and save OSM. To find out what relationnumber has been created, go back to the node you created and check back to stage 1 where it should now appear.

What does osmc:symbol= do?

OSM have developed a number of predefined tags for a hiking relationship to define various official symbols in use for walks the world over.
Its basic syntax is split into three sections, each separated by a colon (line-colour (user defined): background colour : symbol colour).


So a relation defined as osmc:symbol=red:blue:yellow_triangle denotes a yellow triangle on a blue background and making its route show up as a red line on your map. And, osmc:symbol=orange:white:blue_pointer would approach the symbol used for the Luxembourg Auto-pedestres Fleche Bleu walks, linked by an orange line.
See [3] for a full list of predefined osmc tags available. There is understandably confusion amongst OSMers as to the relevance of the line colour. It is totally arbitrary, whereas the colour of the background and symbol is not. In fact, walking maps produced by [4] Waymarked Trails ignore any user defined linecolours and make it dependent on the network=... tag.

What if my symbol does not fit any of the osmc:symbol=... tags?

If your walking symbol is not part of the approved osmc list - it may be a flower, animal or prominent figurehead - then, there is a simple solution, and the example below will show how this is done.

Create your own route symbols

The importance of the style files
As mentioned above, the style files are text files you define yourself on your PC, in which the look of your map is being defined using mkgmap protocol [5]. There are mainly four such files, called: (1) relations, (2) points, (3) lines, & (4) polygons. A new symbol would therefore need to be defined in the relations, points and line files (since we want to add a line with a certain colour to show what route the symbol follows), but not in the polygon file.
And to make it appear at all, there must be a relation defined in OSM with a minimum of three tags (see Menu 5 above). Below, an example of a star symbol used for the Promenade du Souvenir (starting at Bettendorf and skirting Hoesdorf). The following three tags must be defined in the relation:

ref=SOU #(ref is user defined, but should not be more than 8 characters)

To get this effect, the US Star symbol needs to be created in Typwiz under POIs (eg. 341F), and the green line in LINES (eg. 10610), and the following syntext needs to be added in the three style files:

Style Relations

type=route & route=hiking & ref='SOU' {apply { add my_tagsou=yes}} 

Style Points

mkgmap:line2poi=true & mkgmap:line2poitype=mid & my_tagsou=yes [0x341F resolution 24] 

Style Lines

my_tagsou=yes {set GREEN=yes}
GREEN=yes  [0x10610 resolution 24 continue] 

And, when combined with the latest Luxembourg .osm file, result is as follows:


Steep climb ahead?

If someone has created an incline=... tag, this will not show up on the standard Mapnik maps. A waste of input? Not quite! First, use Typwiz to create the red/white danger triangle, give it a number (eg 6503) and add the following text in your points style:

mkgmap:line2poi=true & mkgmap:line2poitype=mid & incline=* [0x6503 resolution 24]

The danger triangle will now show up on your map whenever there was an incline issue. It's that simple!


Maginot Bunkers

As mapnik does not display historic=bunker, a wealth of information gets unnoticed. Here, my solution showing all bunkers plotted around the Cattenom (Moselle 57) area.


Luxembourg National Walking Route Symbols

National Routes


PRE OSM tag 2352076 - Sentier de Preizerdaul (Arsdorff-Bettborn-Ettelbrueck

RHR OSM tag 1902977 - Relais Hellange-Remerschen

SAT OSM tag 2096356 - Sentier de l'Attert

SMD OSM tag 2317895 - Sentier de Moellerdall

SMN OSM tag 1823374 - Sentier des Mineurs

SEI OSM tag 2820943 - Sentier de l'Eisleck


SDUS OSM tag 1901460 - Sentier du Sud (Rodange-Hellange)

SAE OSM tag 2071064 - Sentier Ardennes-Eifel

PAN OSM tag 1610004 - Sentier Panorama (Troisvierges-Wiltz)

AP OSM tag 1932764 - Sentier de l'Alzette (Mersch-Dommeldange)


SLD OSM tag 1952362 - Sentier du Sud (Luxembourg-Dudelange)

SMO OSM tag 1904232 - Sentier de la Moselle

HSU OSM tag 2389051 - Sentier du Haute Sur

SSC OSM tag 2639516 - Sentier des Sept Châteaux

PSW OSM tag 3558170 - Sentier de la Petite Suisse


SCM OSM tag 1904232 - Sentier Charles Mathieu

Ylw diam bb2.jpg

SDN OSM tag 3146842 - Sentier du Nord

SDW OSM tag 3146860 - Sentier de la Wiltz

Fleche bleu.jpg

FB46 OSM tag 3138823 - Fleche Bleu 46: Goebelsmuehle (grade: difficult)

FB53 OSM tag 2258462 - Fleche Bleu 53: Burden

FB87 OSM tag 2342006 - Fleche Bleu 87: Born

FB91 OSM tag 2639438 - Fleche Bleu 91: Eischen II

FB97 OSM tag 2596437 - Fleche Bleu 97: Rollingen

FB110 OSM tag 2605477 - Fleche Bleu 110: Heisdorf

FB116 OSM tag 2032397 - Fleche Bleu 116: Grevenmacher II

FB122 OSM tag 1430571 - Fleche Bleu 122: Kehlen

FB149 OSM tag 1899955 - Fleche Bleu 149: Leudelange

FB151 OSM tag 2006610 - Fleche Bleu 151: Bergem

FB160 OSM tag 1980635 - Fleche Bleu 160: Ellange

FB166 OSM tag 1970106 - Fleche Bleu 166: Rumelange I

FB167 OSM tag 2411876 - Fleche Bleu 167: Rumelange II

FB168 OSM tag 2432328 - Fleche Bleu 168: Dudelange I 1980 Note: This FB was modified in the early '00s to follow a cycle track away from the Radio/TV mast. The reason is not clear, and it sadly misses out on a far superior countryside. The quoted OSM tag however follows the original 1980 route which has no obstructions.

FB169 OSM tag 2373118 - Fleche Bleu 169: Dudelange II

FB176 OSM tag 3115205 - Fleche Bleu 176: Garnich


ADJ OSM tag 2317823 - Sentier des Auberges de Jeunesse
Note: Possibly the oldest marked out walking route in Luxembourg, connecting the various Youth Hostels in the land; its signs are far and few between and often only a white faded triangle can be found without its official blue background. In short, do not rely to find your way to a youth hostel by just following these markings!

Luxembourg Local Community Walks

COR OSM Tag 1661998 - Cornellys Millen

HIB OSM Tag 2318026 - Sentier pédestre Hibou

GIP OSM Tag 1661998 - Ierpeldenger Gipswee

MIR OSM Tag 2640692 - Mirador, Naturentdeckungspfad (Steinfort/Eischen)

MUL OSM Tag 2343781 - Mullerthal Trail

NFK OSM Tag 2827145 - Sentier Naturfrenn Käerjéng

OWL OSM Tag 2360793 - Hassel/Weiler Trail
(Note: this walk is very sparsely signposted)

PAS OSM Tag 2389986 - Sentier des Passeurs (Troisvierges)

SAS OSM Tag 2598166 - Sentier du Village de Resistance (Troisvierges)
(Note: these are two fascinating walks commemorating the route used by the Luxembourg resistance from 1943 onwards to smuggle stranded allied airmen and others back to their distant freedom)

PLA OSM Tag 28029 - Sentier des Planètes (Schifflange)

PAPB OSM Tag 2413055 - Sentier Didactique (Wuederte, Rumelange)

PAPR OSM Tag 2413096 - Sentier Didactique (Frankelach, Dudelange)

(Note: this walk is well signposted, and according to the [6] official brochure has five different starting points which are not part of the circular walk. Strangely enough, there are no markings from any of these starting points which guide the walker to where he will join the walk. Even more unusual, there are signs along the walk to lead the walker back to a starting point - confusing if it was not the original starting point!

ROM OSM Tag 2877048 - Um Roémerwei (Schifflange)
(Note: this walk is very sparsely signposted)

ROSA OSM Tag 1713617 - Rundweg RosaLi (Luxembourg City)

SOU OSM Tag 2261396 - Promenade du Souvenir

VAU OSM Tag 1247959 - Circuit Vauban (Luxembourg City)

WKL OSM Tag 1700576 - Trëppeltour Wäin, KulTour & Landschaft pur (Stadtbredimus)

International Walking Routes through Luxembourg

Grande Randonnee


GR5 Relation 1834861 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) Deleted!

GR57 Relation 157527 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx)

GR570 Relation 1904106 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx)

St. Jakobs Wee

Symbol Jakobsweg.png

JW Relation 1685944 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) (pilgrimage route to Santiago de Compostela, Spain)

French National Walking Routes

Club Vosgien


CV1 OSM tag 1850092 - Sentier de Thionville Nord

CV6 OSM tag 1842301 - Sentier de Zoufftgen

CV7 OSM tag 1849127 - Sentier de Soetrich

CVMIN OSM tag 1942718 - Sentier de la Minette [7]

CVHCH OSM tag 2170182 - Sentier Haut Charme [8]


CV14 OSM tag 1847174 - Sentier de Rustroff

CVBEJ OSM tag 2886599 - Sentier de Beavange sous Justemont

CVBOU OSM tag 2808308 - Sentier de Boust (now shown as a black tower on a white background)


CVBEU OSM tag 1899066 - Sentier Circulaire de Beuvange St-Michel


CVBDC OSM tag 1978823 - Sentier Le Bois de Chadelle [9]

CV15 OSM tag 2093429 - Sentier Koenigsberg

Punkt Rot.png

CVPLA OSM tag 1899069 - Sentier Circulaire du Plateau d'Algrange

RAB OSM tag 2223740 - Sentier V.M. Rabe

Blue diamont.jpg

CVAUM OSM tag 1895214 - Sentier Le Pays Haut Aumetz - Tressange

CVCDI OSM tag 1967243 - Sentier Les chemins de l'insolite (Rodemack-Puttelange)

CVPVH OSM tag 1928465 - Sentier Les Pas de Victor Hugo (Preisch - Mondorff)

Caveat: These appear to be walks that are no longer maintained and may not be passable at various stretches! In case of the above walks, OSM has been updated with the "access=no" tag .

White stripe.jpg

CV11A OSM tag 1925724 - Sentier Liaison GR5 Thionville-Bellevue

GTM OSM tag 2512919 - Sentier de Grande Traversée de la Moselle

Actual Markings