This work flow is for making a single Garmin mapset for all of the Americas. It was done in Windows 10 Pro 64-bit. I see no reason that it could not be adapted to other parts of the world. My computer dates from 2009 and has 16GB of memory. Most of the memory was used. All of the work was done on a “256GB” flash drive (about 238GB available for use) formatted to NTFS to have files larger than 2GB. The scripts assume that the work occurs at the root directory of a disk (flash drive); but, this can be easily changed by appropriate editing of the scripts. This worked for me. Your results may be different. I offer no warranties at all.
I have done this using both Java 8 and 9, which I already have installed and running. Such installation is left as an exercise to the reader.
I use JaVaWa GMTK (under Extras) to install and remove maps. I availed the software from http://www.javawa.nl/gmtk_en.html Unfortunately, the author had a stroke (heseninfarct in Dutch in 2016) is unable to maintain this program.
- Create the directories: \files and \data.
- In \files, download:
A. osmosis-latest.zip from http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-latest.zip
B. mkgmap-r???.zip, bounds.zip and sea.zip from http://www.mkgmap.org.uk/download/mkgmap.html Download latest mkgmap.
C. splitter-r???.zip from http://www.mkgmap.org.uk/download/splitter.html Download latest splitter.
D. cities1000.zip from http://download.geonames.org/export/dump/
- Unzip osmosis, mkgmap and splitter into separate directories within \files, i.e., \files\osmosis, \files\mkgmap and \files\splitter.
bounds.zip, sea.zip and cities1000.zip are used in zipped form.
- From http://download.geofabrik.de/ download North America, Central America and South America .osm.pbf files into \data
- Run combineAmericas.bat in the root directory, i.e., \ This creates \files\americas.osm.pbf Expect this to take several hours.
The combineAmericas.bat script:
\files\osmosis\bin\osmosis.bat ^ --read-pbf \data\north-america-latest.osm.pbf ^ --read-pbf \data\central-america-latest.osm.pbf ^ --read-pbf \data\south-america-latest.osm.pbf ^ --merge --merge ^ --write-pbf \data\americas.osm.pbf
- Run splitterAmericasUC.bat in the root directory, i.e., \ This creates the AmericasUC directory and creates the individual map tile datasets (files). Expect this to take upwards of a day.
The splitterAmericasUC.bat script:
java -Xmx6G -jar \files\splitter\splitter.jar ^ --description="AmericasUC" ^ --geonames-file=\files\cities1000.zip ^ --keep-complete=true ^ --mapid=99870001 ^ --max-areas=9999 ^ --max-nodes=1440000 ^ --max-threads=7 ^ --output=pbf ^ --output-dir=\AmericasUC ^ --precomp-sea=\files\sea.zip ^ --resolution=13 ^ --status-freq=30 ^ --wanted-admin-level=10 ^ --write-kml=\AmericasUC\split.kml ^ \data\americas.osm.pbf
7 Run mkgmapAmericasUC.bat in the root directory, i.e., \ This creates the \AmericasUC\map\AmericasUC directory, which is the MapSource and BaseCamp installable map. Expect this to take upwards of a day.
The mkgmapAmericasUC.bat script:
java -Xmx6G -jar \files\mkgmap\mkgmap.jar ^ --output-dir="AmericasUC"\map ^ --nsis ^ --tdbfile ^ --overview-mapname=99870000 ^ --mapname=99870001 ^ --family-id=9997 ^ --description="AmericasUC" ^ --series-name="AmericasUC" ^ --family-name="AmericasUC" ^ --gmapi ^ --gmapsupp ^ --draw-priority=1 ^ --latin1 ^ --index ^ --housenumbers ^ --bounds=\files\bounds.zip ^ --precomp-sea=\files\sea.zip ^ --location-autofill=is_in,nearest ^ --name-tag-list=name:en,int_name,name ^ --levels=0:24,1:22,2:20,3:18 ^ --overview-levels=4:16,5:14 ^ --add-pois-to-lines ^ --add-pois-to-areas ^ --pois-to-areas-placement ^ --preserve-element-order ^ --road-name-pois ^ --remove-ovm-work-files ^ --route ^ --remove-short-arcs ^ --adjust-turn-headings ^ --process-destination ^ --process-exits ^ --reduce-point-density=3 ^ --reduce-point-density-polygon=4 ^ --merge-lines ^ --drive-on=detect,right ^ --check-roundabouts ^ --check-roundabout-flares ^ --max-jobs=7 ^ --verbose ^ --order-by-decreasing-area ^ -c \AmericasUC\template.args ^ \typ\Symbols.typ
- Use JaVaWa to install the map into MapSource and BaseCamp. The options needed are under Extras.
A few comments and notes:
A. The documentation for levels and overview-levels is severely lacking. I had to read the source code to learn how to use them.
The integers to the left of the colon must start from 0 and be used consecutively across both the levels and overview-levels. The integers to the right of the colon is the maximum level of map detail to be presented at that map zoom level. These integers run from 1 at the continental level of detail to 24 at the finest level of mapping. See http://wiki.openstreetmap.org/wiki/Template:Admin_level_10 for appropriate overview-levels values. The integers to the right of the colon should be monotonic decreasing but do not need and probably should not be consecutive. Levels values to the right of the colon ought not get smaller than 13. Overview-levels values should not get larger than 12.
B. MapSource and BaseCamp fail if there are more than 2025 tiles in a mapset.
C. I made my maps for my Garmin StreetPilot 2610 receivers. They can not handle lower case street names. That is the reason for the UC in the script names. These scripts are for those receivers. If your Garmin receiver can handle lower names, then, you may add a " -lowercase ^" line to the mkgmap script.
D. My \type\Symbols.typ file I am not providing. You need to provide one or let mkgmap provide its default TYP file. This is the file that provides the images that indicate types of areas in the Garmin receivers’ displays according to the areas Garmin tag value. See following item! If you want to edit a type file, then, I suggest TypViewer.
E. The translation from OSM tags to Garmin hexadecimal tag values occurs in the mkgmap style files. If you want to change these translations, then,
copy \files\mkgmap\examples\styles\default directory to, e.g., \files\mkgmap\examples\styles\ILikeThis and
add a " --style-file=\files\mkgmap\examples\styles\ILikeThis ^" to the mkgmap script. These are text files and can be editted with most text editors such as Vim, Emacs or Notepad.