# -------------------------------------------------------------------
# This is a copy of the default mkgmap style file for converting closed OSM ways
# into Garmin polygons.
# Any line prefaced with # is a comment and will not be applied.
# Each line is a rule, of the generalised format:
#  OSM_tag(s)_to_match  [Garmin_type_code resolution]
# See http://wiki.openstreetmap.org/wiki/Mkgmap/help/style_rules
# and http://wiki.openstreetmap.org/wiki/Mkgmap/help/Custom_styles
# for more information.

parking=underground | parking=multi-storey {name '${name}'} [0x06 resolution 21]

# The use of these values has been checked

amenity=prison {name '${name}'} [0x04 resolution 20]
landuse=military {name '${name}'} [0x04 resolution 18]

amenity=parking | parking=surface {name '${name}'} [0x05 resolution 21]

# squares and plazas
highway=pedestrian & area=yes {name '${name}'} [0x05 resolution 20]

# railway platforms
railway=platform & area=yes {name '${name}'} [0x05 resolution 20]

aeroway=aerodrome {name '${name}'} [0x07 resolution 18]

amenity=cafe | amenity=fast_food | amenity=restaurant | amenity=food_court [0x08 resolution 20]
amenity=supermarket [0x08 resolution 21]
landuse=retail {name '${name}'} [0x08 resolution 20]
# 0x08 is also used as a "shop" wildcard below

leisure=marina {name '${name}'} [0x09 resolution 20]
leisure=water_park {name '${name}'} [0x09 resolution 18]

# Various educational establishments are sent through here.
amenity=school {name '${name}'} [0x0a resolution 20]

amenity=hospital {name '${name}'} [0x0b resolution 18]
# Most healthcare is mapped to something else in the lua, so no healthcare wildcare here:
# healthcare=* {name '${name}'} [0x0b resolution 21]

landuse=commercial {name '${name}'} [0x0c resolution 18]
landuse=farmyard {name '${name}'} [0x0c resolution 18]
landuse=industrial {name '${name}'} [0x0c resolution 18]
landuse=landfill {name '${name}'} [0x0c resolution 18]
landuse=quarry {name '${name}'} [0x0c resolution 18]

historic=memorial {name '${name}'} [0x0d resolution 20]
aeroway=helipad {name '${name}'} [0x0e resolution 20]

# In QMapShack, and possibly on older devices, at resolution 24, 
# display building=* instead of landuse=residential.
# Nothing in lua and no need because the QMapShack representation is characteristic.
# On GPSMAP64s and presumably all later devices this does not appear.
landuse=residential {name '${name}'} [0x10 resolution 23-18]

aeroway=terminal {name '${name}'} [0x13 resolution 20]
leisure=nature_reserve {name '${name}'} [0x16 resolution 18]

leisure=park {name '${name}'} [0x17 resolution 20]
leisure=unnamed_park {name '${name}'} [0x17 resolution 20]

leisure=golf_course {name '${name}'} [0x18 resolution 20]

leisure=ice_rink [0x19 resolution 21]
leisure=pitch { name '${name}' } [0x19 resolution 20]
leisure=sports_centre { name '${name}' } [0x19 resolution 20]
leisure=stadium { name '${name}' } [0x19 resolution 19]
leisure=track { name '${name}' } [0x19 resolution 18]

amenity=grave_yard {name '${name}'} [0x1a resolution 18]
landuse=cemetery {name '${name}'} [0x1a resolution 18]
historic=museum {name '${name}'} [0x1e resolution 20]
historic=archaeological_site {name '${name}'} [0x1e resolution 21]
historic=ruins {name '${name}'} [0x1e resolution 21]

# The lua code maps various reservoir tags to these:
landuse=basin {name '${name}'} [0x3f resolution 18]
landuse=reservoir {name '${name}'} [0x3f resolution 18]

landuse=allotments {name '${name}'} [0x4e resolution 20]
landuse=orchard {name '${name}'} [0x4e resolution 20]
landuse=vineyard {name '${name}'} [0x4e resolution 20]
natural=scrub {name '${name}'} [0x4f resolution 20]

natural=wood {name '${name}'} [0x50 resolution 18]
landuse=forest {name '${name}'} [0x50 resolution 18]

# The use of these values has not yet been checked

natural=glacier {name '${name}'} [0x4d resolution 16]
natural=marsh {name '${name}'} [0x51 resolution 20]
natural=mud {name '${name}'} [0x51 resolution 20]
natural=wetland {name '${name}'} [0x51 resolution 20]
natural=water {name '${name}'} [0x3c resolution 20]
natural=waterfall | waterway=waterfall {name '${name}'} [0x47 resolution 21]
natural=sea [0x32 resolution 10]
natural=sand {name '${name}'} [0x13 resolution 24]

place=village [0x03 resolution 18]
# Suppress "island" in polygons to avoid problems with the Island of Great Britain
#place=island & name=* [0x53 resolution 18]
place=islet & name=* [0x53 resolution 20]

shop=* [0x08 resolution 20]

waterway=riverbank [0x46 resolution 20]


# Catch-alls added in case people have omitted "building="
# These are commented out here as specifically supported values have been added to lua.
#amenity=* {name '${name}'} [0x13 resolution 24]
#leisure=* {name '${name}'} [0x13 resolution 24]
#railway=* {name '${name}'} [0x13 resolution 24]
#shop=* {name '${name}'} [0x13 resolution 24]
#sport=* {name '${name}'} [0x13 resolution 24]
#tourism=* {name '${name}'} [0x13 resolution 24]

# building tag should be last
building=* {name '${name}'} [0x13 resolution 24]
