Index: lines
===================================================================
--- lines	(revision 1835)
+++ lines	(working copy)
@@ -84,6 +84,39 @@
 # Treat disused ways as highway=service, but at lower road_speed.
 highway=* & disused=yes [0x07 road_class=0 road_speed=1 resolution 22]
 
+# Tunnels with ways sorted roughly by descending order of class - JM, 14+7+4+2 lines:
+# Note: access rules could be separated from the type assignment to clean up code - JM
+highway=motorway & (tunnel=yes|tunnel=1) {add oneway = yes; add bicycle = no; add foot = no } [0x12 road_class=4 road_speed=7 resolution 14]
+highway=motorway_link & (tunnel=yes|tunnel=1) {add oneway = yes; add bicycle = no; add foot = no } [0x12 road_class=3 road_speed=2 resolution 16]
+highway=* & motorroad=yes & (tunnel=yes|tunnel=1) {add bicycle = no; add foot = no}
+highway=trunk & (tunnel=yes|tunnel=1) [0x12 road_class=4 road_speed=5 resolution 16]
+highway=trunk_link & (tunnel=yes|tunnel=1) [0x12 road_class=3 road_speed=2 resolution 18]
+highway=* & motorroad=yes & (tunnel=yes|tunnel=1) [0x12 road_class=4 road_speed=4 resolution 16]
+highway=primary & (tunnel=yes|tunnel=1) [0x12 road_class=3 road_speed=4 resolution 19]
+highway=primary_link & (tunnel=yes|tunnel=1) [0x12 road_class=3 road_speed=1 resolution 19]
+highway=secondary & (tunnel=yes|tunnel=1) [0x12 road_class=2 road_speed=3 resolution 20]
+highway=secondary_link & (tunnel=yes|tunnel=1) [0x12 road_class=2 road_speed=1 resolution 20]
+highway=tertiary & (tunnel=yes|tunnel=1) [0x12 road_class=1 road_speed=3 resolution 20]
+highway=tertiary_link & (tunnel=yes|tunnel=1) [0x12 road_class=1 road_speed=1 resolution 20]
+highway=minor & (tunnel=yes|tunnel=1) [0x12 road_class=1 road_speed=3 resolution 21]
+highway=unclassified & (tunnel=yes|tunnel=1) [0x12 road_class=0 road_speed=3 resolution 21]
+
+highway=pedestrian & area!=yes & (tunnel=yes|tunnel=1) {add access = no; add foot = yes} [0x12 road_class=0 road_speed=0 resolution 22]
+highway=living_street & (tunnel=yes|tunnel=1) [0x12 road_class=0 road_speed=1 resolution 22]
+highway=residential & (tunnel=yes|tunnel=1) [0x12 road_class=0 road_speed=2 resolution 22]
+highway=bridleway & (tunnel=yes|tunnel=1) {add access = no; add bicycle = yes; add foot = yes} [0x12 road_class=0 road_speed=0 resolution 23]
+highway=byway & (tunnel=yes|tunnel=1) [0x12 road_class=0 road_speed=0 resolution 23]
+highway=service & (tunnel=yes|tunnel=1) [0x12 road_class=0 road_speed=2 resolution 22]
+highway=cycleway & (tunnel=yes|tunnel=1) {add access = no; add bicycle = yes; add foot = yes} [0x12 road_class=0 road_speed=1 resolution 23]
+
+(highway=footway|highway=path|highway=steps) & (tunnel=yes|tunnel=1) {add access = no; add foot = yes} [0x12 road_class=0 road_speed=0 resolution 23]
+highway=track & (tunnel=yes|tunnel=1) [0x12 road_class=0 road_speed=1 resolution 21]
+highway=unsurfaced & (tunnel=yes|tunnel=1) [0x12 road_class=0 road_speed=1 resolution 21]
+highway=road & (tunnel=yes|tunnel=1) { add mkgmap:dead-end-check = false} [0x12 road_class=0 road_speed=1 resolution 21]
+
+railway=abandoned & (tunnel=yes|tunnel=1) [0x12 road_class=0 road_speed=1 resolution 21]
+railway=* & (tunnel=yes|tunnel=1) [0x12 resolution 17]
+
 # Ways sorted roughly by descending order of class
 highway=motorway {add oneway = yes; add bicycle = no; add foot = no } [0x01 road_class=4 road_speed=7 resolution 14]
 highway=motorway_link {add oneway = yes; add bicycle = no; add foot = no } [0x09 road_class=3 road_speed=2 resolution 16]
