Mkgmap/help/Tags
Jump to navigation
Jump to search
This page is outdated. Please refer to the style manual of mkgmap for up-to-date information.
mkgmap handles several tag by default. Some of them are set by mkgmap while changing data like add poi-nodes for areas or lines and some are only used to influence the output like oneway and access. Below you'll find a table explaining the used tags.
Tags in use by mkgmap
tag | affects | initial value | possible values[1] | note |
---|---|---|---|---|
mkgmap:country | address search[2] | 3-letter country code, derived from mkgmap:admin_level2 (hard-wired in LocatorConfig.xml). If an object's country code is not defined e.g. in oceans, the values of --country-abbr and --country-name are used, see here | (any text) | List of values |
mkgmap:region | given by command line parameter --region-name and --region-abbr, or (none) if these are not used[3] | |||
mkgmap:city | (none) - must be set by rule in style[3]
| |||
mkgmap:housenumber | address search - advanced[2] | (none) - must be set by rule in style, e. g. created from the addr:* tags | (any text) | |
mkgmap:street | ||||
mkgmap:postal_code | ||||
mkgmap:phone |
| |||
mkgmap:admin_level2 | (nothing) | Name of the boundary=administrative polygon/relation where the object is located in The tags are set only if the --bounds option is set[4] |
(any text) | see Key:admin_level |
... | ||||
mkgmap:admin_level11 | ||||
mkgmap:postcode | (nothing) | Name of the boundary=postal_code polygon/relation or the postal_code polygon where the object is located in The tag is set only if the --bounds option is set [4] |
(any text) | |
mkgmap:area2poi | style | only used if --add-poi-to-areas is set. mkgmap add this to each additional generated node | true | |
mkgmap:line2poi | style | only used if --add-poi-to-lines is set. mkgmap add this to each additional generated node | true | |
mkgmap:line2poitype | style | only used if --add-poi-to-lines is set. mkgmap add this for specifying where the additional generated node is situated | start, end, inner, mid | |
toll | routing - avoid options | "no", if not set by OSM data | "yes", "no" | see Key:toll
|
access | routing - general | "yes", if not set by OSM data | "yes", "no", "destination", ... (?) | see Key:access |
bicycle[5] | ||||
motorcycle[5] | ||||
motorcar | ||||
hgv[5] | ||||
restriction | routing - general | used to handle turn restrictions | see Restriction | |
oneway | routing - general | "no", if not set by OSM data | "yes", "no", "-1" | see Key:oneway |
junction | routing - general | |||
mkgmap:ferry | routing - avoid options | "no" | "yes", "no" | |
mkgmap:carpool | routing - avoid options | "no" | "yes", "no" | |
mkgmap:unpaved | routing - avoid options | "no" | "yes", "no" | |
maxspeed | routing - road_speed | set road_speed, ignored if --ignore-maxspeed is set | ||
name | used to display the name of an object in the map and index | any text | ||
ref | any text | |||
mkgmap:road-class | routing - general | (none) | e.g. '-2' ... '+3' | bonus/malus-system for road_class. Note: tag is road-class, not road_class[6] |
mkgmap:road-speed | routing - general | (none) | e.g. '-2' ... '+3' | bonus/malus-system for road_speed. Note: tag is road-speed, not road_speed[6] |
mkgmap:set_unconnected_type | routing - general | (none) | e.g. 0x010102 | check if the road is connected to other roads, if not, change the type to the given value and make it non-routable) |
- ↑ Although other values are possible and meaningful in OSM data, only these are evaluated by mkgmap and the Garmin device
- ↑ 2.0 2.1 If a node or way should be searchable on the Garmin device, it must contain the three tags mkgmap:country, mkgmap:region, and mkgmap:city (???)
- ↑ 3.0 3.1 These tags are not initialized to a value by default. The corresponding values must be set by the style rules, evaluating the values of admin_level2...admin_level11. Example: Creating a rule in the lines file
mkgmap:country!=* & mkgmap:admin_level2=* { set mkgmap:country='${mkgmap:admin_level2}' } mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8}' } mkgmap:city!=* & mkgmap:admin_level9=* { set mkgmap:city='${mkgmap:admin_level9}' }
sets the value of mkgmap:country to the name of the surrounding admin_level2 boundary (which is normally the country), if the tag is not already set. The mkgmap:city tag is set either by level 8 (if present), or alternatively level 9.
- ↑ 4.0 4.1 The values of the mkgmap:admin_level2 ... mkgmap:admin_level11 and mkgmap:postcode tags are initialized by the position of the object. The value for each tag is initialized with the name of the boundary polygon (or post_code polygon) the object is located in. This happens only if the --bounds option points to precompiled boundary files that contain these information in a way mkgmap can handle. See Mkgmap/help/options#Address search options. Note that not all levels are present, depending on the local administration system. Please note that the tags are set according to the position in the data of the boundary files, not within the polygons in the .osm file. It is possible to create the boundaries with mkgmap (see create the preprocessed bounds tiles)
- ↑ 5.0 5.1 5.2 Only useful, if the device supports this mode of transportation
- ↑ 6.0 6.1 A bonus or malus can be added for individual tags, e.g. adding a line "scenic=yes {add mkgmap:road-class='+1'}" sets the road_class one level higher in the following action block. Limits can be set by adding mkgmap:road-class-min, mkgmap:road-class-max, mkgmap:road-speed-min, mkgmap:road-speed-max parameters. E.g. a way with mkgmap:road-class-max=2 will have a road_class of 2, even if bonus system says it should be higher.