| 1 |
:language: mkgmap |
| 2 |
|
| 3 |
== mkgmap internal tags == |
| 4 |
There are lots of tags prefixed with +mkgmap:+. Some of them need to be set in the |
| 5 |
style file to set specific attributes of the Garmin map elements, e.g. |
| 6 |
access restrictions, labels, attributes required for address search etc. |
| 7 |
Others are added to the OSM elements by mkgmap so that they can be evaluted in |
| 8 |
the style files to change the processing. |
| 9 |
|
| 10 |
=== Tags evaluated by mkgmap === |
| 11 |
These tags need to be set within the style file to set specific attributes of |
| 12 |
the Garmin map elements. |
| 13 |
|
| 14 |
[source] |
| 15 |
---- |
| 16 |
highway=* & (bicycle=no | bicycle=private) { set mkgmap:bicycle='no' } |
| 17 |
---- |
| 18 |
This rule defines that the road cannot be used by bicycles. |
| 19 |
|
| 20 |
// see [[Mkgmap/help/Tags]] |
| 21 |
|
| 22 |
.Tags for routable roads |
| 23 |
[cols="4,6,3,7",options="header"] |
| 24 |
|========================================================= |
| 25 |
| Attribute | mkgmap tag | Example | Notes |
| 26 |
| Labels | +mkgmap:label:1+ + |
| 27 |
+mkgmap:label:2+ + |
| 28 |
+mkgmap:label:3+ + |
| 29 |
+mkgmap:label:4+ | Eastern Avenue + |
| 30 |
A112 | Usually only the first label is displayed. On some units the second label of roads is displayed as routing instruction. All labels are used for address search. |
| 31 |
| Country | +mkgmap:country+ | GBR | Three letter ISO code, e.g. for GBR United Kingdom |
| 32 |
| Region | +mkgmap:region+ | London Borough of Waltham Forest | The regions name. Useful if there are multiple cities with the same name. |
| 33 |
| City | +mkgmap:city+ | London | |
| 34 |
| Street | +mkgmap:street+ | High Road Leyton | This value is used by house number search to match the +addr:street+ tag of an OSM element with house number to the corresponding road. It must be set so that house number search is working. |
| 35 |
| Zipcode | +mkgmap:postal_code+ | E10 5NA | |
| 36 |
| Access restrictions | +mkgmap:foot+ + |
| 37 |
+mkgmap:bicycle+ + |
| 38 |
+mkgmap:car+ + |
| 39 |
+mkgmap:taxi+ + |
| 40 |
+mkgmap:truck+ + |
| 41 |
+mkgmap:bus+ + |
| 42 |
+mkgmap:emergency+ + |
| 43 |
+mkgmap:delivery+ | no | These tags are evaluated for routable lines (roads) only. By default access for a specific vehicle type is allowed. Only in case the value of the tag is _no_ access is blocked for the given type. |
| 44 |
| Throughroute | +mkgmap:throughroute+ | no | If this tag is set to _no_ routing is allowed on this road only if the start or end point lies on the road. |
| 45 |
| Carpool lane | +mkgmap:carpool+ | yes | If this tag is set to _yes_ the road is marked to have a carpool lane. This does not seem to work on all units. |
| 46 |
| Toll road | +mkgmap:toll+ | yes | If this tag is set to _yes_ the road can be used only when paying a specific toll. |
| 47 |
| Unpaved | +mkgmap:unpaved+ | yes | If this tag is set to _yes_ the road is marked to be unpaved. Some units can avoid unpaved roads. |
| 48 |
| Ferry | +mkgmap:ferry+ | yes | If this tag is set to _yes_ the line is marked to be a ferry line. Some units can avoid ferry lines. |
| 49 |
| Road speed | +mkgmap:road-speed-class+ | 2 | A value between 0 and 7. Overrides the +road_speed+ definition in the element type definition if this tag is set. |
| 50 |
| Road speed modifier | +mkgmap:road-speed+ | +1 | Modifies the road speed class by the given value. In case the value is prefixed with + or - the road speed class is modified. In case the value does not start with + or - the road speed class value of the element type definition is overriden. |
| 51 |
| Road speed limiters | +mkgmap:road-speed-min+ + |
| 52 |
+mkgmap:road-speed-max+ | 5 | Defines the minimum/maximum road speed class. This can be used to limit the modification of the road speed class (+mkgmap:road-speed+). |
| 53 |
| Road class | +mkgmap:road-class+ | -1 | Modifies the road class defined in the element type definition. In case the value is prefixed with + or - the road class is modified. In case the value does not start with + or - the road class value of the element type definition is overriden. |
| 54 |
| Road class limiters | +mkgmap:road-class-min+ + |
| 55 |
+mkgmap:road-class-max+ | 2 | Defines the minimum/maximum road class. This can be used to limit the modification of the road class (+mkgmap:road-class+). |
| 56 |
|========================================================= |
| 57 |
|
| 58 |
.Tags that control the treatment of roads |
| 59 |
[cols="8,7,5",options="header"] |
| 60 |
|========================================================= |
| 61 |
| Tag | Description | Required mkgmap option |
| 62 |
| +mkgmap:way-has-pois+ | +true+ for ways that have at least one point with a tag +access=\*+, +barrier=\*+, or +highway=*+ | 'link-pois-to-ways' |
| 63 |
| +mkgmap:dead-end-check+ | Set to +false+ to disable the dead end check for a specific way | 'report-dead-ends' |
| 64 |
| +mkgmap:flare-check+ | Set to +true+ to force the flare check for a specific way, set to +false+ to disable it | 'check-roundabout-flares' |
| 65 |
| +mkgmap:dir-check+ | Set to +false+ to tell mkgmap to ignore the way when checking roundabouts for direction | 'check-roundabouts' |
| 66 |
| +mkgmap:no-dir-check+ | Set to +true+ to tell mkgmap to ignore the way when checking roundabouts for direction | 'check-roundabouts' |
| 67 |
| +mkgmap:synthesised+ | Set to +true+ to tell mkgmap that this is an additional way created using the continue statement in an action block and that it should be excluded from checks | 'check-roundabouts', 'check-roundabout-flares' |
| 68 |
| +mkgmap:set_unconnected_type+ | Set to +none+ to remove unconected roads from the map once that all roads are known, or to a valid line type if you want a normal line instead of a road. Works also with overlay lines for the same way. | |
| 69 |
| +mkgmap:set_semi_connected_type+ | Like mkgmap:set_unconnected_type, but matches for roads with exactly one connection to other roads | |
| 70 |
|
| 71 |
|
| 72 |
|========================================================= |
| 73 |
|
| 74 |
|
| 75 |
.POI address tags |
| 76 |
[options="header"] |
| 77 |
|========================================================= |
| 78 |
| Attribute | mkgmap tag | Example | Notes |
| 79 |
| Name | +mkgmap:label:1+ + |
| 80 |
+mkgmap:label:2+ + |
| 81 |
+mkgmap:label:3+ + |
| 82 |
+mkgmap:label:4+ | Pizza Express | Names of the POI |
| 83 |
| Country | +mkgmap:country+ | GBR | Three letter ISO code, e.g. for GBR United Kingdom |
| 84 |
| Region | +mkgmap:region+ | Nottinghamshire | The regions name. Useful if there are multiple cities with the same name. |
| 85 |
| City | +mkgmap:city+ | Nottingham | |
| 86 |
| Street | +mkgmap:street+ | King Street | |
| 87 |
| Housenumber | +mkgmap:housenumber+ | 20 | |
| 88 |
| Zipcode | +mkgmap:postal_code+ | NG1 2AS | |
| 89 |
| Phone | +mkgmap:phone+ | +44 115 999999 | Phone number in any format |
| 90 |
|========================================================= |
| 91 |
|
| 92 |
TIP: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3[Wikipedia] has a list of all ISO 3166-1 alpha 3 codes |
| 93 |
|
| 94 |
=== Tags added by mkgmap === |
| 95 |
Some tags are added by mkgmap to indicate some property calculated by mkgmap. |
| 96 |
|
| 97 |
[source] |
| 98 |
---- |
| 99 |
mkgmap:admin_level2=* { add mkgmap:country='${mkgmap:admin_level2}' } |
| 100 |
---- |
| 101 |
The tag +mkgmap:admin_level2+ is added to each OSM element if the 'bounds' option is set. In the rule above it |
| 102 |
is used to assign the country location. |
| 103 |
|
| 104 |
.Tags added by mkgmap |
| 105 |
[options="header"] |
| 106 |
|========================================================= |
| 107 |
| Tag | Description | Required mkgmap option |
| 108 |
| +mkgmap:admin_level2+ | Name of the +boundary=administrative+ relation/polygon with +admin_level=2+ the element is located in | 'bounds' |
| 109 |
| +mkgmap:admin_level3+ | Name of the +boundary=administrative+ relation/polygon with +admin_level=3+ the element is located in | 'bounds' |
| 110 |
| +mkgmap:admin_level4+ | Name of the +boundary=administrative+ relation/polygon with +admin_level=4+ the element is located in | 'bounds' |
| 111 |
| +mkgmap:admin_level5+ | Name of the +boundary=administrative+ relation/polygon with +admin_level=5+ the element is located in | 'bounds' |
| 112 |
| +mkgmap:admin_level6+ | Name of the +boundary=administrative+ relation/polygon with +admin_level=6+ the element is located in | 'bounds' |
| 113 |
| +mkgmap:admin_level7+ | Name of the +boundary=administrative+ relation/polygon with +admin_level=7+ the element is located in | 'bounds' |
| 114 |
| +mkgmap:admin_level8+ | Name of the +boundary=administrative+ relation/polygon with +admin_level=8+ the element is located in | 'bounds' |
| 115 |
| +mkgmap:admin_level9+ | Name of the +boundary=administrative+ relation/polygon with +admin_level=9+ the element is located in | 'bounds' |
| 116 |
| +mkgmap:admin_level10+ | Name of the +boundary=administrative+ relation/polygon with +admin_level=10+ the element is located in | 'bounds' |
| 117 |
| +mkgmap:admin_level11+ | Name of the +boundary=administrative+ relation/polygon with +admin_level=11+ the element is located in | 'bounds' |
| 118 |
| +mkgmap:postcode+ | Name of the postal code relation/polygon the element is located in | 'bounds' |
| 119 |
| +mkgmap:residential+ | Name of the residential relation/polygon the element is located in or 'yes' if unnamed | none |
| 120 |
| +mkgmap:area2poi+ | The value is +true+ if the POI is derived from a polygon | 'add-pois-to-areas' |
| 121 |
| +mkgmap:line2poi+ | The value is +true+ if the POI is derived from a line | 'add-pois-to-lines' |
| 122 |
| +mkgmap:line2poitype+ | The tag is set for each POI generated from a line. Possible values are: +start+, +end+, +mid+, +inner+. | 'add-pois-to-lines' |
| 123 |
| +mkgmap:from-node:attname+ | The attribute is set for each POI generated from a line. These are the original attributes of the node (part of the line) from which the point was generated | 'add-pois-to-lines' |
| 124 |
| +mkgmap:way-length+ | The tag is set for each POI generated from a line. It gives the way length rounded to meters. | 'add-pois-to-lines' |
| 125 |
| +mkgmap:exit_hint+ | +true+ for the part on link roads that should contain information about the exit | 'process-exits' |
| 126 |
| +mkgmap:exit_hint_name+ | The +name+ tag value of the links exit node | 'process-exits' |
| 127 |
| +mkgmap:exit_hint_ref+ | The +ref+ tag value of the links exit node | 'process-exits' |
| 128 |
| +mkgmap:exit_hint_exit_to+ | The +exit_to+ tag value of the links exit node | 'process-exits' |
| 129 |
| +mkgmap:dest_hint+ | The tag is set to a reasonable destination value for the part on link roads that should contain destination information about the link | 'process-destination' |
| 130 |
| +mkgmap:synthesised+ | The value is +yes+ if the way was added by the make-opposite-cycleways option | 'make-opposite-cycleways' |
| 131 |
| +mkgmap:mp_created+ | The value is +true+ if the way was created by the internal multi-polygon-relation handling | none |
| 132 |
| +mkgmap:option:<key>+ | Tag generated by the --style-option option | 'style-option' |
| 133 |
|========================================================= |
| 134 |
|
| 135 |
.Other internal tags |
| 136 |
[options="header"] |
| 137 |
|========================================================= |
| 138 |
| Tag | Description |
| 139 |
| +mkgmap:skipSizeFilter+ | If set to +true+ the line or polygon will pass the size filter, no matter what size it has |
| 140 |
| +mkgmap:highest-resolution-only+ | If set to +true+ the object will only be added for the highest resolution configured in the element type definition. |
| 141 |
| +mkgmap:execute_finalize_rules+ | If set to +true+ mkgmap will execute the finalize rules even if no object is created fot the element. |
| 142 |
| +mkgmap:numbers+ | If set to +false+ for a node or way mkgmap will ignore the object in the calculations for the --housenumber option |
| 143 |
| +mkgmap:drawLevel+ | Set to a number from 1 to 100. Overrides the polygon area that is used by --order-by-decreasing-area. 1..50 are larger than typical polygons and be overwritten by them, 51..100 are smaller and will show. Higher drawLevels will show over lower values. |
| 144 |
| +mkgmap:stylefilter+ | Set to either polyline or polygon for ways which have mkgmap:mp-created=true. Is used to decide which rules should be used. Should not be set or modified in the relations style. |
| 145 |
|========================================================= |