@@ -102,22 +135,30 @@
 
 # Some countries allow, others disallow bicycling on pedestrian streets.
 # To allow bicycling, add 'add bicycle=yes'
-highway=pedestrian & area!=yes {add access = no; add foot = yes} [0x16 road_class=0 road_speed=0 resolution 22]
+# Type 0x0d is Garmin standard for pedestrian road - JM, 1 line:
+highway=pedestrian & area!=yes {add access = no; add foot = yes} [0x0d road_class=0 road_speed=0 resolution 22]
 highway=living_street [0x06 road_class=0 road_speed=1 resolution 22]
 highway=residential [0x06 road_class=0 road_speed=2 resolution 22]
 highway=bridleway {add access = no; add bicycle = yes; add foot = yes} [0x07 road_class=0 road_speed=0 resolution 23]
 highway=byway [0x16 road_class=0 road_speed=0 resolution 23]
 highway=service [0x07 road_class=0 road_speed=2 resolution 22]
-highway=cycleway {add access = no; add bicycle = yes; add foot = yes} [0x07 road_class=0 road_speed=1 resolution 23]
+# Cycleways with custom type 0x0f - JM, 1 line:
+highway=cycleway {add access = no; add bicycle = yes; add foot = yes} [0x0f road_class=0 road_speed=1 resolution 23]
 
-highway=footway|highway=path|highway=steps {add access = no; add foot = yes} [0x16 road_class=0 road_speed=0 resolution 23]
+# Steps with custom type 0x13, footways custom type 0x0e - JM, 3 lines:
+highway=steps {add access = no; add foot = yes} [0x13 road_class=0 road_speed=0 resolution 23]
+highway=footway {add access = no; add foot = yes} [0x0e road_class=0 road_speed=0 resolution 23]
+highway=path {add access = no; add foot = yes} [0x16 road_class=0 road_speed=0 resolution 23]
 highway=track [0x0a road_class=0 road_speed=1 resolution 21]
 highway=unsurfaced [0x0a road_class=0 road_speed=1 resolution 21]
-highway=road { add mkgmap:dead-end-check = false} [0x06 road_class=0 road_speed=1 resolution 21]
+# Unspecified road as general Garmin road - JM, 1 line:
+highway=road { add mkgmap:dead-end-check = false} [0x00 road_class=0 road_speed=1 resolution 21]
 
 # Mop up any unrecognised highway types
-highway=* & area!=yes [0x07 ]
+# Unspecified road as general Garmin road - JM, 1 line:
+highway=* & area!=yes [0x00 ]
 
+# Note: polygon may be better guess for natural=coastline - JM, 1 line
 natural=coastline [0x15 resolution 12]
 power=line [0x29 resolution 20]
 
@@ -149,3 +190,47 @@
 boundary=administrative [0x1c resolution 22]
 boundary=national [0x1e resolution 17]
 boundary=political [0x1c resolution 17]
+
+# In Custom TYP, !=not used in style, () to be added:
+# 0x00, road
+# 0x01, motorway
+# 0x02, motorway trunk
+# 0x03, primary road
+# 0x04, secondary road
+# 0x05, tertiary road
+# 0x06, minor road
+# 0x07, service road
+# 0x08, low speed ramp
+# 0x09, high speed ramp
+# 0x0a, track
+# 0x0c, roundabout
+# 0x0d, pedestrian road
+# 0x0e, footway -- custom, original 'trail'
+# 0x0f, cycleway -- custom, original 'major trail'
+# 0x10, !oneway -- custom, original unknown
+# 0x11, !no name -- custom, original unknown
+# 0x12, tunnel -- custom, original unknown
+# 0x13, steps -- custom, original 'steep track'
+# 0x14, railroad
+# 0x15, coastline -- rendering as an area is a better guess
+# 0x16, generic path
+# 0x17, --
+# 0x18, stream
+# 0x19, --
+# 0x1a, !oneway, except bicycle -- custom original 'ferry/cartrain'
+# 0x1b, ferry
+# 0x1f, water
+# 0x27, airport runway
+# 0x29, power line
+# 0x30, NOT ALLOWED?
+# 0x31, NOT ALLOWED?
+# 0x40, NOT ALLOWED?
+# 0x20, !bridge, standard -- custom, orignal 'thin contour 1/10)'
+# 0x21, !bridge, narrow -- custom, orignal 'medium contour 1/2)'
+# 0x22, !bridge, wide -- custom, orignal 'thick contour 1/1)'
+# 0x23, !bridge, extra wide -- custom, orignal 'depth contour 1/10)'
+# 0x30, NOT ALLOWED?
+
+# With option --make-opposite-cycleways we can circumvent oneways for bicycles
+# works with existing tags, so far not with added tags. e.g.:
+# highway=* & (oneway=yes | oneway=1 | oneway=-1) { set cycleway=opposite }
Index: polygons
===================================================================
--- polygons	(revision 1835)
+++ polygons	(working copy)
@@ -11,19 +11,31 @@
 aeroway=airport [0x07 resolution 18]
 aeroway=aerodrome [0x07 resolution 18]
 aeroway=helipad [0x0e resolution 20]
