Mkgmap/help/scripts
Jump to navigation
Jump to search
pyMkgmapGarmin
Last Update: Jan 13th, 2010.
Bleeding edge: On github: http://github.com/Granjow/pyMkgmapGarmin
pyMkgmapGarmin is a script for mkgmap, written in Python. It supports multi-threading, intelligent building, and information storage.
Features (more precisely):
- multi-threading. This makes generation of multiple maps faster if your CPU has more than one core.
- intelligent building: Maps already generated won't be generated again if they did not change in the meantime. Means: If you have built maps for Switzerland, Germany and France, you can easily generate a new one with additionally Liechtenstein and only the latter will have to be built. This may save lots of time. (Like if you think, after building maps for a whole day, «wait, didn't I forget my own country in my map file?»)
- information storage: The script will remember what country name and language abbreviation you've entered for your map files.
- .maplist files: Can be passed as argument. Every line is meant to contain the file name of a .osm.bz2 file. For example switzerland.osm.bz2, liechtenstein.osm.bz2, germany.osm.bz2 and france.osm.bz2 are listed in the file mymap.maplist (each on a single line), and instead of passing all maps you wish to generate simply pass mymap.maplist.
- geonames: Geonames will automatically be used.
For more information please refer to the mkgmap-README.txt
included in the archive.
Example invocation:
$ python pyMkgmapGarmin.py switzerland.osm.bz2 liechtenstein.osm.bz2 austria.osm.bz2
Download mkgmap-garmin (Jan 2011)
Project web page
.maplist file
The map names can be written into a file like mymap.maplist
:
switzerland.osm.bz2 liechtenstein.osm.bz2 austria.osm.bz2
Then we can call it with this command (useful for bigger map collections):
$ python pyMkgmapGarmin.py mkgmap.maplist
Command-line options
See the --help
flag. (When making the .py file executable with chmod u+x pyMkgmapGamin.py
you can execute it as shown below.)
$ ./pyMkgmapGarmin.py -h Read settings: /data/workspace/pyMkgmapGarmin/config.xml Usage: pyMkgmapGarmin.py [options] [.osm.bz2 files] [.maplist files] .osm.bz2 files You can get them from e.g. http://download.geofabrik.de/osm/ or http://downloads.cloudmade.com/. .maplist files Plain text files with a map filename on each line. Will add the maps given there to the list. Options: -h, --help show this help message and exit --nogeonames Do not use geonames file for city entries. (Is otherwise downloaded automatically if not available) --noreuse Do not re-use already compiled images, also if they are identical --backup Create a backup of all settings. TODO (not yet implemented) -s FSTYLE, --style-file=FSTYLE Optional style file (directory or zip) -t FTYP, --typ-file=FTYP Optional TYP file -f SFAMID, --family-id=SFAMID Optional family ID (shall match with TYP file) -n IMAXNODES, --max-nodes=IMAXNODES Maximum nodes per map segment -c FMKGMAPCONFIG, --read-config=FMKGMAPCONFIG Optional mkgmap configuration file (the --read-config= option passed to mkgmap
Multilayer Map
/Multilayer.py Create multilayer maps