Rev 2278 | Blame | Compare with Previous | Last modification | View Log | RSS feed
Note that option order is significant: An option only applies to
subsequent input files. (So if you are using splitter, you probably
want to put most of your options before '-c template.args'.)
General options:
--help=topic
Print help on the given topic. If the topic is omitted then a
list of all the help topics is printed instead.
--version
Output program version.
filename
--input-file=filename
Read input data from the give file. This option (or just a
filename) may be given more than once.
--gmapsupp
Create a gmapsupp.img file that can be uploaded to a Garmin or
placed in "/Garmin" in a microSD card (such as by mounting the
device in USB mass storage mode). It can be used on ready
compiled img files, if the input files are not already compiled
then they are compiled first and then the gmapsupp is created.
-c filename
--read-config=filename
The given file is opened and each line is an option setting of
the form option=value, any option that could be used on the command
line can be used, however you omit the leading '--'. The short
option names with a single '-' cannot be used, simply use the
long name instead.
--output-dir=filename
The directory in which all output files are written. It defaults
to the current working directory, ie. the directory the command is
executed from.
-n name
--mapname=name
Set the name of the map. Garmin maps are named by 8 digit
numbers. The default is 63240001. It is best to use a different
name if you are going to be making a map for others to use so
that it is unique and does not clash with others.
--description=text
Sets the descriptive text for the map. This may be displayed in
QLandkarte, MapSource on on a GPS etc, where it is normally shown
below the family name. Example: --description="Germany, Denmark"
Please note: if you use splitter.jar to build a template.args file
and use -c template.args, then that file may contain a
"description" that will override this option. Use "--description" in
splitter.jar to change the description in the template.args file.
--country-name=name
Sets the map's country name. The default is "COUNTRY".
--country-abbr=abbreviation
Sets the map's abbreviated country name. The default is "ABC".
--region-name=name
Sets the map's region name. By default, the map has no region name.
--region-abbr=abbreviation
Sets the map's abbreviated region name. By default, the map has
no abbreviated region name.
Label options:
--latin1
This is equivalent to --code-page=1252.
--code-page=number
This option enables the use of international characters. Only 8 bit
character sets are supported and so you have to specify which code page
you want to use.
It is entirely dependant on the device firmware which code pages are
supported.
--charset=name
This option is obsolete. Change the character set with the --code-page
option.
--lower-case
Allow labels to contain lower case letters. Note that most or all
Garmin devices are not able to display lower case letters at an angle
so this option is not generally useful.
Address search options:
--index
Generate a global address search index. If the --gmapsupp option is
also given, then the index is generated within the resulting
gmapsupp.img file so that address search will work on a GPS
device.
If instead the --tdbfile option is given then the index consists
of two files named osmmap.mdx and osmmap_mdr.img which can be used
with mapsource. (For compatibility, you do not need the tdbfile
option if gmapsupp is not given).
If both the --gmapsupp and --tdbfile options are given alongside
the --index option, then both indexes will be created. Note that
this will require roughtly twice as much memory.
The --overview-mapname option can be used to change these names. If
the mapset is sent to the device from MapSource, it will enable
find by name and address search on the GPS.
The address fields are assigned by special mkgmap address
tags using the style file:
mkgmap:country
mkgmap:region
mkgmap:city
mkgmap:postal_code
mkgmap:street
mkgmap:housenumber
mkgmap:phone
(mkgmap:is_in - used by location-autofill=is_in)
If the index is created from previously compiled .img files, then the
same code page and sorting options (eg. --code-page, --latin1 etc) must
be used as were used to compile the individual map tiles.
--createboundsfile=filename
In case this option is set the given file is read and all boundary
data in it is stored in preprocessed bounds files which are stored
in the directory given as bounds parameter. The preprocessed bounds files
are required to run the option location-autofill=bounds.
The input file with the given filename must contain the boundaries that
should be preprocessed. It can have OSM or PBF fileformat. It is
recommended that it contains the boundary data only to avoid very high
memory usage.
--bounds=directory
The directory that contains the preprocessed bounds files.
Default: bounds
--location-autofill=[option1,[option2]]
Controls how country, region, city and zip info is gathered for
cities, streets and pois.
Default: bounds
bounds The preprocessed boundaries are used to mark all points,
lines and polygons within a boundary with the special tag:
mkgmap:admin_level2 : Name of the admin_level=2 boundary
mkgmap:admin_level3 : Name of the admin_level=3 boundary
..
mkgmap:admin_level11
mkgmap:postcode : the postal_code value
The style file can be used to assign the address tags mkgmap:country,
mkgmap:region etc. with these values.
is_in The is_in tag is analyzed for country and region information.
This is done only for address tags that are not defined by the
style rules.
nearest If all methods before fail the city/hamlet points that are
closest to the element are used to assign the missing address tags.
Warning: elements may end up in the wrong country/region/city.
Style options:
--style=name
Specify a different style name, rather than the default value
(which is the name default).
--style-file=file
Specify an external file to obtain the style from. "file" can
be a directory containing files such as info, lines, options
(see resources/styles/default for an example). The directory
path must be absolute or relative to the current working
directory when mkgmap is invoked.
The file can be a zip file containing the files instead of a
directory.
The files can be at the top level or contained in a folder within
the zip file. If the zip file contains more than one top level
folder then each folder is the name of a style that can be selected
with the --style option.
The argument can also be a URL that specifies the location of a
style file.
For backward compatibility, you can also supply a
map-features.csv file here. Support for that format is likely
to be dropped in the future.
--list-styles
List the available styles. If this option is preceeded by a style-file
option then it lists the styles available within that file.
--levels=levels code
Change the way that the levels on the map correspond to the zoom
levels in the device. See customisation help. The default is:
"0=24, 1=22, 2=20, 3=18, 4=16, 5=15", although each style can have
its own default.
--name-tag-list
Get the tag that will be used to supply the name. Useful for
language variations. You can supply a list and the first one
will be used. eg. --name-tag-list=name:en,int_name,name
--map-features=file
This option is obsolete; use the --style-file option instead.
Product description options:
--family-id
This is an integer that identifies a family of products.
Range: [1..9999]
Mkgmap default: 6324
--family-name
If you build several maps, this option describes the
family name of all of your maps. Garmin will display this
in the map selection screen.
Example: --family-name="OpenStreetmap mkgmap XL 2019"
--product-id
This is an integer that identifies a product within a family.
It is often just 1, which is the default.
--product-version
The version of the product. Default value is 1.
--series-name
This name will be displayed in MapSource in the map selection
drop-down. The default is "OSM map".
--area-name
--overview-mapname=name
If --tdbfile is enabled, this gives the name of the overview
.img and .tdb files. The default map name is osmmap.
--overview-mapnumber=8 digit number
If --tdbfile is enabled, this gives the internal 8 digit
number used in the overview map and tdb file. The default
number is 63240000.
--copyright-message=note
Specify a copyright message for files that do not contain one.
--license-file=file
Specify a file which content will be added as license. Every
line is one entry. All entrys of all maps will be merged, unified
and shown in random order.
Optimization options:
--reduce-point-density=NUM
Simplifies the ways with the Douglas Peucker algorithm.
NUM is the maximal allowed error distance, by which the resulting
way may differ from the original one.
This distance gets shifted with lower zoom levels.
Recommended setting is 4, this should lead to only small differences
(Default is 2.6, which should lead to invisible changes)
--reduce-point-density-polygon=NUM
Allows to set the maximal allowed error distance for the DP algorythm
to be applied against polygons. Recommended setting is 8.
--merge-lines
Try to merge lines. This helps the simplify filter to straighten out
longer chunks at lower zoom levels. Decreases file size more.
Increases paint speed at low zoom levels.
At the moment this option causes routing errors. Use only if routing
is not needed in your map.
--min-size-polygon=NUM
Removes all polygons smaller than NUM from the map.
This reduces map size and speeds up redrawing of maps.
Recommended value is 8 to 15, default is 8.
Miscellaneous options:
--max-jobs[=number]
When number is specified, allow that number of maps to be
processed concurrently. If number is not specified, the limit
is set equal to the number of CPU cores. If this option is not
given at all, the limit is 1 (i.e., the maps are processed
sequentially).
--keep-going
Don't quit whole application if an exception occurs while
processing a job - continue to process the other jobs.
--block-size=number
Changes the block size that is used in the generated map. This
option is not usually needed, but sometimes an error message
will ask you to try a value for this option.
--net
Create maps that supports the "lock to road" option. Not required
if --route is also given.
--route
Experimental: Create maps that support routing. This implies --net
(so that --net need not be given if --route is given).
--drive-on-left
--drive-on-right
Explicitly specify which side of the road vehicles are
expected to drive on. If neither of these options are
specified, it is assumed that vehicles drive on the right
unless --check-roundabouts is specified and the first
roundabout processed is clockwise.
--check-roundabouts
Check that roundabouts have the expected direction (clockwise
when vehicles drive on the left). Roundabouts that are complete
loops and have the wrong direction are reversed. Also checks
that the roundabouts do not fork or overlap other roundabouts.
--check-roundabout-flares
Sanity check roundabout flare roads - warn if they don't point
in the correct direction or if they are not oneway or if they
extend too far.
--max-flare-length-ratio=NUM
When checking flare roads, ignore roads whose length is
greater than NUM (an integer) times the distance between the
nodes on the roundabout that the flare roads connect to. Using
this option with a value of at least 5 will cut down the
number of legitimate roads that are flagged as flare road
problems. Default value is 0 (disabled) because it's not a
completely reliable heuristic.
--ignore-maxspeeds
When reading OSM files, ignore any "maxspeed" tags.
--ignore-builtin-relations
When reading OSM files, skip the built-in processing of
relations. This speeds up the processing non-routable map
layers that do not contain multipolygons. This implies
--ignore-turn-restrictions.
--ignore-turn-restrictions
When reading OSM files, ignore any "restriction" relations.
--ignore-osm-bounds
When reading OSM files, ignore any "bounds" elements.
With this option selected generate-sea sometimes works better,
but routing across tiles will not work.
--preserve-element-order
Process the map elements (nodes, ways, relations) in the order
in which they appear in the OSM input. Without this option,
the order in which the elements are processed is not defined.
--remove-short-arcs[=MinLength]
Merge nodes to remove short arcs that can cause routing
problems. If MinLength is specified (in metres), arcs shorter
than that length will be removed. If a length is not
specified, only zero-length arcs will be removed.
--adjust-turn-headings[=BITMASK]
Where possible, ensure that turns off to side roads change
heading sufficiently so that the GPS believes that a turn is
required rather than a fork. This also avoids spurious
instructions to "keep right/left" when the road doesn't
actually fork.
Optional BITMASK (default value 3) allows you to specify which
adjustments are to be made (where necessary):
1 = increase angle between side road and outgoing main road
2 = increase angle between side road and incoming main road
--report-similar-arcs
Issue a warning when more than one arc connects two nodes and
the ways that the arcs are derived from contain identical
points. It doesn't make sense to use this option at the same
time as using the cycleway creating options.
--report-dead-ends=LEVEL
Set the dead end road warning level. The value of LEVEL (which
defaults to 1 if this option is not specified) determines
those roads to report: 0 = none, 1 = multiple oneway roads
that join together but go nowhere, 2 = individual oneway roads
that go nowhere.
--report-undefined-nodes
Issue a warning when a way references an undefined node.
--road-name-pois[=GarminCode]
Generate a POI for each named road. By default, the POIs'
Garmin type code is 0x640a. If desired, a different type code
can be specified with this option. This is a workaround for not
being able to search for roads.
0x2f15: a blue dot in the middle of the road, and if you select,
or 'hover' over it, the streetname appears.
--add-pois-to-lines
Generate POIs for lines. For each line (must not be closed) POIs are
created at several points of the line. Each POI is tagged with the
same tags like the line and additional tags added by mkgmap:
mkgmap:line2poi=true and tag mkgmap:line2poitype having
the following values:
* start - The first point of the line
* end - The last point of the line
* inner - Each point of the line except the first and the last
* mid - The middle point
--add-pois-to-areas
Generate a POI for each polygon and multipolygon. The POIs are created
after the relation style but before the other styles are applied. Each
POI is tagged with the same tags of
the area/multipolygon. Additionally the tag mkgmap:area2poi=true is
set so that it is possible to use that information in the points style
file. Artifical polygons created by multipolyon processing are not used.
The POIs are created at the following positions (first rule that applies):
polygons:
* the first node tagged with a tag defined by the pois-to-areas-placement
option
* the center point
multipolygons:
* the node with role=label
* the center point of the biggest area
--pois-to-areas-placement[=taglist]
A semicolon separated list of tag=value definitions. A POI is placed at the first
node of the polygon tagged with the first tag/value pair. If none of the nodes are
tagged with the first tag-value pair the first node tagged with the second tag-value
pair is used and so on. If none of the tag-value pairs matches or the taglist is empty
the center of the polygon is used.
It is possible to define wildcards for tag values like entrance=*.
Default: entrance=main;entrance=yes;building=entrance
--precomp-sea=directoryname
Defines the directory that contains the precompiled sea tiles.
When this option is defined all natural=coastline tags from the
input OSM tiles are removed and the precompiled data is used instead.
This option can be combined with the generate-sea options
multipolygon, polygons and land-tag. The coastlinefile option
is ignored if precomp-sea is set.
--coastlinefile=filename[,filename]
Defines a comma separated list of files that contain coastline
data. The coastline data from the input files is removed if
this option is set. Files must have OSM or PBF fileformat.
--generate-sea[=ValueList]
Generate sea polygons. ValueList is an optional comma
separated list of values:
multipolygon
generate the sea using a multipolygon (the default
behaviour so this really doesn't need to be specified).
polygons | no-mp
don't generate the sea using a multipolygon - instead,
generate a background sea polygon plus individual land
polygons with tag natural=land. This requires a
suitable land polygon type to be defined in the style
file (suggested type is 0x010100) and the polygon must
be defined in the TYP file as having a higher drawing
level than the sea polygon type.
no-sea-sectors
disable the generation of "sea sectors" when the
coastline fails to reach the tile's boundary.
extend-sea-sectors
same as no-sea-sectors. Additional adds a point so
coastline reaches the nearest tile boundary.
land-tag=TAG=VAL
tag to use for land polygons (default natural=land).
close-gaps=NUM
close gaps in coastline that are less than this
distance (metres)
floodblocker
enable the flood blocker that prevents a flooding of
land by checking if the sea polygons contain streets
(works only with multipolygon processing)
fbgap=NUM
flood blocker gap in metre (default 40)
points that are closer to the sea polygon do not block
fbthres=NUM
at least so many highway points must be contained in
a sea polygon so that it may be removed by the flood
blocker (default 20)
fbratio=NUM
only sea polygons with a higher ratio
(highway points * 100000 / polygon size) are removed
(default 0.5)
fbdebug
switches on the debugging of the flood blocker
generates GPX files for each polygon checked by
the flood blocker
--make-poi-index
Generate the POI index (not yet useful).
--nsis
Write a .nsi file that can be used with the Nullsoft Scriptable Install System
(NSIS) to create a Windows Mapsource Installer.
--make-all-cycleways
Turn on all of the options that make cycleways.
--make-opposite-cycleways
Some oneway streets allow bicycle traffic in the reverse
direction and this option makes a way with the same points as
the original that allows bicycle traffic (in both directions).
--make-cycleways
Some streets have a separate cycleway track/lane just for
bicycle traffic and this option makes a way with the same
points as the original that allows bicycle traffic. Also,
bicycle traffic is prohibited from using the original way
(unless that way's bicycle access has been defined).
--link-pois-to-ways
If this option is enabled, POIs that are situated at a point
in a way will be associated with that way and may modify the
way's properties. Currently supported are POIs that restrict
access (e.g. bollards). Their access restrictions are applied
to a small region of the way near the POI.
--delete-tags-file=FILENAME
Names a file that should contain one or more lines of the form
TAG=VALUE or TAG=*. Blank lines and lines that start with
# or ; are ignored. All tag/value pairs in the OSM input are
compared with these patterns and those that match are deleted.
--tdbfile
Write a .tdb file.
--tdb-v3
Write a version 3 tdb file instead of the default v4. Not useful.
--show-profiles=1
Sets a flag in tdb file which marks set mapset as having contour
lines and allows showing profile in MapSource. Default is 0
which means disabled.
--draw-priority=25
When two maps cover the same area, this option controls what
order they are drawn in and therefore which map is on top of
which. Higher priorities are drawn "on top" of lower
priorities.
--transparent
Make the map transparent, so that if two maps are loaded that
cover the same area, you can see through this map and see the
lower map too. Useful for contour line maps among other
things.
--no-poi-address
Disable address / phone information to POIs. Address info is
read according to the "Karlsruhe" tagging schema. Automatic
filling of missing information could be enabled using the
"location-autofill" option.
--verbose
Makes some operations more verbose. Mostly used with --list-styles.