+# Runways and taxiways tagged as area rendered as such, see corresponding lines in lines file - JM, 2 lines:
+aeroway=runway & area=yes [0x0e resolution 20]
+aeroway=taxiway & area=yes [0x0e resolution 24]
 
 amenity=kindergarten [0x0a resolution 18]
 amenity=cafe | amenity=fast_food | amenity=restaurant | amenity=food_court [0x08 resolution 20]
+# Note: campus *should* not be rendered as a building - JM
 amenity=college [0x0a resolution 18]
 amenity=grave_yard [0x1a resolution 18]
+# Note: campus *should* not be rendered as a building - JM
 amenity=hospital [0x0b resolution 18]
 amenity=nursing_home [0x0b resolution 21]
+# Note: underground parkings *should* have their own style + type - JM
 parking=underground | parking=multi-storey [0x06 resolution 21]
+# Buildings tagged parking - JM, 1 line:
+building=parking | (amenity=parking & building=yes) [0x06 resolution 20]
 amenity=parking | parking=surface [0x05 resolution 21]
+# Prison is building+military - JM, 1 line:
+amenity=prison [0x13 resolution 20 continue]
 amenity=prison [0x04 resolution 20]
+# Note: campus *should* not be rendered as a building - JM
 amenity=school [0x0a resolution 20]
 # amenity=supermarket is superceded by shop=supermarket or landuse=retail
 amenity=supermarket [0x08 resolution 20]
+# Note: campus *should* not be rendered as a building - JM
 amenity=university [0x0a resolution 18]
 
 healthcare=* [0x0b resolution 21]
@@ -34,22 +46,27 @@
 landuse=cemetery [0x1a resolution 18]
 landuse=commercial [0x0c resolution 18]
 landuse=construction [0x0c resolution 20]
-landuse=farm [0x4e resolution 18]
+# Custom type 0x21 for meadow/greenfield - JM, 1 line: 
+landuse=farm [0x21 resolution 18]
 landuse=farmyard [0x4e resolution 18]
 landuse=forest [0x50 resolution 18]
 landuse=greenfield [0x17 resolution 18]
 landuse=industrial [0x0c resolution 18]
-landuse=meadow [0x17 resolution 18]
+# Custom type 0x21 for meadow/greenfield - JM, 1 line: 
+landuse=meadow [0x21 resolution 18]
 landuse=military [0x04 resolution 18]
 landuse=quarry [0x0c resolution 18]
 landuse=recreation_ground [0x19 resolution 18]
 landuse=reservoir [0x3f resolution 18]
 # on resolution 24, display building=* instead of landuse=residential
-landuse=residential [0x10 resolution 23-18]
+# Residential is Garmin type 0x01 - JM, 1 line:
+landuse=residential [0x01 resolution 23-18]
 landuse=retail [0x08 resolution 20]
 landuse=village_green [0x17 resolution 20]
 landuse=vineyard [0x4e resolution 20]
 landuse=wood [0x50 resolution 18]
+# Not common, but exists in OSM - JM, 1 line:
+landuse=park [0x17 resolution 20]
 
 leisure=common [0x17 resolution 20]
 leisure=garden [0x17 resolution 20]
@@ -61,11 +78,15 @@
 leisure=pitch { name '${name} (${sport})' | '${name}' } [0x19 resolution 20]
 leisure=playground [0x17 resolution 20]
 leisure=recreation_ground [0x19 resolution 18]
