OS Landranger style maps using Open Street Map (OSM) data for display on your Garmin | |
I had been tempted to buy a mapman GPS to replace my Garmin, as it
offers full OS mapping of the UK...but at a price. I had a Garmin
e-trex Cx already, so when my son showed me open street map and how it
could be downloaded I was interested, but it wasnt't all plain sailing
which is why I am explaining what I did here, in case it is of use to
you. I am not trying to replicate the many excellent resources available, just to bring together a few things. I ended up with a gmapsupp.img file to put on my GPS (just copy it into the GARMIN folder on e-trex or edge models) which has mapping for the UK in OS landranger style (red for A roads, blue for motorways, standard land use) which routes me along cycepaths as well as roads (I have avoid highways selected to avoid major roads). I used a machine running Ubuntu 10.04 to do most of the processing (because my Ubuntu laptop is much faster than my Windows desktop) and one running windows (for mapsource as it is a Windows prog). I started my experiment with the ready built maps from VeloMap and OpenMTBmap. I found them admirable, but I did't like the way they routed me down bridleways and footpaths, so I wanted to customise them a bit. This is where the complication started. Creating custom maps for a Garmin is basically a 6 step process. Download the OSM file (and Split into manageable chunks) Download contour files Make into a set of img files Compile into a single gmapsupp file Load into mapsource (windows) Copy to your Garmin device | ![]() Finished map on a Garmin Edge 605 |
Download the OSM ("planet") fileFind the file for the area you want and download it into a new directory into a new directory - I used the bzipped files from geofabrik site, . You can also find them atCloud Made Downloads. Geofabrik has a subdirectory with English counties in which is ideal for experimenting - in that case you don't need to use splitter. Then right click the bzipped file and extract it into the same directory (on my machine, unzipping the UK took a good 15 minutes). To split larger files into manageable chumks I used mkgmap splitter . I downloaded splitter and unzipped it into the same directory as my mapping stuff (I used a machine running Ubuntu 10.04, but it is a java prog, so you should be able to use a windows machine just the same. I then open a terminal (CTRL+ALT+T) cd to the directory with your downloaded osm file and type in (or copy/paste): java -Xmx2048m -jar splitter.jar --max-nodes=300000 --output=xml united_kingdom.osm This takes a while (20 minutes for the UK on my machine), but creates a set of tiles with names like 6324001.osm.gz I found the OSM on Garmin wiki useful in working this out. I also took the hint from the splitter web site that you might need to increase the -Xmx parameter if you get java out of memory messages. I started at 1024 (copying from what I found on the web, but after about 15 mins procesing, this gave: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space The answer was to up the memory allocated to java to 2048 (I think you can make it what you like, provided you have that much physical memory). | ![]() Finished map viewed in mapsource |
Download contour filesThe contour files get overlayed onto your map (at least that's how I understand it), they are relatively small (compared with the OSM "planet" files). I got them from openvelomap. Just unzip into your maps folder to get a (small) set of img files starting with the number 7 (I had four files covering the UK). | ![]() The same area in Google maps ![]() ...this time the on-line Open Street Map |
Make into a set of img files and applying styles.
| |
Compile into a single gmapsupp file on UbuntuAccording to all my research this shoudl have done the trick, creating a single gmapsupp.ing file ready for transfer to your Garmin applying the os50g type file. In fact, while the gmapsupp file was created, the style was definitely not applied.java -ea -Xmx1500m -jar mkgmap.jar --gmapsupp --remove-short-arcs --route --net --style-file=os50 -c template.args os50g.TYP I only managed to make it work by creating the gmapsupp.img on a Windows PC as described below. | |
View in mapsource/compile gmapsupp on a windows PCI had previously downloaded velomap onto my PC (it isn't 100% obvious, but look for the "Europe maps downloads link", then go for your country. It gives a couple of vey useful batch files, one to install the .img tile files into mapsource, the other to create a gmapsupp.img file to transfer to your garmin. These invoke cgpsmapper and gmt.exe. Gmt.exe is part of the velomap download, but you need to install cgpsmapper.I created a copy of the velomap folder. Deleted the IMG files that came with it. I copied across the .img files created previously and the TYP files for the OS50 style. I also put the contour files in this folder. I then amended the batch files to use these TYP files rather than velomap's own by doing a search and replace (replacing velo*.TYP with os50g.TYP and trdn*.TYP with os50.TYP - to save you the bother, here are my amended files: create_mapsource_os50_installationfiles.bat create_gmapsupp_os50.bat All I have done is adjusted the type file references, The mapsource batch file creates an install (and uninstall) batch file which lets you install your maps in mapsource - you need to put in a unique code - I used the first 4 letters from the img files. The gmapsupp batch file creates a gmapsupp file which you just need to transfer to your garmin and now, hey presto, OS landranger maps on my etrex legend. | ![]() |
Copy to your deviceI had an Etrex legend Cx. It had a removeable micro sd card, so I just removed it and copied the gmapsupp.ing file to the GARMIN folder. I now have an Edge 605, for which I copy direct via usb. | |
Download the mapIf you just want to get hold of a UK map without doing it yourself here it is (as February 2012), I have no intention of posting regular updates: gmapsupp.img.I also have a map of the Loire, Brittany, besse-Normandy region of France available for download. |