blankblank blank




Converting OpenStreetMap Data Into GPX Or Garmin .img Format



The OpenStreetMap project is “a free editable map of the whole world”, created by users with GPS data or by tracing over Yahoo Maps images (allowed by Yahoo) or public domain Landsat data. Data is viewable by anyone; registration assigns you a username and password that lets you contribute your own data to the project, using a multi-platform map editor like JOSM or Meerkartor. JOSM also lets you save downloaded data from OpenStreetMap, and this data can be converted to the .img format used by Garmin mapping GPS units, or converted to a GPX file for general import into GPS units.

The current OSM data in Garmin .img format is available for the UK, South Africa, and Africa at the Mkgmap wiki site, and for Germany/Netherlands and the entire world at this site. But if you want the most recent data, data subsets for different areas, or don’t want the entire dataset for the world, you can download data for a specific area from OpenStreetMap and convert it yourself to a Garmin .img file. Data coverage is still spotty, so you should check the OpenStreetMap site to see whether the area you’re interested in has data. If yes:

1. Click the “Download some data from the OSM server” link in JOSM, and specify the latitude/longitude bounds of the area you’re interested in (no more than 0.25 degrees square) (note: you’ll need to have entered your OSM username and password in the preferences section).

2. Save the downloaded data as an *.osm file if you want to convert it to Garmin format, else save it as a GPX file.

3. Use the command line Java program Mkgmap to convert the *.osm file to a Garmin img map file (always the same output filename, “63240001.img”, but you can rename it to a different 8-digit number after creation) . If your osm file is called test.osm and is in the same directory as mkgmap.jar, the command syntax is “java -jar mkgmap.jar test.osm”. Enter the appropriate data path if it’s located in a different directory, but the 63240001.img file will always be created in the directory where mkgmap.jar is located. If you’d prefer a GUI, I’ve created a simple one for Windows that you can download here; unzip it to the same directory as mkgmap.jar and run it. The *.osm file will have to be in the same directory as mkgmap.jar for this GUI to work; sorry about that.

4. Upload the .img file to your Garmin GPS using a program like sendMap, or MapUpload if you have a compatible Garmin unit. For GPX files, use the upload program of your choice (e.g. GPS TrackMaker or EasyGPS).

Thanks to David from the UK for the tip.





Looking for something else? Enter some keywords below, then click "Search".    




9 Responses to “Converting OpenStreetMap Data Into GPX Or Garmin .img Format”


  1. 1 Alex

    Hi, and thanks for all the great tools and info !

    I was wondering if there was a way to get OSM data and convert it to shapefiles. My idea is to use OSM data on a Mapguide OS server.

    Any help appreciated.

    Cheers

    Alex

  2. 2 Leszek Pawlowicz

    Check the OSM Wiki for instructions on how to convert an OSM file to GML format, which MapGuide can use. If you want to go a step further, the wiki also gives an example of how to convert a GML file to a shapefile using ogr2ogr.

  3. 3 Michael Morris Franks

    reCAPTCHA

    I am cycling the Coast to Coast Ride frrom Wokington to Tynemouth at the July of July. I have down loaded osm map data and converted them into Garmin Img maps for importing into Mapscource and down loading into a GPS set hopefully the Garmin Edge 705 which I m about to buy. I have downloaded five seperate maps one for each day of the ride each less ha 0.25 square degrees
    I have two questions
    1) is it possible to join the five maps together to form one continous map?
    2) The roads and other features of the map are broken and fragmentry near the edges. Is there any way of avoiding this or fixing it ?

  4. 4 Michael Morris Franks

    I solved the problem of obtaining a map showing the whole C2C route. I went to Planet.osm I used WinWget to down load an entire map from http://www.informationfreeway.org. The boundary box I used was -3.5,51.5,-1.0,53.5 which gave me the whole are.
    When I first converted the map into Garmin img format the main road such as the A69 were shown twice once on their true course and a second time in a series of straight lines resembling a staircase. However I downloaded the latest version of cgpsmapper and that fixed the problem.

  5. 5 Thomas

    Leszek your GUI tool works great!

    Very nice work as always!

    /Thomas

  6. 6 turki

    does the mkgmapGUI suport arabic?
    all arabic letter on the map using mkgmapGUI appers as ?????? ????

  7. 7 chishti

    Hi
    would any one please help me. i have down loaded osm data converted to garman image also. but area was too big so i had to download in 6 files. how to link, join them in one file to upload.
    secondly….the GPS GARMIN Nuvi 760 says….no routes available nearby to plan route ….and it has no voice in img files also,…..
    how to join files to make one map for garmin, how to recognize roads from data for garmin, voice navigation ….how to make voice navigation for these img files.
    thanks and greatful
    chishti

  8. 8 Leszek Pawlowicz

    Do a search on this blog for MapSet Toolkit – it will let you install these map files on MapSource, then upload them to your unit.

    You can’t add routing or voice navigation to these files, it has to be included in the maps when they’re compiled. If you search this blog, you’ll find many sources for Garmin maps, some of which include routing.

  9. 9 Mikey

    Can’t get this to work in Vista. Any suggestions please ?

Comments are currently closed; feel free to contact me with questions/issues.