| 1 |
# ------------------------------------------------------------------- |
| 2 |
# This is the default mkgmap style file for converting closed OSM ways |
| 3 |
# into Garmin polygons. |
| 4 |
# Any line prefaced with # is a comment and will not be applied. |
| 5 |
# Each line is a rule, of the generalised format: |
| 6 |
# OSM_tag(s)_to_match [Garmin_type_code resolution] |
| 7 |
# See http://wiki.openstreetmap.org/wiki/Mkgmap/help/style_rules |
| 8 |
# and http://wiki.openstreetmap.org/wiki/Mkgmap/help/Custom_styles |
| 9 |
# for more information. |
| 10 |
|
| 11 |
addr:housenumber=* {set mkgmap:execute_finalize_rules=true} |
| 12 |
|
| 13 |
leisure=* & sport=* & name=* {set name='${name} (${sport})'} |
| 14 |
leisure=* & sport=* & name!=* {add name='${sport}'} |
| 15 |
|
| 16 |
include 'inc/name'; |
| 17 |
|
| 18 |
aeroway=airport [0x07 resolution 20] |
| 19 |
aeroway=aerodrome [0x07 resolution 20] |
| 20 |
aeroway=runway & area=yes {name '${ref}'} [0x0e resolution 20] |
| 21 |
(aeroway=taxiway | aeroway=taxilane) & area=yes {name '${ref}'} [0x0e resolution 24] |
| 22 |
aeroway=heliport [0x07 resolution 20] |
| 23 |
aeroway=helipad [0x0e resolution 22] |
| 24 |
|
| 25 |
amenity=kindergarten [0x0a resolution 22] |
| 26 |
amenity=cafe | amenity=fast_food | amenity=restaurant [0x08 resolution 24] |
| 27 |
amenity=food_court [0x08 resolution 22] |
| 28 |
amenity=college [0x0a resolution 22] |
| 29 |
parking=underground | parking=multi-storey [0x06 resolution 22] |
| 30 |
amenity=parking | parking=surface [0x05 resolution 22] |
| 31 |
amenity=prison [0x04 resolution 22] |
| 32 |
amenity=school [0x0a resolution 22] |
| 33 |
# amenity=supermarket is superceded by shop=supermarket or landuse=retail |
| 34 |
amenity=supermarket [0x08 resolution 22] |
| 35 |
amenity=university [0x0a resolution 21] |
| 36 |
|
| 37 |
healthcare=hospital | amenity=hospital | amenity=clinic [0x0b resolution 22] |
| 38 |
healthcare=* | amenity=dentist | amenity=doctors | amenity=nursing_home [0x0b resolution 23] |
| 39 |
|
| 40 |
leisure=common [0x1d resolution 21] |
| 41 |
leisure=garden [0x20 resolution 21] |
| 42 |
leisure=golf_course [0x18 resolution 21] |
| 43 |
leisure=ice_rink [0x19 resolution 22] |
| 44 |
leisure=nature_reserve [0x16 resolution 19] |
| 45 |
leisure=park [0x17 resolution 20] |
| 46 |
leisure=pitch [0x19 resolution 21] |
| 47 |
leisure=playground [0x17 resolution 22] |
| 48 |
leisure=recreation_ground [0x19 resolution 21] |
| 49 |
leisure=sports_center | leisure=sports_centre [0x19 resolution 20] |
| 50 |
leisure=stadium [0x19 resolution 20] |
| 51 |
leisure=track & area=yes [0x19 resolution 21] |
| 52 |
leisure=water_park [0x09 resolution 21] |
| 53 |
|
| 54 |
place=village [0x03 resolution 19] |
| 55 |
place=suburb [0x02 resolution 19] |
| 56 |
|
| 57 |
shop=* {add name='${shop|subst:"_=> "}'} [0x08 resolution 22] |
| 58 |
|
| 59 |
# squares and plazas |
| 60 |
place=square [0x25 resolution 22] |
| 61 |
highway=pedestrian & (area=yes | mkgmap:mp_created=true) [0x25 resolution 22] |
| 62 |
# following rule also renders a closed way without area attribute as a plaza |
| 63 |
highway=pedestrian & area!=no [0x25 resolution 22] |
| 64 |
|
| 65 |
# footways areas are similar, but should be explicity marked as such |
| 66 |
highway=footway & area=yes [0x25 resolution 24] |
| 67 |
|
| 68 |
highway=services [0x12 resolution 22] # service station complex; show as retail |
| 69 |
highway=rest_area & area!=no [0x05 resolution 22] # show as parking lot |
| 70 |
|
| 71 |
historic=* & historic!=no & historic!=yes & boundary!=* {add name='${historic|subst:"_=> "}'} [0x22 resolution 21] |
| 72 |
|
| 73 |
landuse=basin [0x3f resolution 20] |
| 74 |
landuse=reservoir | (natural=water & water=reservoir) [0x3f resolution 20] |
| 75 |
|
| 76 |
dock=drydock [0x4c resolution 22] # might also have natural=water |
| 77 |
|
| 78 |
natural=bay [0x3d resolution 18] |
| 79 |
natural=glacier [0x4d resolution 18] |
| 80 |
natural=marsh [0x51 resolution 20] |
| 81 |
natural=tundra [0x52 resolution 18] |
| 82 |
natural=mud [0x51 resolution 20] |
| 83 |
natural=beach | natural=sand [0x53 resolution 20] |
| 84 |
natural=wetland [0x51 resolution 20] |
| 85 |
natural=water & water=canal [0x48 resolution 22] |
| 86 |
natural=water & water=lock [0x4c resolution 22 default_name 'Lock'] |
| 87 |
natural=water & area_size() < 100000 [0x41 resolution 22] # Small Lake |
| 88 |
natural=water [0x3c resolution 18] |
| 89 |
natural=waterfall | waterway=waterfall [0x47 resolution 21] |
| 90 |
natural=sea {add mkgmap:skipSizeFilter=true; set mkgmap:drawLevel=2} [0x32 resolution 10] |
| 91 |
|
| 92 |
waterway=riverbank [0x46 resolution 20] |
| 93 |
|
| 94 |
# mop up any remaining water areas |
| 95 |
waterway=* & waterway!=no & area!=no {add name='${waterway|subst:"_=> "}'} [0x3b resolution 22] |
| 96 |
|
| 97 |
landuse=allotments [0x4e resolution 21] |
| 98 |
landuse=cemetery | landuse=cemetary | amenity=grave_yard [0x1a resolution 21] |
| 99 |
landuse=commercial [0x0f resolution 19] |
| 100 |
landuse=construction [0x0c resolution 21] |
| 101 |
landuse=farm [0x26 resolution 22] |
| 102 |
landuse=farmland [0x1c resolution 20] |
| 103 |
landuse=farmyard [0x26 resolution 22] |
| 104 |
landuse=forest | landuse=wood [0x50 resolution 20] |
| 105 |
landuse=greenfield [0x1c resolution 20] |
| 106 |
landuse=meadow | landuse=grass [0x1c resolution 19] |
| 107 |
landuse=military [0x04 resolution 19] |
| 108 |
landuse=quarry [0x0c resolution 19] |
| 109 |
landuse=recreation_ground [0x19 resolution 19] |
| 110 |
# dedicate resolution 24 for building=* instead of related landuse=* |
| 111 |
landuse=industrial [0x0c resolution 19-23] |
| 112 |
landuse=residential [0x10 resolution 19-23] |
| 113 |
landuse=retail [0x12 resolution 20-23] |
| 114 |
landuse=village_green [0x15 resolution 20] |
| 115 |
landuse=vineyard [0x4e resolution 20] |
| 116 |
landuse=orchard [0x4e resolution 20] |
| 117 |
|
| 118 |
military=airfield [0x04 resolution 20] |
| 119 |
military=barracks [0x04 resolution 23] |
| 120 |
military=danger_area [0x11 resolution 20] |
| 121 |
military=range [0x04 resolution 20] |
| 122 |
|
| 123 |
natural=scrub [0x4f resolution 20] |
| 124 |
natural=wood [0x50 resolution 20] |
| 125 |
|
| 126 |
# building tag should be last |
| 127 |
amenity=* & area!=no & amenity!=grave_yard {add name='${amenity|subst:"_=> "}'} [0x23 resolution 24] |
| 128 |
building=* & building!=no [0x13 resolution 24] |
| 129 |
tourism=* & area!=no & waterway!=* {add name='${tourism|subst:"_=> "}'} [0x21 resolution 24] |
| 130 |
|
| 131 |
# man_made can be used on areas or lines |
| 132 |
man_made=* & area!=no {add name='${man_made|subst:"_=> "}'} [0x24 resolution 24] |
| 133 |
|
| 134 |
# render small named islands |
| 135 |
place=island & name=* & area_size() < 1000000 [0x53 resolution 19] |
| 136 |
place=islet & name=* [0x53 resolution 20] |
| 137 |
|
| 138 |
<finalize> |
| 139 |
# The finalizer section is executed for each element when a rule with an element type matches |
| 140 |
|
| 141 |
# we need address info from buildings for the address search |
| 142 |
include 'inc/address'; |
| 143 |
|
| 144 |
name=* {name '${name}'} |