OSM Map On Garmin/Cycle map/TYP files

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — OSM Map on Garmin cycle map
· Afrikaans · Alemannisch · aragonés · asturianu · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · Bân-lâm-gú · Basa Jawa · Baso Minangkabau · bosanski · brezhoneg · català · čeština · dansk · Deutsch · eesti · English · español · Esperanto · estremeñu · euskara · français · Frysk · Gaeilge · Gàidhlig · galego · Hausa · hrvatski · Igbo · interlingua · Interlingue · isiXhosa · isiZulu · íslenska · italiano · Kiswahili · Kreyòl ayisyen · kréyòl gwadloupéyen · Kurdî · latviešu · Lëtzebuergesch · lietuvių · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk bokmål · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · português do Brasil · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tiếng Việt · Türkçe · Vahcuengh · vèneto · Wolof · Yorùbá · Zazaki · српски / srpski · беларуская · български · қазақша · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · मराठी · हिन्दी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 吴语 · 粵語 · 中文(繁體)‎ · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް


Please note that I have stopped development of this map (there's nothing much to make better for now, except for searching through proposed features to add even more definitions - it had more definitions than any other OSM for Mapsource map before development stopped though (I included all definitions that were used by teddy and some others). If you simply want a very nice rendering for a very large area (like Austria in one rendering) - than you could stay with this process. If however you want best quality maps for Mapsource, and even more features, then I advise you to use the process I use here: OSM_Map_On_Garmin/mtb_map. If someone wants to have a cycle specific map without focus on mtb tracks, then I would suggest archiving this topic, and building upon my mtb map.

I am of course very proud, that my map rendering for Mapsource has been features as image of the week on the main wiki page!--Extremecarver 17:40, 1 November 2008 (UTC)


on Linux

  • Install the Perl modules IO::Uncompress::Bunzip2 from CPAN
    • IO::Uncompress::Bunzip2 depends on Compress::Raw::Bzip2 and IO::Compress::Base; Debian/Ubuntu users can build packages with e.g. dh-make-perl --build --cpan Compress::Raw::Bzip2
  • Download mkgmap and ungzip it
  • Download osmcut.*.jar from here, and put the .jar in the mkgmap directory
  • Download an .osm file from somewhere (e.g. one of these planet.osm extracts)
  • Download [1] cyclingmap_typfile.pl and save it to mkgmap directory
  • Download [2] cycling_map_features_typfile.csv and save it to "resources" directory in mkgmap directory
  • Download [3] 4011.typ and save it to the directory where you want to put your maps afterwards

on Windows

  • Install Active Perl, Additional Package Bundle-IO-Compress-Bzip2 is necessary (use the "Perl Package Manager" to installe the module)
  • Download mkgmap and ungzip it
  • Download osmcut.*.jar from here, and put the .jar in the mkgmap directory
  • Download an .osm file from somewhere (e.g. one of these planet.osm extracts)
  • Download [4] cyclingmap_typfile.pl and save it to mkgmap directory
  • Download [5] cycling_map_features_typfile.csv and save it to "resources" directory in mkgmap directory
  • Download [6] 4011.typ and save it to the directory where you want to put your maps afterwards

Running it

  • perl cyclingmap_typfile.pl yourosmfile.osm (or yourosmfile.osm.bz2)
  • Note Osmcut.jar is deactivated in mtbmap.pl (by # placed), you have to enable it for bigger country.osm files like Germany or Europe. You may try to render it, but I don't know whether it will render and I don't know whether the Unit will show it. Countries like Austria are fine though.
  • It will create a .img file, which you should copy across to your GPS with Mapsource or Sendmap or QLandkarte
    • Integrate the .TYP file into your map. If working with mapsource under "MS Windows" this is done easily with Mapset Toolkit http://cypherman1.googlepages.com/ or otherwise you can use sendmap. Note: Without typfile this map will not show many details and look horrible. You can also write it manually to the registry. You should be able to use the typ file on linux without problem using mkgmap. You just have to specify the family id to which belong the typ file using the --family-id mkgmap's option.


This Image was featured as Image of the Week on 1. November 2008

Notice: you can see the pink/turquoise cycleroutes even though the way they are using might also be tagged with other attributes that usually prevail. Blue Dotted is Cycleway and not Footway (red dotted)

  • If you want to edit your typfile you can either edit directly in text and then compile, use Maptk or the online editor

http://ati.land.cz/gps/typdecomp/editor.cgi which is easier for beginners.

  • Unsure wheter it displays Umlauts. Does not do Cycle Nodes yet. There are pecularities on mouseover - these are due to a bug in mkgmap (sometimes the information tip in mapsource or on the unit is not displayed at the proper place. Even worse when scrolling from that position, the wrong place at which the information tip was shown before will be used as "scrolling departure location". The implementation using a TYP file is cleaner, but a little bit more difficult than the old way. Typfiles are only used by Garmin Color PNAs, so Garmin Units with B/W display should use the "old" cyclemap procedure (however there shouldn't be many B/W users left and they can still use the old procedure).
  • Severe Limitations: It is very difficult (Perl Programming in the mtbmap.pl) right now to react to two different tags which are used to tag the same way in the database. This is done in mtbmap.pl - however this process has to be greatly overworked.

Polylines mkgmap limitation

  • At the moment, Polylines that are tagged (hexadecimal) between 0x2b and 0x3f will not be seen in Mapsource (as well as 0x17). They will show up on the units themselves however. Mkgmap doesn't yet support 3 byte definitions so polylines can only be integrated from 0x00 to 0x3f (hexadecimal).


==== 13.10.2008 - I have uploaded a new csv definition file including the appropriate typfile. New: Many different sports are now differentiated (i.e. soccer, tennis, motorsports, climbing, table tennis, sport stadium, skateboarding and inlineskating, military buildings, .....), Visual differentiation between school, university, commercial, public, churches and cathedrals, .... buildings. Traffic_light will be shown. Also very importantly - bike rentals will be shown. I.e. all citybikestations in Vienna seem to be shown (free bike rental for up to 1 hour) - very useful for getting around cities on a bicycle. Differentiation between gondolas, chairlifts and drag lifts. Including glacier polygon. Also showing hunting_blinds, and windpower for better orientation. Using theese definitions including typfile now renders a map that differentiates between more relevant features than Osmarender for example (at least in Vienna, I haven't included land features that are specific to deserts for example). --Extremecarver 17:01, 13 October 2008 (UTC)

==== 16.10.2008 - Sorry hadn't uploaded the new files as there were some repairs still to do. Will upload the new files now. Searching for the new POIs should work pretty well too. As a sidenote: it's important that POI get defined with a proper category, so that they don't clutter the search function in the wrong category.

==== 19.10.2008 - Removed --net from the mkgmap compile process. This resolves the mouse tooltip bug present in the --net feature of mkgmap. Therefore no more "locking on road".

==== 29.10.2008 - I will upload a new approach using osm composer here in a few days. This revolutionizes the process of creating garmin cyclemaps. The concept is already dead on, I only need to transfer the map_features.csv properly to osm composer.

SRTM Data / Contourlines

I just tried to get SRTM coverage for the whole of Austria With a rectangle around it using SRTM3 data and - step 10 (every 10m a contourline). This resulted in a 11.4GB osm file. Anyway here is the text that I used in a batchfile to get the data for whole Austria:

srtm2osm.exe -bounds1 46.320596 8.686142 49.073315 17.621614 -step 10 -cat 200 50 10 -large

To build it I used the following batchfile (for a smaller region).

java -Xmx512M -jar D:\Garmin\mkgmap_680\mkgmap.jar --map-features=D:\Garmin\mkgmap_680\resources\cycling_map_features_typfile.csv --levels=0:24,1:22,2:20,3:18,4:16,5:14,6:12 --gmapsupp data.osm srtm.osm

If you now use a osm file from geofabrik as data.osm you can add contourlines to it. It's not difficult to do, but if you want to do this for a large region better use a PC with lots of RAM and empty disk space. If osmcut works perfectly for you, you could also use the command above with the 11.4GB srtm.osm or even from a bigger region.

To incorporate Contourlines see here: Srtm2osm

Future Plans

  • Do the same thing for mtb tracks/trails

Needed: Someone who can rewrite the mtbmap.pl to include mtb trails and tracks (leave the cycletracks inside) (Maybe this can be achieved soon with OSM Composer).

  • Use a DEM (Digital Elevation Model) instead of simple contourlines. So far however AFAIK noone has found out how to do this for Garmin PNAs.
  • Even after the incorporation of a DEM develop an autorouting system that accounts for elevation too - though maybe this will not be possible for Garmin GNAs.
  • See: OSM_Map_On_Garmin/mtb_map

See also