Rev 4855 | Blame | Compare with Previous | Last modification | View Log | RSS feed
=== Command line ===
The command line is of the format:
java.exe [java-options] -jar mkgmap.jar [mkgmap-options]
=== Java options ===
Details of the Java options are available at docs.oracle.com. The most likely
options you may need to use are:
-Xmx<size>[g|G|m|M|k|K]
Use this option to set the maximum Java heap size in GB, MB, KB or bytes.
Mkgmap allows the use of multiple CPU cores, and the amount of heap memory
required increases proportionally with the number of CPU cores being used.
The default value may not be sufficient to allow mkgmap to use all the
available CPU cores, which will cause the run time to be longer than
necessary or can cause mkgmap to crash if it runs out of memory. To allow
mkgmap to run optimally, you may need to use this option to allow more
memory to be allocated to the Java heap. Note there is no space or equals
sign in the option.
-enableassertions
-ea
Causes an error to be thrown if an assertion written in the mkgmap code is
evaluated as not true. This is useful in detecting bugs in the mkgmap code.
-Dlog.config=filename
Specifies a logging configuration file that allows you to enable and
disable specific logging messages. This is useful if you want to see
certain types of message that are not logged by default or choose where the
messages should be written.
=== Mkgmap options ===
The order of the options is significant in that options only apply to
subsequent input files. If you are using splitter, you probably will need to
put most of your options before '-c template.args' (this file is generated by
splitter).
=== Information options ===
These options provide information and do not require any input files.
--help[=help|options|links|copyright|logging]
Display help on the given topic. If the topic is omitted then general help
information is displayed, the same as in help=help.
--version
Write program version to stderr.
=== File options ===
filename
--input-file=filename
Read input data from the given file. This option (or just a filename) may
be specified more than once. Make sure you set all wanted options before
this.
--gmapsupp
Create a gmapsupp.img file that can be uploaded to a Garmin or placed in
the /Garmin folder of a microSD card (such as by mounting the device in USB
mass storage mode). It can be used on already compiled img files, or if the
input files are not already compiled then they are compiled first and then
the gmapsupp is created.
--gmapi
Create a directory in the "gmapi" format required by Mac applications. It
can also be used for Windows programs; copy the complete directory tree
into {user}\AppData\Roaming\Garmin\Maps or \ProgramData\Garmin\Maps and the
map will be available to Garmin PC programs. The directory name is
--family-name with extension .gmap.
--gmapi-minimal[=<include-pattern>]
Special option for map providers to reduce disk writes when updating. Works
like --gmapi but does not write Product data for input files which are
provided as *.img. It is assumed that the content of those files wasn't
changed and thus doesn't need a rewrite. The optional include-pattern is a
regular expression which can be used to specify *.img files for which a
write should be forced. The pattern is used on the full path to the input
file. The global index files and the *.tdb file will still contain all
needed references.
Example usage with pattern:
--gmapi-minimal=.*4711[0-9]{4}\.img
This pattern matches file names between 47110000.img and 47119999.img
and ignores the path.
-c filename
--read-config=filename
Each line of the named file contains a command option in the form
option=value or option:value. The options are included as arguments of the
executed command as if they had been specified on the command line with one
exception: a relative path given with option input-file is assumed to be
relative to the location of the file.
Lines beginning with a # character are ignored and can be used as
comments. Any command line option can be specified, however the leading
'--' must be omitted. The short option names with a single '-' cannot be
used, simply use the long name instead.
--output-dir=directory
Specify the directory in which all output files are written. It defaults to
the current working directory, i.e. the directory the command is executed
from.
-n name
--mapname=name
Set the name of the map. Garmin maps are identified by an 8 digit number.
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
Set the descriptive text for individual tiles and gmapsupp.img. Map tiles
take the most recent --description before the --input-file option that
defines the tile. Because gmapsupp.img is created after all the other tiles
have been processed, gmapsupp.img takes the last --description found in the
command line, regardless of where the --gmapsupp option is placed in the
command line.
Note that if you use splitter with its --geonames-file option or its own
--description option, the generated template.args file includes
--description values that will apply to individual tiles. In this case it
is not possible to override splitter's description for individual tiles
from the mkgmap command line. Placing the mkgmap --description option after
-c template.args ensures that the value is applied to gmapsupp.img.
Different GPS devices and PC programs handle descriptions inconsistently.
Some display the description when selecting maps or tiles, others use the
family name.
--country-name=name
Set the map's country name. The default is "COUNTRY".
--country-abbr=abbreviation
Set the map's abbreviated country name. The default is "ABC".
--region-name=name
Set the map's region name. By default, the map has no region name.
--region-abbr=abbreviation
Set the map's abbreviated region name. By default, the map has no
abbreviated region name.
=== Label options ===
--code-page=number
Specify which international character set is to be used. Only 8 bit
character sets are supported so you have to specify which code page you
want to use. It is entirely dependent on the device firmware which code
pages are supported.
--latin1
This is equivalent to --code-page=1252.
--unicode
This is equivalent to --code-page=65001. Note that some devices don't
support Unicode maps produced by mkgmap.
--lower-case
Allow labels to contain lower case letters. Note that many Garmin devices
are not able to display lower case letters at an angle.
=== Address search options ===
--index
Generate an address index to allow searches by address. The default is to
not create an address index.
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 (e.g. --code-page, --latin1) must be used as
were used to compile the individual map tiles.
--split-name-index
Index each part of a street name separately. For example, if the street is
"Aleksandra Gryglewskiego" then you will be able to search for it as both
"Aleksandra" and "Gryglewskiego". It will also increase the size of the
index. Useful in countries where searching for the first word in name is
not the right thing to do. Words following an opening bracket '(' are
ignored.
See also option --road-name-config.
--road-name-config=filename
Provide the name of a file containing commonly used road name prefixes and
suffixes. This option handles the problem that some countries have road
names which often start or end with very similar words, e.g. in France the
first word is very often 'Rue', often followed by a preposition like 'de
la' or 'des'. This leads to rather long road names like 'Rue de la
Concorde' where only the word 'Concorde' is really interesting. In the USA,
you often have names like 'West Main Street' where only the word 'Main' is
important. Garmin software has some tricks to handle this problem. It
allows the use of special characters in the road labels to mark the
beginning and end of the important part. In combination with option
--split-name-index only the words in the important part are indexed.
There are two main effects of this option:
- On the PC, when zooming out, the name 'Rue de la Concorde' is only
rendered as 'Concorde'.
- The index for road names only contains the important part of the
name. You can search for road name 'Conc' to find road names like 'Rue
de la Concorde'. However, a search for 'Rue' will not list 'Rue de la
Concorde' or 'Rue du Moulin'. It may list 'Rueben Brookins Road' if
that is in the map.
Another effect is that the index is smaller.
See comments in the example roadNameConfig.txt for further details.
--mdr7-excl=name[,name...]
Specify words which should be omitted from the road index. It was developed
before option --road-name-config and is probably no longer needed. Matching
is case insensitive.
Example usage: --mdr7-excl="Road, Street, Weg"
--mdr7-del=name[,name...]
Use this option if your style adds strings to the labels of roads which you
want to see in the map but which should not appear in the result list of a
road name / address search. When creating the index, words in the given
list are removed from the end of road labels. Any word not found in the
given list is considerered to be a valid label; words before the last valid
label are not removed. If the label consists of a single word in the given
list, or all the words in the label are contained in the given list, then
the label is omitted from the index. The comparison is case insensitive and
words are separated by a space.
Example: Assume your style adds surface attributes like 'pav.' or 'unp.' to
a road label. You can use --mdr7-del="pav.,unp." to remove these suffixes
from the index.
--poi-excl-index=poi[-poi][,poi[-poi]...]
By default, mkgmap indexes the following POI types with a non-empty label:
- 0x00 .. 0x0f (cities, sub type 0, type <= 0xf)
- 0x2axx..0x30xx (Food & Drink, Lodging, ...)
- 0x28xx (no category ?)
- 0x64xx .. 0x66xx (attractions)
This option allows the exclusion of POI types from the index. The excluded
types are not indexed, but may still be searchable on a device, as some
devices seem to ignore most of the index, e.g. an Oregon 600 with firmware
5.00 only seems to use it for city search. If your device finds a POI name
like 'Planet' when you search for 'Net', it doesn't use the index because
the index created by mkgmap cannot help for that search.
So, this option may help when you care about the size of the index or the
memory that is needed to calculate it. The option expects a comma separated
list of types or type ranges. A range is given with from-type-to-type, e.g.
0x6400-0x6405. First and last type are both excluded. A range can span
multiple types, e.g. 0x6400-0x661f.
Examples for usage:
- Assume your style adds a POI with type 0x2800 for each
addr:housenumber. It is not useful to index those numbers, so you can
use --poi-excl-index=0x2800 to exclude this.
- For the aforementioned Oregon you may use
--poi-excl-index=0x2a00-0x661f to reduce the index size.
--bounds=directory|zipfile
Specify a directory or zip file containing the pre-processed bounds files.
Bounds files in a zip file must be located in the zip file's root
directory.
The pre-processed boundaries are used to add special tags to all elements
(points, lines and polygons) containing the elements location information.
The style file can be used to assign the address tags mkgmap:country,
mkgmap:region etc. using these values.
The following special tags are added:
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
Pre-processed bounds can be created with the following command:
java -cp mkgmap.jar
uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryPreprocessor
<inputfile> <boundsdir>
The input file must contain the boundaries that should be pre-processed. It
can have OSM, PBF or O5M file format. It is recommended that it contains
the boundary data only to avoid very high memory usage. The boundsdir gives
the directory where the processed files are stored. This directory can be
used as --bounds parameter with mkgmap.
--location-autofill=[option1,[option2]]
Controls how the address fields for country, region, city and zip info are
gathered automatically if the fields are not set by using the special
mkgmap address tags (e.g. mkgmap:city - see option --index). Warning:
automatic assignment of address fields is somehow a best guess.
is_in
The is_in tag is analysed for country and region information.
nearest
The city/hamlet points that are closest to the element are used to
assign the missing address fields. Beware that cities located in the
same tile are used only. So the results close to a tile border have
less quality.
--housenumbers
Enables house number search for OSM input files. All nodes and polygons
having addr:housenumber set are matched to streets. A match between a house
number element and a street is created if the street is located within a
radius of 150m and the addr:street tag value of the house number element
equals the mgkmap:street tag value of the street. The mkgmap:street tag
must be added to the street in the style file. For optimal results, the
tags mkgmap:city and mkgmap:postal_code should be set for the housenumber
element. If a street connects two or more cities this allows all addresses
along the road to be found, even when they have the same number.
Example for given street name:
Node - addr:street=Main Street addr:housenumber=2
Way 1 - name=Main Street
Way 2 - name=Main Street, mkgmap:street=Main Street
Way 3 - mkgmap:street=Mainstreet
Way 4 - name=Main Street [A504]
The node matches to Way 2. It has mkgmap:street set with a value equal to
the addr:street tag value of the house number node.
If the street is not given with addr:housenumber, mkgmap uses heuristics
to find the best match.
Tells mkgmap to write NET data. If you specify this option, you do not
need to specify --net and option -no-net is ignored.
=== Overview map options ===
--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.
--overview-levels=level:resolution[,level:resolution...]
Like levels, specifies additional levels that are to be written to the
overview map. Counting of the levels should continue. Up to 8 additional
levels may be specified. The hard coded default is empty.
See also option --overview-dem-dist.
--remove-ovm-work-files
If --overview-levels is used, mkgmap creates one additional file with the
prefix ovm_ for each map (*.img) file. These files are used to create the
overview map. With option --remove-ovm-work-files=true the files are
removed after the overview map is created. The default is to keep the
files.
=== Style options ===
--style-file=directory|zip-filename|url
Specify the path to a directory, zip file or url containing style
information. A style is composed of a group of files and typically contains
the following files: version, info, options, points, lines, polygons,
relations - see the style manual for further details.
The style files can be in the specified directory or contained in a
sub-directory. If styles are contained in sub-directories then the required
style must be specified with the --style option.
--style=name
Specify a style name. Must be used if --style-file points to a location
containing multiple styles. If used without also specifying --style-file,
it selects one of the built-in styles.
--style-option=tag[=value][;tag[=value]...]
Provide a semicolon separated list of tags which can be used in the style.
The intended use is to make a single style more flexible, e.g. you may want
to use a slightly different set of rules for a map of a whole continent.
The tags given will be prefixed with "mkgmap:option:". If no value is
provided the default "true" is used.
Example: --style-option=light;routing=car
will add the tags mkgmap:option:light=true and mkgmap:option:routing=car to
each element before style processing happens. This can then be used in
rules like:
landuse=farmland & mkgmap:option:light=true {delete landuse}
--list-styles
List the available styles. If this option is preceded by a --style-file
option then it lists the styles available within that file or folder.
--check-styles
Perform some checks on the available styles. If this option is preceded by
a --style-file option then it checks the styles available within that file.
If it is also preceded by the --style option it will only check that style.
--levels=level:resolution[,level:resolution...]
Change the way that the levels on the map correspond to the zoom levels in
the device. See customisation help. The hard coded default is: "0:24, 1:22,
2:20, 3:18, 4:16", although each style can have its own default. The
default style for example overwrites it with "0:24, 1:22, 2:20, 3:18". Up
to 8 levels may be specified.
--name-tag-list=tag[,tag...]
Specify the tag that will be used to supply the name. Useful for language
variations. You can supply a list of tags and the first one found will be
used. e.g. --name-tag-list=name:en,int_name,name
=== Product description options ===
--family-id=integer
This is an integer that identifies a family of products. Range: [1..65535]
Default: 6324
--family-name=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. The
default is "OSM map".
Example: --family-name="OpenStreetmap mkgmap XL 2019"
--product-id=integer
This is an integer that identifies a product within a family. It is often
just 1, which is the default.
--product-version=integer
The version of the product. Default value is 100 which means version 1.00.
--series-name=name
This name will be displayed by Garmin PC programs in the map selection
drop-down. The default is "OSM map".
--area-name=name
Area name is displayed on Garmin units (or at least on eTrex) as the second
part of the mapname in the list of the individual maps.
--copyright-message=text
Specify a copyright message for files that do not contain one.
--copyright-file=filename
Specify copyright messages from a file. Note that the first copyright
message is not displayed on a device, but is shown in BaseCamp. The
copyright file must include at least two lines and be UTF-8 encoded. The
following symbols will be substituted by mkgmap: $MKGMAP_VERSION$,
$JAVA_VERSION$, $YEAR$, $LONGDATE$, $SHORTDATE$ and $TIME$. Time and date
substitutions use the local date and time formats.
--license-file=filename
Specify a file which content will be added as license. The license file
must be UTF-8 encoded. The following symbols will be substituted by mkgmap:
$MKGMAP_VERSION$, $JAVA_VERSION$, $YEAR$, $LONGDATE$, $SHORTDATE$ and
$TIME$. Time and date substitutions use the local date and time formats.
All entries of all maps will be merged in the overview map.
=== Optimization options ===
--improve-overview
Tells mkgmap to use a more complex method to calculate the outlines of
complex multipolygons which are visible in the overview map. This reduces
the size of the overview map and it improves especially complex coastline
areas.
--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. (Default
is 2.6, which should lead to invisible changes) See also --simplify-lines
which gives better control.
--reduce-point-density-polygon=NUM
Allows you to set the maximal allowed error distance for the DP algorithm
to be applied against polygons. See also --simplify-polygons which gives
better control.
--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. Default is enabled, use --no-merge-lines to
disable.
--allow-reverse-merge
Use this option to allow the reversing of lines and roads to get even
better results from line merging. Reversing is only done when oneway
attribute allows it and the type has no direction. See
--line-types-with-direction for further details.
--line-types-with-direction=type[,type ...]
Use this option to tell mkgmap which line types should never be reversed.
If your TYP file renders certain line types with a direction even if the
way has no oneway attribute you must list those types here to prevent
reversing.
Example usage: --line-types-with-direction=0x26,0x10005,0x10006
--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.
See also polygon-size-limits.
--polygon-size-limits=resolution:value[,resolution:value...]
Allows you to specify different min-size-polygon values for each
resolution. Example:
--polygon-size-limits="24:12, 18:10, 16:8, 14:4, 12:2, 11:0"
If a resolution is not given, mkgmap uses the value for the next higher
one. For the given example, resolutions 19 to 24 will use value 12,
resolution 17 and 18 will use 10, and so on. Value 0 means to not apply the
size filter. Note that in resolution 24 the filter is not used. The
following options are equivalent:
--min-size-polygon=12
--polygon-size-limits=24:12
--polygon-size-limits=24:0,23:12
--polygon-size-limits=24:0,23:12,22:12,21:12,16:12
--simplify-lines=resolution:value[,resolution:value...]
Use this option to specify different values for the Douglas Peucker
algorithm depending on the resolution when it is applied to lines. It
overwrites the --reduce-point-density value. The syntax is similar to
--polygon-size-limits, but values are given in metres. This distance gets
shifted with lower zoom levels. Example:
--simplify-lines=23:2.6,22:4.2,21:5.4,20:6
--simplify-polygons=resolution:value[,resolution:value...]
Use this option to specify different values for the Douglas Peucker
algorithm depending on the resolution when it is applied to polygons. It
overwrites the --reduce-point-density-polygon value. The syntax is similar
to --simplify-lines.
=== Hill Shading (DEM) options ===
Hill Shading is rendered by BaseCamp and GPS devices when the map includes
a Digital Elevation Model (DEM). Use the following options to add a DEM to
the map and control its characteristics. DEM creation requires files
containing height information for the area covered by the map, the so
called hgt files, which typically cover 1 degree latitude by 1 degree
longitude and are named by the coordinates of their bottom left corner
(e.g. N53E009). They contain height information in a grid of points.
Typical hgt files contain either 1 arc second or 3 arc second data. 3 arc
second files have 1201 x 1201 points, which means files contain 2 x 1201 x
1201 = 2,884,802 bytes. 1 arc second files have 3601 x 3601 points, with a
file size of 25,934,402 bytes. Other files are supported as long as the
formula sqrt(filesize/2) gives an integer value.
--dem=path[,path...]
The option expects a comma separated list of paths to directories or zip
files containing *.hgt files. Directories are searched for *.hgt files and
also for *.hgt.zip and *.zip files.
The list is searched in the given order, so if you want to use 1 arc second
files make sure that they are found first. There are different sources for
hgt files, some have so called voids which are areas without data. Those
should be avoided.
--dem-dists=number[,number...]
If given, the option specifies the resolution(s) for the DEM data. If not
given, mkgmap determines a single value based on the resolution of the hgt
files. For BaseCamp you only need one value; for GPS devices you need one
for each resolution given with the --levels option. The actual values are
the distance between two DEM points and should be a multiple or submultiple
of the distance between two points in the hgt file, that is 3314 for 1 arc
second and 9942 for 3 arc second. Higher distances mean lower resolution
and thus fewer bytes in the map. Reasonable values for the highest
resolution should not be much smaller than 50% hgt resolution, that is
somewhere between 1648 and 5520 for 1 arc second hgt input files (3312 is
often used), and 5520 to 9942 for 3 arc second hgt input files.
Example which should work with levels="0:24, 1:22, 2:20, 3:18":
--dem-dists=3312,13248,26512,53024
This was found in a Garmin Demo map for transalpin data created 2009.
--dem-interpolation=auto|bicubic|bilinear
Use this option to specify the method that is used to interpolate data from
hgt raster to the DEM raster. The value bicubic gives the highest precision
but is slower, bilinear is faster but less precise, it tends to smooth the
profile and thus also reduces DEM size compared to bicubic. The value auto
means that bicubic is used where is seems appropriate according to hgt
resolution and dem-dist value, else bilinear is used. The default is auto.
--dem-poly=filename
If given, the filename should point to a *.poly file in osmosis polygon
file format. The polygon described in the file is used to determine the
area for which DEM data should be added to the map. If not given, the DEM
data will cover the full tile area.
--overview-dem-dist=integer
If given, the option specifies the resolution(s) for the DEM data in the
overview map. If not given or 0, mkgmap will not add DEM to the overview
map. Reasonable values depend on the size of the area and the lowest
resolution used for the single tiles, good compromises are somewhere
between 55000 and 276160.
=== Sea Processing options ===
If your map contains sea areas then you will need to use --generate-sea to
generate the sea areas from the OSM files or --precomp-sea to use separate
precompiled sea tiles.
--generate-sea[=VALUE[,...]]
Generate sea polygons. When this option is specified, the sea is generated
using a multipolygon unless the polygons value is specified. The coastline
data can be read from the input OSM files, separate files containing
coastline data if --coastlinefile is specified or precompiled sea data if
--precomp-sea is specified. The VALUEs are as follows:
multipolygon
generate the sea using a multipolygon. This is the default value.
polygons | no-mp
don't generate the sea using a multipolygon - instead, generate a
background sea polygon plus individual land polygons (see land-tag
value).
land-tag=TAG=VAL
tag to use for land polygons (default natural=land) created by the
polygons option. For these to be visible in the Garmin map, a suitable
land polygon type must be defined in the TYP file (suggested type is
0x010100 or 0x54), the polygon must have a higher drawing level than
the sea polygon type and the style file must link TAG=VAL to the land
polygon type defined in the TYP file.
no-sea-sectors
disable the generation of "sea sectors" when the coastline fails to
reach the tile's boundary. Under some conditions land sectors are
generated instead and these use land-tag.
extend-sea-sectors
Adds a point so coastline reaches the nearest tile boundary. This
implies no-sea-sectors.
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 x 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
check
check whether the coastline data contains sea within sea or land within
land
--coastlinefile=filename[,filename...]
Defines a comma separated list of OSM or PBF format files that contain
coastline data to be used instead of extracting the data from the input
files. If you specify --coastlinefile you must also specify --generate-sea.
--precomp-sea=directory|zipfile
Defines the directory or a zip file that contains precompiled sea data. Sea
data in a zip file must be located in the zip file's root directory or in a
sub directory named sea. When this option is defined, natural=coastline
tags from the input OSM files are ignored, the --coastlinefile option is
ignored and the precompiled data is used instead. You can use the
multipolygon, polygon and land-tag values of the --generate-sea option in
conjunction with --precomp-sea to control the way the sea is built, but the
other --generate-sea values are not available. If --generate-sea is not
specified, the --precomp-sea option sets --generate-sea=multipolygon.
You can download procompiled sea data for the whole world from the mkgmap
download page at http://www.mkgmap.org.uk/download/mkgmap.html
If you want to build your own precompiled sea data, you will need to build a
copy of mkgmap from the source, with the optional PrecompSeaGenerator source
included. This generator uses ESRI shapefiles as its source data. It is not
included in the standard mkgmap build due to its dependencies on external
libraries.
=== Diagnostic options ===
Messages produced by the diagnostic options are directed to stderr when no
logging configuration file is in use. When using a logging configuration file,
they are logged with custom level DIAGNOSTIC (1100).
--report-roundabout-issues[=all|loop|direction|overlap|junctions|flares[,...]]
Report on various types of roundabout issue:
* all - report on all the types of issue. This is the default if
--report-roundabout-issues is specified without a value.
* loop - check that each roundabout is formed from a single loop with no
forks or gaps
* direction - check the direction of travel around the roundabout, see also
--fix-roundabout-direction
* overlap - check that highways do not overlap the roundabout
* junctions - check that no more than one connecting highway joins at each
node
* flares - check that roundabout flare roads are one-way, are in the right
direction, and don't extend beyond the flare
--roundabout-flare-rules-config=filename
Provide a configuration file containing the rules to be used with the
--check-roundabouts=flares option in determining whether a pair of roads
joining a roundabout should be considered to be flares.
--report-routing-islands
Routing islands are small road networks which are not connected to other
roads. A typical case is a footway that is not connected to the main road
network, or a small set of ways on the inner courtyard of a large building.
These islands can cause problems if you try to calculate a route and the
GPS selects a point on the island as a start or end. It will fail to
calculate the route even if a major road is only a few steps away. If this
option is specified, then mkgmap will report these islands.
See also --max-routing-island-len.
--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.
--report-dead-ends[=LEVEL]
Set the dead end road warning level. The value of LEVEL determines those
roads to report:
* 0 = none (the default)
* 1 = report on connected one-way roads that go nowhere (default if no
LEVEL specified)
* 2 = also report on individual one-way roads that go nowhere.
--dead-ends[=key[=value]][,key[=value]...]
Specify a list of keys and optional values that should be considered to be
valid dead ends when found on the node at the end of a way. Ways with nodes
matching any of the items in the list will not be reported as dead ends. If
no value or * is specified for value then presence of the key alone will
cause the dead end check to be skipped. The default is
--dead-ends=fixme,FIXME.
=== POI options ===
--add-pois-to-lines[=all|start|end|mid|other]
Generate nodes that may be used by the points file to produce POIs at
various positions of non-closed lines. The option expects a comma separated
list that specifies the positions at which a node should be generated. The
default is all. If the inner or all values are used, a lot of points are
likely to be generated and these are likely to need filtering in the points
file. Each node is tagged with the same tags as the line plus mkgmap
generated tags mkgmap:line2poi=true and mkgmap:line2poitype with one of 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 - An extra point added by mkgmap at the middle of the line
--add-pois-to-areas
For each polygon and multipolygon, generate a node that may be used by the
points file to produce a POI. The nodes are created after the relation
style but before the other styles are applied. Each node is tagged with the
same tags of the area/multipolygon, plus mkgmap generated tag
mkgmap:area2poi=true. Artificial polygons created by multipolyon processing
are not used. The nodes are created at the following positions:
polygons: the first rule that applies of:
* the first node tagged with a tag defined by the
--pois-to-areas-placement option
* the centre point
multipolygons: the first rule that applies of:
* the node with role=label
* the centre point of the biggest area
--pois-to-areas-placement=tag=value[;tag=value...]
A node 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 no tag-value pairs are
supplied, the centre of the polygon is used. It is possible to define
wildcards for tag values like entrance=*.
Default: entrance=main;entrance=yes;building=entrance
--make-poi-index
Generate a POI index in each map tile. Probably not used by modern devices,
but still supported.
--poi-address
Enable 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. Default is enabled,
use --no-poi-address to disable.
--nearby-poi-rules=type[-type][/all|named|unnamed]:distance[:delete-poi|delete-name][,...]
Defines a set of rules to follow when a POI is near to another of the same
type and label. Each rule consists of three parts separated by colons. The
first two parts must be provided; the last part can be defaulted.
The first part of the rule is a Garmin POI type code or range of type
codes, with an optional suffix; it determines when the rule is triggered. A
type code may be specified in decimal or hexadecimal (e.g. 0x2c0b). A rule
is triggered when processing a POI if the type code of the POI matches the
rule type or falls within the range of type codes, providing there is also
a match in the POI name and the first part suffix. If the suffix is '/all'
(the default) then the match is only made on the type. If the suffix is
'/named' then the rule is only triggered if the POI has a name. If the
suffix is '/unnamed' then the rule is only triggered if the POI has no
name. A wildcard of an asterisk character may be used to match any type
code. The wildcard may also be combined with a suffix to allow separate
processing of named and unnamed POIs.
The second part of the rule is the distance in metres which an already
processed POI must be within for it to be considered to be nearby and hence
trigger the action part of the rule.
The third part of the rule is the action part and provides two options:
delete-poi - the POIS are considered to be duplicates and the duplicate
is deleted. This is the default.
delete-name - the POIS are not duplicates, but only a single name needs
to be displayed.
Wildcard rules are only applied if no other rule is applicable.
For example:
--nearby-poi-rules=*/named:10,*/unnamed:25,0x2f17-0x2f1f:30
This has the following effect:
If no other rule applies, a POI with the same name and type and within 10m
of one already processed will be deleted.
If no other rule applies, a POI having no name and of the same type and
within 25m of one already processed will be deleted.
A POI of any type between 0x2f17 and 0x2f1f that is within 30m of another
POI with the same type will be deleted.
If you have a lot of rules, the --nearby-poi-rules-config option is likely
to be easier to use.
Note: a POI that matches another in type, name and exact location is always
considered a duplicate and deleted.
--nearby-poi-rules-config=filename
Allows you to specify the nearby POI rules as described in the
--nearby-poi-rules option in a configuration file. The format of the rules
is the same as in --nearby-poi-rules, except that each rule is specified on
a separate line, rather than separated by commas. This format makes it
easier to view and maintain the rules when you have a lot of them. If you
just have one or two rules, it is simpler to use the --nearby-poi-rules
option.
=== Miscellaneous options ===
--max-jobs[=integer]
Specify the number of threads to be used for concurrent processing.
Increasing max-jobs will reduce the execution time, providing sufficient
memory is available and the value is not greater than the number of cores
in the CPU. If no value is specified, the limit is set to the number of CPU
cores. The default is for the limit to be automatically set to a reasonable
value based on the amount of memory allocated to the Java runtime and the
amount used in processing the first tile.
--keep-going
Don't quit whole application if an exception occurs while processing a map
- continue to process the other maps.
--block-size=integer
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
Tells mkgmap to write NET data, which is needed for address search and
routing. Use this option if you want address search, but do not need a map
that supports routing or house number search.
--route
Tells mkgmap to write NET and NOD data, which are needed in maps that
support routing. If you specify this option, you do not need to specify
--net and --no-net is ignored.
--add-boundary-nodes-at-admin-boundaries=NUM
This option controls how mkgmap calculates special routing nodes which are
needed by Garmin software to allow routing between different map tiles.
These nodes are written to section 3 and 4 in the NOD file. When a road
crosses the tile boundary (bbox), the road is split at this point and such
a special node is written. This allows routing between one set of tiles
produced by splitter.jar. However, if you create a map from different sets
of tiles, those tiles are likely to overlap. For the overlapping tiles,
none of the entries in NOD3 match and thus routing across tile border
doesn't work when the route is not fully covered by one of the tiles. The
option tells mkgmap to add special nodes wherever a road touches or crosses
an administrative boundary. The NUM parameter specifies a filter for the
admin_level. Boundaries with a higher admin_level value are ignored. The
default value is 2 (country borders). Another reasonable value might be 4.
A value less or equal to 0 tells mkgmap to ignore intersections at
administrative boundaries.
--drive-on=left|right|detect|detect,left|detect,right
Explicitly specify which side of the road vehicles are expected to drive
on. If the first option is detect, the program tries to find out the proper
flag. If that detection fails, the second value is used (or right if none
is given). With OSM data as input, the detection tries to find out the
country each road is in and compares the number of drive-on-left roads with
the rest. Use the --bounds option to make sure that the detection finds the
correct country.
--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.
--cycle-map
Tells mkgmap that the map is for cyclists. This assumes that different
vehicles are different kinds of bicycles, e.g. a way with mkgmap:car=yes
and mkgmap:bicycle=no may be a road that is good for racing bikes, but not
for other cyclists. This allows the optimisation of sharp angles at
junctions of those roads. Don't use with the default style as that is a
general style!
--nsis
Write a .nsi file that can be used with the Nullsoft Scriptable Install
System (NSIS) to create a Windows Installer for using the map in BaseCamp.
It looks for an installer template and license file template in the
resources and resources\installer folders. Note that it does not use the
license file specified in --license-file.
--make-opposite-cycleways
Some one-way 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).
--link-pois-to-ways
This option may copy some specific attributes of a POI to a small part of
the way the POI is located on. This can be used to let barriers block a way
or to lower the calculated speed around traffic signals. POIs with the tags
highway=* (e.g. highway=traffic_signals) or barrier=* (e.g.
barrier=cycle_barrier) are supported. The style developer must add at least
one of the access tags (mkgmap:foot, mkgmap:car etc.), mkgmap:road-speed
and/or mkgmap:road-class to the POI. The access tags are ignored if they
have no effect for the way, else a route restriction is added at the POI so
that only allowed vehicles are routed through it. The tags
mkgmap:road-speed and/or mkgmap:road-class are applied to a small part of
the way around the POI, typically to the next junction or a length of ~25m.
The tags are ignored for pedestrian-only ways.
--process-destination
Splits all motorway_link, trunk_link, primary_link, secondary_link, and
tertiary_link ways tagged with destination into two or three parts where
the second part is additionally tagged with mkgmap:dest_hint=*. The code
checks for the tags destination, destination:lanes, destination:street and
some variants with :forward/:backward like destination:forward or
destination:lanes:backward. If a value for destination is found, the
special tag mkgmap:dest_hint is set to it and the way is split. This
happens before the style rules are processed. This allows to use any
routable Garmin type (except 0x08 and 0x09) for that part so that the
Garmin device tells the name of this part as hint which destination to
follow.
See also --process-exits.
--process-exits
Usual Garmin devices do not tell the name of the exit on motorways while
routing with mkgmap created maps. This option splits each motorway_link,
trunk_link, primary_link, secondary_link, and tertiary_link way into three
parts. All parts are tagged with the original tags of the link.
Additionally the middle part is tagged with the following tags:
mkgmap:exit_hint=true
mkgmap:exit_hint_ref=<ref tag value of the exit>
mkgmap:exit_hint_name=<name tag value of the exit>
mkgmap:exit_hint_exit_to=<exit_to tag value of the exit>
Adding a rule checking the mkgmap:exit_hint=true makes it possible to use
any routable Garmin type (except 0x08 and 0x09) for the middle part so that
the Garmin device tells the name of this middle part as hint where to leave
the motorway/trunk. The first part must have type 0x08 or 0x09 so that
Garmin uses the hint.
--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 a # or ; are ignored. All
tag/value pairs in the OSM input are compared with these patterns and those
that match are deleted.
--ignore-fixme-values
Ignore all tags for which the value matches the regular expression pattern
"(?i)fix[ _]?+me".
--tdbfile
Write files that are essential to running with BaseCamp; a .tdb file and an
overview map. The options --nsis and --gmapi imply --tdbfile.
--show-profiles=1
Sets a flag in the tdb file. The meaning depends on the availability of DEM
data (see "Hill Shading (DEM) options").
Without DEM data the flag enables profile calculation in BaseCamp based on
information from contour lines.
If DEM data is available the profile is calculated with that information
and the flag only changes the status line to show the height when you hover
over an area with valid DEM data.
The default is show-profiles=0.
--transparent
Make the map transparent, so that if two maps covering the same area are
loaded, you can see through this map to see details from the other map too.
Typically used for maps containing just contour lines. See --draw-priority
as well.
--draw-priority=integer
When two maps cover the same area and both are enabled in the device, this
option controls the order in which they are drawn in and therefore which
map is on top. Higher priorities are drawn "on top" of lower priorities.
The map drawn on top must be transparent for the one underneath to be seen.
The default value is 25.
--custom
Write a different TRE header. With this option, mkgmap writes the bytes
0x170401 instead of the default 0x110301 at offset 43. Useful for marine
maps.
--hide-gmapsupp-on-pc
Set a bit in the gmapsupp.img that tells PC software that the file is
already installed on the PC and therefore there is no need to read it from
the device.
--verbose
Makes some operations more verbose. Mostly used with --list-styles.
--order-by-decreasing-area
Puts area/polygons into the map in decreasing size order, so that smaller
features are rendered over larger ones (assuming the draw order is equal).
The tag mkgmap:drawLevel can be used to override the natural area of a
polygon, so forcing changes to the rendering order.
--max-routing-island-len=integer
Routing islands are small road networks which are not connected to other
roads. A typical case is a footway that is not connected to the main road
network, or a small set of ways on the inner courtyard of a large building.
These islands can cause problems if you try to calculate a route and the
GPS selects a point on the island as a start or end. It will fail to
calculate the route even if a major road is only a few steps away. If a
positive value is specified, then mkgmap will mark islands with a total
length less than the specified value in metres as not routable. Reasonable
values are 500 or higher. The default is to not to mark any islands as
unroutable. If any of the roads forming the island touches a tile boundary
or a country border the island is ignored, as it may be connected to other
roads in a different tile.
See also options --add-boundary-nodes-at-admin-boundaries and
--report-routing-islands.
This option seems to cause routing problems in BaseCamp.
--fix-roundabout-direction
Reverse the direction of travel around roundabouts that do not have the
expected direction (clockwise when vehicles drive on the left). See also
--report-roundabout-issues=direction.
=== Deprecated and Obsolete Options ===
--check-roundabouts
Deprecated; use --report-roundabout-issues and/or
--fix-roundabout-direction instead. 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 and
that no more than one connecting highway joins at each node.
--check-roundabout-flares
Deprecated; use --report-roundabout-issues=flares instead. Check that
roundabout flare roads point in the correct direction, are one-way and
don't extend too far.
--max-flare-length-ratio=NUM
Deprecated; use --roundabout-flare-rules-config instead. When checking
roundabout flares, 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.
--check-routing-island-len=integer
Deprecated; use --report-routing-islands and --max-routing-island-len
instead. Translated to --report-routing-islands if info level logging is
enabled, plus --max-routing-island-len=integer.
--drive-on-left
--drive-on-right
Deprecated; use --drive-on instead. The options are translated to
--drive-on=left|right.
--make-all-cycleways
Deprecated; use --make-opposite-cycleways instead. Former meaning: Turn on
all of the options that make cycleways.
--charset=name
Obsolete; use --code-page instead.
--map-features=filename
Obsolete; use --style-file instead.
--ignore-maxspeeds
Obsolete; former usage: When reading OSM files, ignore any "maxspeed" tags.
--ignore-builtin-relations
Obsolete; former usage: 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.
--road-name-pois[=GarminCode]
Obsolete; former usage: 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 street name appears.
--make-cycleways
Obsolete; former meaning: 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).
--remove-short-arcs[=MinLength]
Now ignored, former usage: 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]
Now ignored, former usage: 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