+# Note: Tag sports_centre may be used for larger aera, with other areas inside it! - JM
 leisure=sports_center | leisure=sports_centre { name '${name} (${sport})' | '${name}' } [0x19 resolution 20]
 leisure=stadium { name '${name} (${sport})' | '${name}' } [0x19 resolution 19]
 leisure=track { name '${name} (${sport})' | '${name}' } [0x19 resolution 18]
 leisure=water_park [0x09 resolution 18]
 
+# Zoo rendered as park if not a building - JM, 1 line:
+tourism=zoo & (building!=* | building=no) [0x17 resolution 20]
+
 military=airfield [0x04 resolution 18]
 military=barracks [0x04 resolution 18]
 military=danger_area [0x04 resolution 18]
@@ -73,7 +94,9 @@
 
 natural=glacier [0x4d resolution 16]
 natural=marsh [0x51 resolution 20]
-natural=mud [0x51 resolution 20]
+# Garmin type 0x53 is standard for mud/sand, added beach - JM, 2 lines:
+natural=beach [0x53 resolution 20]
+natural=mud [0x53 resolution 20]
 natural=wetland [0x51 resolution 20]
 natural=scrub [0x4f resolution 20]
 natural=water [0x3c resolution 18]
@@ -82,20 +105,68 @@
 natural=wood [0x50 resolution 18]
 
 place=village [0x03 resolution 18]
-place=island & name=* [0x53 resolution 18]
-place=islet & name=* [0x53 resolution 20]
+# Note: type 0x53 (mud/sand) *should* not be used for island/islet - JM
+# More neutral custom type 0x21 used for island/inlet - JM, 1 line: 
+place=island & name=* [0x21 resolution 18]
+place=islet & name=* [0x21 resolution 20]
 
 shop=* [0x08 resolution 20]
 
 # squares and plazas
-highway=pedestrian & area=yes [0x17 resolution 20]
+# Cystom type 0x1b for squares and plazas - JM, 1 line:
+highway=pedestrian & area=yes [0x1b resolution 20]
 # other highways that have area=yes set must be parking lots
 highway=* & area=yes [0x05 resolution 21]
+# Railway platforms rendered as polygons, see corresponding line in lines file - JM, 1 line
+railway=platform & area=yes [0x1b resolution 20]
 
 waterway=riverbank [0x46 resolution 20]
+# Cystom type 0x1b for piers and reinforced slopes - JM, 3 lines:
+man_made=groyne [0x1b resolution 20]
+man_made=reinforced_slope [0x1b resolution 20]
+man_made=pier & area=yes [0x1b resolution 20]
 
 historic=museum | historic=memorial [0x1e resolution 20]
 historic=archaeological_site | historic=ruins [0x1e resolution 21]
 
 # building tag should be last
-building=* | man_made=* | amenity=* | tourism=* [0x13 resolution 24]
+# Following line was too general - JM, 2 lines:
+#building=* | man_made=* | amenity=* | tourism=* [0x13 resolution 24]
+building=* [0x13 resolution 24]
+# Airport buildings - JM, 1 line:
+aeroway=terminal [0x13 resolution 20]
+
+# In Custom TYP, !=not used in style:
+# 0x01, urban area
+# 0x03, rural housing
+# 0x04, military -- transparent
+# 0x05, parking
+# 0x06, parking garage
+# 0x07, airport
+# 0x08, shopping
+# 0x09, marina
+# 0x0a, school
+# 0x0b, healthcare
+# 0x0c, industrial area
+# 0x0e, runway/helipad
+# 0x10 -- use 0x01
+# 0x13, building
+# 0x16, nature reserve
+# 0x17, park
+# 0x18, golf course
+# 0x19, sport
+# 0x1a, cemetary/cemetery
+# 0x1b, surfaced area -- custom, original unknown
+# 0x1e, historic
+# 0x21, greenfield/meadow -- custom, original unknown
+# 0x32, sea
+# 0x3c, water large
+# 0x3f, water small
+# 0x46, river
+# 0x47, waterfall -- custom, original 'large river'
+# 0x4d, glacier
+# 0x4e, orchard/plantation
+# 0x4f, scrub
+# 0x50, woods/forest
+# 0x51, wetland
+# 0x53, mud/sand
