Changes between Initial Version and Version 1 of UserGuidelinesGISDataOpenStreetMapGarmin


Ignore:
Timestamp:
09/10/10 13:40:23 (11 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserGuidelinesGISDataOpenStreetMapGarmin

    v1 v1  
     1OpenStreetMap data can be downloaded to a Garmin GPS:
     2 * http://wiki.openstreetmap.org/index.php/OSM_Map_On_Garmin
     3
     4Some areas already have this done for you:
     5 * http://wiki.openstreetmap.org/index.php/OSM_Map_On_Garmin/Download
     6
     7Download the data for the area that you're interested in.
     8
     9Easiest way for small areas is using JOSM & save it as filename.osm
     10
     11For larger files use http://wiki.openstreetmap.org/index.php/Osmxapi
     12
     13Calculate the bounding box (Decimal degrees, S & W are negative. Use GoogleEarth's 'Grid' View to help)
     14{{{
     15wget -O filename.osm http://www.informationfreeway.org/api/0.5/*[*=*][bbox=min_long,min_lat,max_long,max_lat]
     16}}}
     17e.g. for Tanzania:
     18{{{
     19wget -O tanzania.osm http://www.informationfreeway.org/api/0.5/*[*=*][bbox=29,-12,41,-1]
     20e.g. for Liberia:
     21{{{
     22wget -O liberia.osm http://www.informationfreeway.org/api/0.5/*[*=*][bbox=-11.5,4.3,-7.35,8.6]
     23
     24or get a planet.osm file from:
     25 * http://wiki.openstreetmap.org/index.php/Planet.osm
     26
     27This may need to be cleaned-up using UTF8sanitizer (needs to have Cygwin1.dll present):
     28 * http://svn.openstreetmap.org/applications/utils/planet.osm/C/UTF8sanitizer.exe
     29{{{
     30UTF8sanitizer.exe <filename.osm >fixed.osm 2>errors.txt
     31}}}
     32
     33Use mkgmap to convert this to be usable on the Garmin:
     34{{{
     35java -jar -Xmx512M mkgmap.jar fixed.osm
     36}}}
     37
     38This will produce a file called 63240001.img.
     39This can be copied to the CF card as Garmin/gmapsupp.img
     40(Put the Garmin into 'Mass Storage' mode to get it to act as a CF card reader)
     41
     42For more help see: http://wiki.openstreetmap.org/index.php/Mkgmap/help
     43
     44If you get :
     45{{{
     46Error at line 216, col 6
     47Bad file format: c:\Temp\cut\63242591
     48}}}
     49then open the file & remove the repeated header from the file!
     50
     51If you just get:
     52{{{
     53Bad file format: c:\Temp\cut\63242591
     54}}}
     55then open the file & convert to UTF-8 (Format menu in notepad++, if too large & it crashes, then use Cygwin/Linux:
     56{{{
     57iconv -f ISO-8859-1 -t UTF-8 filename > output)
     58}}}
     59
     60If downloading the whole of the UK (from http://nick.dev.openstreetmap.org/downloads/planet/) then this is too large to process in 1 go, so do this:
     61{{{
     62UTF8sanitizer.exe <uk-*.osm >fixed.osm 2>errors.txt
     63md cut
     64java -Xmx1024M -jar osmcut.jar 2 fixed.osm cut
     65}}}
     66cygwin:
     67{{{
     68for i in cut/*; do iconv -f ISO-8859-1 -t UTF-8 "$i" > "${i}.utf8"; done
     69}}}
     70
     71{{{
     72java -jar -Xmx1024M mkgmap.jar cut/*.utf8
     73java -jar -Xmx1024M mkgmap.jar --gmapsupp 6*.img
     74}}}
     75
     76To update a gmapsupp.img, rename it as e.g. old.img, & build the new .img via:
     77{{{
     78java -jar -Xmx1024M mkgmap.jar --gmapsupp latest.osm old.img
     79}}}
     80
     81The map can be made visible in MapSource using a .reg file like this one (copy the 6*.img & the 6*.tdb to c:\garmin\osm):
     82 * OSM.reg (attached)
     83NB MapSource 6141 - 6156 are broken - use 6137 for now
     84 * see threads: http://www.poi-factory.com/node/15660, http://www.poi-factory.com/node/20054
     85
     86To split off a smaller area from a larger osm file, use Osmosis:
     87 * http://wiki.openstreetmap.org/index.php/Osmosis
     88{{{
     89java -jar -Xmx512M osmosis.jar --rx horn_contours.osm enableDateParsing=false --sort --bounding-polygon file="sudan2pts.txt" --wx sudan_contours.osm
     90}}}
     91(2pts.txt files available from http://www.maproom.psu.edu/dcw/)
     92
     93To add Contour lines to the .osm files before converting to .img:
     94 * http://wiki.openstreetmap.org/index.php/Srtm2Osm
     95e.g. for Liberia:
     96{{{
     97srtm2osm -large -cat 500 100 -bounds3 "http://openstreetmap.org/?lat=6.47&lon=-9.35&zoom=8&layers=B00FT" -o liberia_contours.osm
     98}}}
     99e.g. for Tanzania:
     100{{{
     101srtm2osm -large -cat 500 100 -bounds3 "http://openstreetmap.org/?lat=-6.89&lon=30.59&zoom=6&layers=B00FT" -o tanzania_contours.osm
     102}}}
     103e.g. for Darfur:
     104{{{
     105UTF8sanitizer.exe <sudan.osm >fixed.osm 2>errors.txt
     106iconv -f ISO-8859-1 -t UTF-8 fixed.osm > sudan.osm
     107srtm2osm -large -cat 800 200 -bounds3 "http://openstreetmap.org/?lat=11.75&lon=27.37&zoom=7&layers=B000FTF" -o darfur_contours.osm
     108}}}
     109e.g. merge Kilimanjaro contours into Tanzania OSM:
     110{{{
     111srtm2osm -step 50 -cat 1000 250 -bounds3 "http://openstreetmap.org/?lat=-3.2&lon=37.2&zoom=9&layers=B00FTF" -merge tanzania.osm
     112}}}
     113e.g. merge Table Mountain contours into South Africa OSM:
     114{{{
     115srtm2osm -step 20 -cat 250 100 -bounds3 "http://openstreetmap.org/?lat=-33.93&lon=18.917&zoom=10&layers=B000FTF" -merge south_africa.osm
     116}}}
     117
     118Can also merge data afterwards using Osmosis:
     119{{{
     120java -Xmx512M -jar osmosis.jar --rx darfur_contours.osm enableDateParsing=false --sort --rx sudan.osm --merge --wx outfile.osm
     121java -Xmx512M -jar osmcut.jar 3.5 outfile.osm cut
     122for i in cut/*; do iconv -f ISO-8859-1 -t UTF-8 "$i" > "${i}.utf8"; done
     123java -jar -Xmx512M mkgmap.jar cut/*.utf8
     124java -jar -Xmx512M mkgmap.jar --gmapsupp 6*.img
     125}}}
     126http://wiki.openstreetmap.org/index.php/Topographic_maps_for_garmin_devices
     127
     128Alternative method for creating Contour maps which doesn't use OSM:
     129 * http://home.cinci.rr.com/creek/garmin.htm
     130
     131If in the UK then can use .img files from Scottish Mountaineering Club:
     132 * http://www.smc.org.uk/ContourMaps.htm
     133To merge these with the OSM data, ensure both Maps are visible in MapSource, select all the segments (using the 'Map Tool') from each in turn, then 'Send to Device'.
     134
     135The gmapsupp.img from the SD card can then be copied-back to use elsewhere.
     136or
     137{{{
     138java -jar -Xmx1024M mkgmap.jar --gmapsupp osm\6*.img contours\*.img
     139}}}
     140
     141Other sources of refined DEMs:
     142 * http://translate.google.com/translate?u=http%3A%2F%2Fwww.mac-im-netz.de%2Fdateien%2Fmaps.html&hl=en&ie=UTF8&sl=de&tl=en
     143
     144----
     145[wiki:UserGuidelinesGISData]