addr:housenumber=* {set mkgmap:execute_finalize_rules=true}
include 'inc/access';

parking=park_and_ride {set park_ride=yes;delete parking}

# delete duplicate names
operator=${brand} { delete operator; }
operator=${name}  { delete operator; }
brand=${name}     { delete brand; }

name:fr=* & !(name=*) {set name='${name:fr}'}
name:it=* & !(name=*) {set name='${name:it}'}
name:lb=* & !(name=*) {set name='${name:lb}'}
name:dn=* & !(name=*) {set name='${name:dn}'}
name:gr=* & !(name=*) {set name='${name:gr}'}
name:nl=* & !(name=*) {set name='${name:nl}'}
name:sp=* & !(name=*) {set name='${name:sp}'}
name:en=* & !(name=*) {set name='${name:en}'}
name:de=* & !(name=*) {set name='${name:de}'}


barrier=* & barrier !=no & rad=nein {
set mkgmap:bicycle=no;
set mkgmap:car=no;
set mkgmap:taxi=no;
set mkgmap:truck=no;
set mkgmap:bus=no;
set mkgmap:emergency=no;
set mkgmap:delivery=no
}
barrier=* & barrier !=no & laufen=nein { set mkgmap:foot=no }

barrier=* & barrier !=no & rad=ja {
set mkgmap:bicycle=yes;
set mkgmap:car=yes;
set mkgmap:taxi=yes;
set mkgmap:truck=yes;
set mkgmap:bus=yes;
set mkgmap:emergency=yes;
set mkgmap:delivery=yes
}
barrier=* & barrier !=no & laufen=ja { set mkgmap:foot=yes }

man_made~'bridge|pipeline|groyne|embankment|dyke'	{delete man_made}

#name!=* & note!=* & amenity=* &!(amenity=parking) & mkgmap:area2poi=true {delete amenity}
name!=* & note!=* & historic=* & mkgmap:area2poi=true {delete historic}
historic=* & mkgmap:line2poi=true {delete historic}
name!=* & note!=* & landuse=* & mkgmap:area2poi=true {delete landuse}
name!=* & note!=* & leisure=* & mkgmap:area2poi=true {delete leisure}
leisure=* & mkgmap:line2poi=true {delete leisure}
name!=* & note!=* & man_made=* & mkgmap:area2poi=true {delete man_made}
name!=* & note!=* & natural=* & mkgmap:area2poi=true &! (natural=water & name=*) {delete natural}
name!=* & note!=* & shop=* & mkgmap:area2poi=true {delete shop}
name!=* & note!=* & sport=* & mkgmap:area2poi=true {delete sport}
name!=* & note!=* & tourism=* & tourism!=viewpoint & mkgmap:area2poi=true {delete tourism}
rcn_ref=* & mkgmap:line2poi=true {delete rcn_ref}
traffic_calming=* & mkgmap:line2poi=true {delete traffic_calming}
barrier=* & barrier !=no & mkgmap:line2poi=true {delete barrier}
tourism=* & mkgmap:line2poi=true {delete tourism}


natural=cliff & mkgmap:line2poi=true {delete natural}
natural=barranco & mkgmap:line2poi=true {delete natural}
natural=gorge & mkgmap:line2poi=true {delete natural}
natural=ridge & mkgmap:line2poi=true {delete natural}
natural=arete & mkgmap:line2poi=true {delete natural}
natural=volcano & mkgmap:line2poi=true {delete natural}
natural=tree_row & mkgmap:line2poi=true {delete natural}
natural=valley & mkgmap:line2poi=true {delete natural}
traffic_sign=city_limit & mkgmap:line2poi=true {delete traffic_sign}
level_crossing=traffic_signals & mkgmap:line2poi=true {delete level_crossing}
highway=stop & mkgmap:line2poi=true {delete highway}
highway=give_way & mkgmap:line2poi=true {delete highway}
noexit=yes & mkgmap:line2poi=true {delete noexit}
highway=crossing & mkgmap:line2poi=true {delete highway}
highway=mini_roundabout & mkgmap:line2poi=true {delete highway}
highway=passing_place & mkgmap:line2poi=true {delete highway}
barrier=kerb {set traffic_calming=kerb; delete barrier}
abandoned=yes &! (highway=*) &! (railway=*)	{set highway=abandoned; delete abandoned}
highway=abandoned							{delete access; delete trail_visibility; delete smoothness; delete surface; delete mtb:scale; delete sac_scale}
crossing=traffic_signals & highway=* {delete highway}
highway=traffic_signals { add mkgmap:road-speed = '-2' }


route_icn=*  & mkgmap:line2poitype=mid	{ name'icn:${route_icn}'}	[0x6409 resolution 24 continue]
route_ncn=*  & mkgmap:line2poitype=mid	{ name'ncn:${route_ncn}'}	[0x6409 resolution 24 continue]
route_rcn=*  & mkgmap:line2poitype=mid	{ name'rcn:${route_rcn}'}	[0x6409 resolution 24 continue]
route_lcn=*  & mkgmap:line2poitype=mid	{ name'lcn:${route_lcn}'}	[0x6409 resolution 24 continue]

route_mtb=*  & mkgmap:line2poitype=mid	{ name'mtb:${route_mtb}'}	[0x6409 resolution 24 continue]

route_iwn=*  & mkgmap:line2poitype=mid	{ name'iwn:${route_iwn}'}	[0x6412 resolution 24 continue]
route_nwn=*  & mkgmap:line2poitype=mid	{ name'nwn:${route_nwn}'}	[0x6412 resolution 24 continue]
route_rwn=*  & mkgmap:line2poitype=mid	{ name'rwn:${route_rwn}'}	[0x6412 resolution 24 continue]
route_lwn=*  & mkgmap:line2poitype=mid	{ name'lwn:${route_lwn}'}	[0x6412 resolution 24 continue]



#Namen

description=${name}		{delete description}
nickname=${name:prefix}	{delete nickname}

# delete FIXME values (they should be better used in maintenance maps)
ref=FIXME | ref=fixme           { delete ref; }
operator=FIXME | operator=fixme { delete operator; }
brand=FIXME | brand=fixme       { delete brand; }
name=FIXME | name=fixme         { delete name; }

# delete duplicate names
operator=${brand} { delete operator; }
operator=${name}  { delete operator; }
brand=${name}     { delete brand; }

#Namen

nickname=*				{set SpeicheName='${SpeicheName} ${nickname}' | '${nickname}'}
name:prefix=*			{set SpeicheName='${SpeicheName} ${name:prefix}' | '${name:prefix}'}
alt_name=*				{set SpeicheName='${SpeicheName} "${alt_name}"' | '"${alt_name}"'}
loc_name=*				{set SpeicheName='${SpeicheName} loc:${loc_name}' | 'loc:${loc_name}'}
official_name=* 		{set SpeicheName='${SpeicheName} ofc:${official_name}' | 'ofc:${official_name}'}
#name!=* & guidepost=*	{set SpeicheName='${SpeicheName} ${guidepost}' | '${guidepost}'}
#name!=* & flood_prone=*	{set SpeicheName='${SpeicheName} ${flood_prone}' | '${flood_prone}'}
#name!=* & ford=*		{set SpeicheName='${SpeicheName} ${ford}' | '${ford}'}
#name!=* & route=*		{set SpeicheName='${SpeicheName} ${route}' | '${route}'}
#name!=* & railway=*		{set SpeicheName='${SpeicheName} ${railway}' | '${railway}'}
#name!=* & military=*	{set SpeicheName='${SpeicheName} ${military}' | '${military}'}
#name!=* & amenity=*		{set SpeicheName='${SpeicheName} ${amenity}' | '${amenity}'}
#name!=* & barrier=* & barrier !=no		{set SpeicheName='${SpeicheName} ${barrier}' | '${barrier}'}
#name!=* & traffic_calming=*		{set SpeicheName='${SpeicheName} ${traffic_calming}' | '${traffic_calming}'}
name!=* & historic!=yes & historic=*	{set SpeicheName='${SpeicheName} ${historic}' | '${historic}'}
#name!=* & landuse=*		{set SpeicheName='${SpeicheName} ${landuse}' | '${landuse}'}
#name!=* & leisure=*		{set SpeicheName='${SpeicheName} ${leisure}' | '${leisure}'}
name!=* & man_made!=yes & man_made=*	{set SpeicheName='${SpeicheName} ${man_made}' | '${man_made}'}
#name!=* & natural=*		{set SpeicheName='${SpeicheName} ${natural}' | '${natural}'}
#name!=* & shop=*		{set SpeicheName='${SpeicheName} ${shop}' | '${shop}'}
#amenity=bicycle_parking	{set SpeicheName='bicycle-parking' | 'bicycle-parking'}
name!=* & sport!=yes & sport=*		{set SpeicheName='${SpeicheName} ${sport}' | '${sport}'}
name!=* & tourism!=yes & tourism=*		{set SpeicheName='${SpeicheName} ${tourism}' | '${tourism}'}
name!=* & power!=yes & power=*		{set SpeicheName='${SpeicheName} ${power}' | '${power}'}
name!=* & network!=yes & network=*		{set SpeicheName='${SpeicheName} ${network}' | '${network}'}
covered=*				{set SpeicheName='${SpeicheName} covered:${covered}' | 'covered:${covered}'}
ref=*					{set SpeicheName='${SpeicheName} (${ref})' | '(${ref})'}
route_ref=*					{set SpeicheName='${SpeicheName} (${route_ref})' | '(${route_ref})'}
bus_bicycle=*					{set SpeicheName='${SpeicheName} (${bus_bicycle})' | '(${bus_bicycle})'}
cuisine=*				{set SpeicheName='${SpeicheName} (${cuisine})' | '(${cuisine})'}
country=*		{set SpeicheName='${SpeicheName} ${country}' | '${country}'}	
access=* & (barrier=* & barrier !=no|ford=*|amenity=parking|parking=surface|parking=underground|parking=multi-storey|flood_prone=*)	{set SpeicheName='${SpeicheName} access:${access}' | 'access:${access}'}
rad=nein & laufen!=nein & (barrier=* & barrier !=no|ford=*|flood_prone=*)	{set barriername=O}
laufen=nein & rad!=nein & (barrier=* & barrier !=no|ford=*|flood_prone=*)	{set barriername=|}
laufen=nein & rad=nein  & (barrier=* & barrier !=no|ford=*|flood_prone=*)	{set barriername=X}
#seats=*					{set SpeicheName='${SpeicheName} seats:${seats}' | 'seats:${seats}'}
internet_access=*		{set SpeicheName='${SpeicheName} internet:${internet_access}' | 'internet:${internet_access}'}
#backrest=*				{set SpeicheName='${SpeicheName} back:${backrest}' | 'back:${backrest}'}
material=* & amenity!=bench 				{set SpeicheName='${SpeicheName} ${material}' | '${material}'}
memorial=*				{set SpeicheName='${SpeicheName} ${memorial}' | '${memorial}'}
religion=*				{set SpeicheName='${SpeicheName} ${religion}' | '${religion}'}
denomination=*			{set SpeicheName='${SpeicheName} ${denomination}' | '${denomination}'}
building=* & building !=yes			{set SpeicheName='${SpeicheName} ${building}' | '${building}'}
service_times=*			{set SpeicheName='${SpeicheName} ${service_times}' | '${service_times}'}
tower:type=*			{set SpeicheName='${SpeicheName} ${tower:type}' | '${tower:type}'}
generator:source=* & generator:source!=yes		{set SpeicheName='${SpeicheName} ${generator:source}' | '${generator:source}'}
toilets:disposal=*		{set SpeicheName='${SpeicheName} ${toilets:disposal}' | '${toilets:disposal}'}
toilets:position=*		{set SpeicheName='${SpeicheName} ${toilets:position}' | '${toilets:position}'}
fee=yes					{set SpeicheName='${SpeicheName} fee' | 'fee'}
fee:amount=*			{set SpeicheName='${SpeicheName} ${fee:amount}' | '${fee:amount}'}
drinking_water=*		{set SpeicheName='${SpeicheName} drinking_water:${drinking_water}' | 'drinking_water:${drinking_water}'}
direction=*				{set SpeicheName='${SpeicheName} :${direction}' | ':${direction}'}
msu=*					{set SpeicheName='${SpeicheName} ${msu}' | '${msu}'}
incline=*				{set SpeicheName='${SpeicheName} ${incline}' | '${incline}'}
information=* & information!=guidepost	& information!=yes		{set SpeicheName='${SpeicheName} ${information}' | '${information}'}
park_ride=yes			{set SpeicheName='${SpeicheName} ${P+R}' | '${P+R}'}
parking=*				{set SpeicheName='${SpeicheName} ${parking}' | '${parking}'}
capacity=*				{set SpeicheName='${SpeicheName} cap:${capacity}' | 'cap:${capacity}'}
capacity:tents=*				{set SpeicheName='${SpeicheName} tents:${capacity:tents}' | 'tents:${capacity:tents}'}
tents=no				{set SpeicheName='${SpeicheName} no tents' | 'no tents'}
population=*			{set SpeicheName='${SpeicheName} population:${population}' | 'population:${population}'}
operator=*				{set SpeicheName='${SpeicheName} ${operator}' | '${operator}'}
brand=*					{set SpeicheName='${SpeicheName} ${brand}' | '${brand}'}
sport=*					{set SpeicheName='${SpeicheName} ${sport}' | '${sport}'}
geological=*			{set SpeicheName='${SpeicheName} ${geological}' | '${geological}'}
stars=*					{set SpeicheName='${SpeicheName} *${stars}' | '*${stars}'}
heritage=* & heritage!=no					{set SpeicheName='${SpeicheName} heritage' | 'heritage'}
usage=*					{set SpeicheName='${SpeicheName} ${usage}' | '${usage}'}
tower:type=*			{set SpeicheName='${SpeicheName} ${tower:type}' | '${tower:type}'}
#start_date=*						{set SpeicheName='${SpeicheName} start_date:${start_date}' | 'start_date:${start_date}'}
#construction=* 			{set SpeicheName='${SpeicheName} Constr.:${Construction}' | 'Constr.:${Construction}'}
#construction:note=* & (construction=* | highway=construction)		{set SpeicheName='${SpeicheName} ${construction:note}' | '${construction:note}'}
#website=*				{set SpeicheName='${SpeicheName} ${website}' | '${website}'}
#outdoor_seating=yes		{set SpeicheName='${SpeicheName} outdoor' | 'outdoor'}
takeaway=yes			{set SpeicheName='${SpeicheName} takeaway' | 'takeaway'}
diet=*					{set SpeicheName='${SpeicheName} diet:${diet}' | 'diet:${diet}'}
organic=*				{set SpeicheName='${SpeicheName} organic:${organic}' | 'organic:${organic}'}
payment=*				{set SpeicheName='${SpeicheName} ${payment}' | '${payment}'}
maxspeed=*				{set SpeicheName='${SpeicheName} ${maxspeed}km/h' | '${maxspeed}km/h'}
bicycle_parking=*		{set SpeicheName='${SpeicheName} ${bicycle_parking}' | '${bicycle_parking}'}
#supervised=*			{set SpeicheName='${SpeicheName} supervised:${supervised}' | 'supervised:${supervised}'}
height~'.*m'				{set SpeicheName='${SpeicheName} |:${height}' | '|:${height}'}
height=* &!(height~'.*m')	{set SpeicheName='${SpeicheName} |:${height}m' | '|:${height}m'}
length~'.*m'				{set SpeicheName='${SpeicheName} -:${length}' | '-:${length}'}
length=* &!(length~'.*m')	{set SpeicheName='${SpeicheName} -:${length}m' | '-:${length}m'}
width~'.*m'				{set SpeicheName='${SpeicheName} wth:${width}' | 'wth:${width}'}
width=* &!(width~'.*m')	{set SpeicheName='${SpeicheName} wth:${width}m' | 'wth:${width}m'}
ele~'.*m'					{set SpeicheName='${SpeicheName} (${ele})' | '(${ele})'}
ele=* &!(ele~'.*m')			{set SpeicheName='${SpeicheName} (${ele}m)' | '(${ele}m)'}
ascent~'.*m'				{set SpeicheName='${SpeicheName} (${ascent})' | '(${ascent})'}
ascent=* &!(ascent~'.*m')	{set SpeicheName='${SpeicheName} (${ascent}m)' | '(${ascent}m)'}
descent~'.*m'				{set SpeicheName='${SpeicheName} (${descent})' | '(${descent})'}
descent=* &!(descent~'.*m')		{set SpeicheName='${SpeicheName} (${descent}m)' | '(${descent}m)'}
flag:type=*				{set SpeicheName='${SpeicheName} ${flag:type}' | '${flag:type}'}
volcano:status=*		{set SpeicheName='${SpeicheName} ${volcano:status}' | '${volcano:status}'}
volcano:type=*			{set SpeicheName='${SpeicheName} ${volcano:type}' | '${volcano:type}'}
#opening_date=* 			{set SpeicheName='${SpeicheName} ${opening_date}' | '${opening_date}'}
opening_hours=* 		{set SpeicheName='${SpeicheName} ${opening_hours}' | '${opening_hours}'}
bicycle:conditional=* 	{set SpeicheName='${SpeicheName} ${cyc:cond}' | '${cyc:cond}'}
foot:conditional=* 		{set SpeicheName='${SpeicheName} ${ft:cond}' | '${ft:cond}'}
surface=* 				{set SpeicheName='${SpeicheName} ${surface}' | '${surface}'}
smoothness=* 			{set SpeicheName='${SpeicheName} Smo:${smoothness}' | 'Smo:${smoothness}'}
trail_visibility=* 		{set SpeicheName='${SpeicheName} Vis:${trail_visibility}' | 'Vis:${trail_visibility}'}
#bicycle=dismount		{set SpeicheName='${SpeicheName} dismount' | 'dismount'}
leaf_type=* 			{set SpeicheName='${SpeicheName} ${leaf_type}' | '${leaf_type}'}
wood=* 					{set SpeicheName='${SpeicheName} ${wood}' | '${wood}'}
leaf_cycle=* 			{set SpeicheName='${SpeicheName} ${leaf_cycle}' | '${leaf_cycle}'}
#trees=* 				{set SpeicheName='${SpeicheName} ${trees}' | '${trees}'}
#denotation=*			{set SpeicheName='${SpeicheName} ${denotation}' | '${denotation}'}
circumference=*			{set SpeicheName='${SpeicheName} ${circumference}m' | '${circumference}m'}
diameter_crown=*		{set SpeicheName='${SpeicheName} ${diameter_crown}m' | '${diameter_crown}m'}
crop=* 					{set SpeicheName='${SpeicheName} ${crop}' | '${crop}'}
lit=yes 				{set SpeicheName='${SpeicheName} Lit' | 'Lit'}

seamark:distance_mark:units~'kilo.*' 	{set seamark:distance_mark:units=km}
seamark:distance_mark:units~'he.*' 		{set seamark:distance_mark:units=hm}
seamark:distance_mark:distance=* 		{set SpeicheName='${SpeicheName} ${seamark:distance_mark:distance}' | '${seamark:distance_mark:distance}'}
seamark:distance_mark:units=* 			{set SpeicheName='${SpeicheName} ${seamark:distance_mark:units}' | '${seamark:distance_mark:units}'}
distance=* 								{set SpeicheName='${SpeicheName} ${distance}km' | '${distance}km'}
#note=* 					{set SpeicheName='${SpeicheName} ${note|substring:0:40}' | '${note|substring:0:40}'}
#description=*			{set SpeicheName='${SpeicheName} ${description|substring:0:40}' | '${description|substring:0:40}'}
#inscription=*			{set SpeicheName='${SpeicheName} ${inscription|substring:0:40}' | '${inscription|substring:0:40}'}
SpeicheName=* & name=*	{set SpeicheName='${name} ${SpeicheName}'}
SpeicheName=*	{set SpeicheName='${SpeicheName|substring:0:35}'}
name=${SpeicheName}	{delete SpeicheName}

SpeicheName=* & place=city & capital=yes 		 &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 18 continue]
SpeicheName=* & place=city & population > 200000 &! (pl=ok) 	{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 18 continue]
SpeicheName=* & place=city & population > 99999  &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 18 continue]
SpeicheName=* & place=city & population > 50000  &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 19 continue]
SpeicheName=* & place=town & population > 200000 &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 18 continue]
SpeicheName=* & place=town & population > 99999  &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 18 continue]
SpeicheName=* & place=town & population > 30000  &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 19 continue]
SpeicheName=* & place=town &! (population=*) 	 &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 20 continue]
SpeicheName=* & place=city &! (population=*) 	 &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 19 continue]
SpeicheName=* & place=village					 &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 21 continue]	
SpeicheName=* & place=suburb			 		 &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 21 continue]
SpeicheName=* & place=hamlet			 		 &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 22 continue]
SpeicheName=* & place=neighbourhood		 		 &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 23 continue]
SpeicheName=* & place=isolated_dwelling	 		 &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 23 continue]
SpeicheName=* & place=locality 					 &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 23 continue]
SpeicheName=* & place=island		 			 &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 20 continue]
SpeicheName=* & place=islet						 &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 23 continue]
SpeicheName=* & place=state					 	 &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 19 continue]
SpeicheName=* & place=region				 	 &! (pl=ok)		{set pl=ok ; set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 19 continue]

population=* {set population='${population|subst:,=>}'}
population=* {set population='${population|subst:.=>}'}


place=city & capital=yes 	{name'${name}'}		[0x0100 resolution 18]
place=town & capital=yes 	{name'${name}'}		[0x0100 resolution 18]

place=city & population > 200000 & name=*	{name'${name}'}		[0x0100 resolution 18]

place=city & population > 99999 & name=* {name'${name}'}		[0x0200 resolution 24-20 continue ]
place=city & population > 99999 & name=* {name'${name}'}		[0x0a00 resolution 19-19 ]

place=city & population > 50000 & name=* {name'${name}'}		[0x0200 resolution 24-21 continue]
place=city & population > 50000 & name=* {name'${name}'}		[0x0a00 resolution 20-20 ]
								
place=town & population > 200000 & name=*{name'${name}'}		[0x0100 resolution 24-20 continue ]
place=town & population > 200000 & name=*{name'${name}'}		[0x0a00 resolution 19-19 ]		
place=town & population > 99999 & name=* {name'${name}'}		[0x0200 resolution 24-21 continue ]
place=town & population > 99999 & name=* {name'${name}'}		[0x0a00 resolution 20-20 ]		

place=town & population > 30000 & name=* {name'${name}'}		[0x0200 resolution 24-22 continue]
place=town & population > 30000 & name=* {name'${name}'}		[0x0a00 resolution 21-20 ]

place=city 						& name=*	{name'${name}'}		[0x0200 resolution 24-21 continue ]
place=city						& name=*	{name'${name}'}		[0x0a00 resolution 20-19 ]

place=town						 & name=*	{name'${name}'}		[0x0200 resolution 24-21 continue]
place=town						 & name=*	{name'${name}'}		[0x0b00 resolution 20-20 ]

admin_level=1	& boundary=administrative	 & name=* 	{name'${name}'} 	[0x0700 resolution 21-18]
admin_level=2	& boundary=administrative	 & name=* 	{name'${name}'} 	[0x0700 resolution 21-18]
admin_level=3	& boundary=administrative	 & name=* 	{name'${name}'} 	[0x0700 resolution 21-18]
admin_level=4	& boundary=administrative	 & name=* 	{name'${name}'} 	[0x0700 resolution 21-18]
admin_level=5	& boundary=administrative	 & name=* 	{name'${name}'} 	[0x0700 resolution 21-20]
admin_level=6	& boundary=administrative	 & name=* 	{name'${name}'} 	[0x0700 resolution 22-20]
#admin_level=7	& boundary=administrative	 & name=*	{name'${name}'}		[0x0300 resolution 21 ]
#admin_level=8	& boundary=administrative	 & name=*	{name'${name}'}		[0x0300 resolution 22 ]

place=village					 & name=*	{name'${name}'}		[0x0400 resolution 24 continue]	
place=suburb			 		 & name=*	{name'${name}'}		[0x0400 resolution 24 continue]
place=hamlet			 		 & name=*	{name'${name}'}		[0x0400 resolution 24 continue]
place=neighbourhood		 		 & name=*	{name'${name}'}		[0x0400 resolution 24 ]
place=isolated_dwelling	 		 & name=*	{name'${name}'}		[0x0400 resolution 24 ]
place=locality 					 & name=*	{name'${name}'}		[0x0500 resolution 24 ]

place=village					 & name=*	{name'${name}'}		[0x0b00 resolution 23-22]	
place=suburb			 		 & name=*	{name'${name}'}		[0x0b00 resolution 23-22]
place=hamlet			 		 & name=*	{name'${name}'}		[0x0b00 resolution 23-23]

place=island		 & name=*	{name'${name}'}		[0x02800 resolution 20]
place=islet			 & name=*	{name'${name}'}		[0x1d00 resolution 24]

place=state					 & name=*	{name'${name}'}		[0x700 resolution 20-18]
place=region				 & name=*	{name'${name}'}		[0x700 resolution 21-20]

network~'icn|ncn|rcn|lcn' & (guidepost=* | information=guidepost) {set KnPSchild=ja;delete guidepost;delete information;delete tourism}

SpeicheName=* & KnPSchild=ja	{set mkgmap:label:1='${SpeicheName}'}	[0x2919 resolution 19 continue]

name=* & (aeroway=*|amenity=*|parking=*|cuisine=*|historic=*|leisure=*|man_made=*|building=*|landmark=*|natural=*|waterway=waterfall|military=*|ford=*|shop=*|sport=*|(route~'ferry|boat')|mountain_pass=*|tourism=*|office=*|information=*|guidepost=*|(maxspeed=* & highway=speed_camera)|highway=emergency_access_point|highway=services) &! (natural~'peak|volcano')	{set disname=ok ; set mkgmap:label:1='${name}'}	[0x2805 resolution 24 continue]

highway=bus_stop & route_ref=*										{set disname=ok ; set mkgmap:label:1='${name} (${route_ref})' | '(${route_ref})'}	[0x2805 resolution 24 continue]
highway=bus_stop & route_ref!=*	& name=*							{set disname=ok ; set mkgmap:label:1='${name}'}	[0x2805 resolution 24 continue]
railway~'bus_stop|tram_stop|halt|station' & route_ref=*				{set disname=ok ; set mkgmap:label:1='${name} (${route_ref})'}	[0x2805 resolution 24 continue]
railway~'bus_stop|tram_stop|halt|station' & route_ref!=* & name=*	{set disname=ok ; set mkgmap:label:1='${name}'}	[0x2805 resolution 24 continue]
highway=tram_stop & route_ref=*										{set disname=ok ; set mkgmap:label:1='${name} (${route_ref})'}	[0x2805 resolution 24 continue]
highway=tram_stop & route_ref!=* & name=*							{set disname=ok ; set mkgmap:label:1='${name}'}	[0x2805 resolution 24 continue]

building=yes & name=* & name!=no 	[0x6402 resolution 24 continue]
building=service & name=* & name!=no 	[0x6402 resolution 24 continue]

aeroway=airport [0x2f04 resolution 22]
aeroway=aerodrome [0x2f04 resolution 22]
aeroway=helipad [0x5904 resolution 24]
aeroway=terminal [0x2f04 resolution 24]

amenity=atm [0x2f06 resolution 24]
amenity=arts_centre [0x6400 resolution 24]
amenity=bank [0x2f06 resolution 24]
name=* & amenity=bar [0x2d02 resolution 24]
name=* & amenity=biergarten [0x2d02 resolution 24]
amenity=border_control | barrier=border_control [0x3006 resolution 20]
amenity=bus_station [0x2f17 resolution 23]
name=* & amenity=cafe [0x2a0e resolution 24]
name=* & amenity=car_club [0x2f0d resolution 24]
name=* & amenity=car_rental [0x2f02 resolution 24]
name=* & amenity=car_sharing [0x2f02 resolution 24]
name=* & amenity=car_wash [0x2f0e resolution 24]
name=* & amenity=casino [0x2d04 resolution 24]
name=* & amenity=cinema [0x2d03 resolution 24]
name=* & amenity=college [0x2c05 resolution 24]
name=* & amenity=concert_hall [0x2c09 resolution 24]
name=* & amenity=conference_centre [0x2c09 resolution 24]
name=* & amenity=convention_center [0x2c09 resolution 24]
name=* & amenity=community_centre [0x3005 resolution 24]
name=* & amenity=courthouse [0x3004 resolution 24]
amenity=drinking_water [0x5000 resolution 24 default_name 'Water']
name=* & amenity=embassy [0x3003 resolution 24]
amenity=emergency_phone [0x2f12 resolution 24 default_name 'Emergency Phone']
amenity=ferry_terminal [0x4700 resolution 22]
name=* & amenity=fast_food & cuisine=grill [0x2a03 resolution 24]
name=* & amenity=fast_food & cuisine ~ '.*pizza.*' [0x2a0a resolution 24]
name=* & amenity=fast_food [0x2a07 resolution 24]
amenity=fire_station [0x3008 resolution 24]
amenity=food_court [0x2a13 resolution 24]
amenity=fuel & fuel:HGV_diesel=yes [ 0x2f16 resolution 22]
amenity=fuel & shop=convenience [ 0x2e06 resolution 22]
amenity=fuel [0x2f01 resolution 22]
name=* & amenity=kindergarten [0x2c05 resolution 24]
name=* & amenity=library [0x2c03 resolution 24]
name=* & amenity=nightclub [0x2d02 resolution 24]
amenity=nursing_home [0x2b04 resolution 24]
parking=underground & name=*  | parking=multi-storey & name=*   | parking=surface & name=* [0x2f0b resolution 24 ]
name=* & amenity=pharmacy [0x2e05 resolution 24]
name=* & amenity=parking & name=* [0x2f0b resolution 24]
name=* & building=temple	[0x2c0f resolution 24]
building=chapel	[0x2c0e resolution 24]
name=* & amenity=place_of_worship & religion=christian & building~'church|cathedral|yes' & denomination !='.*jehova.*' [0x2c0b resolution 24]
name=* & amenity=place_of_worship & religion=muslim [0x2c0d resolution 24]
name=* & amenity=place_of_worship & religion=jewish [0x2c10 resolution 24]
name=* & amenity=place_of_worship & building!=* [0x2c0e resolution 24]
name=* & amenity=place_of_worship  [0x6404 resolution 24]

amenity=police [0x3001 resolution 24]
amenity=post_office [0x2f05 resolution 24]
amenity=prison [0x3007 resolution 24]
name=* & amenity=pub [0x2d02 resolution 24]
name=* & amenity=public_building [0x3007 resolution 24]
#amenity=recycling [0x2f15 resolution 24]

amenity=restaurant & cuisine=* {delete amenity}
name=* & cuisine=american [0x2a01 resolution 24]
name=* & cuisine=asian [0x2a02 resolution 24]
name=* & cuisine=bagel [0x2a0d resolution 24]
name=* & cuisine=barbecue [0x2a03 resolution 24]
name=* & cuisine=british [0x2a11 resolution 24]
name=* & cuisine='cafe/diner' [0x2a0e resolution 24]
name=* & cuisine=chinese [0x2a04 resolution 24]
name=* & cuisine=deli [0x2a05 resolution 24]
name=* & cuisine=french [0x2a0f resolution 24]
name=* & (cuisine=german | cuisine=bavarian) [0x2a10 resolution 24]
name=* & cuisine=grill [0x2a03 resolution 24]
name=* & cuisine=international [0x2a06 resolution 24]
name=* & cuisine=italian [0x2a08 resolution 24]
name=* & cuisine=japanese [0x2a02 resolution 24]
name=* & cuisine=korean [0x2a02 resolution 24]
name=* & cuisine=mexican [0x2a09 resolution 24]
name=* & cuisine ~ '.*pizza.*' [0x2a0a resolution 24]
name=* & cuisine=sea_food [0x2a0b resolution 24]
name=* & cuisine=spanish [0x2a09 resolution 24]
name=* & cuisine=speciality [0x2a12 resolution 24]
name=* & cuisine=steak [0x2a0c resolution 24]
name=* & cuisine=thai [0x2a02 resolution 24]
name=* & cuisine=ice_cream [0x2a0e resolution 24]
cuisine=* & name=* [0x2a00 resolution 24]

name=* & amenity=restaurant [0x2a00 resolution 24]
name=* & amenity=american [0x2a01 resolution 24]
name=* & amenity=asian [0x2a02 resolution 24]
name=* & amenity=bagel [0x2a0d resolution 24]
name=* & amenity=barbecue [0x2a03 resolution 24]
name=* & amenity=british [0x2a11 resolution 24]
name=* & amenity='cafe/diner' [0x2a0e resolution 24]
name=* & amenity=chinese [0x2a04 resolution 24]
name=* & amenity=deli [0x2a05 resolution 24]
name=* & amenity=french [0x2a0f resolution 24]
name=* & (amenity=german | amenity=bavarian) [0x2a10 resolution 24]
name=* & amenity=grill [0x2a03 resolution 24]
name=* & amenity=international [0x2a06 resolution 24]
name=* & amenity=italian [0x2a08 resolution 24]
name=* & amenity=japanese [0x2a02 resolution 24]
name=* & amenity=korean [0x2a02 resolution 24]
name=* & amenity=mexican [0x2a09 resolution 24]
name=* & amenity ~ '.*pizza.*' [0x2a0a resolution 24]
name=* & amenity=sea_food [0x2a0b resolution 24]
name=* & amenity=spanish [0x2a09 resolution 24]
name=* & amenity=speciality [0x2a12 resolution 24]
name=* & amenity=steak [0x2a0c resolution 24]
name=* & amenity=thai [0x2a02 resolution 24]
name=* & amenity=ice_cream [0x2a0e resolution 24]
amenity=bench [0x05001 resolution 24]
name=* & amenity=school [0x2c05 resolution 24]
# amenity=shelter is ambiguous; when possible, consider using other tags:
#  tourism=lean_to or tourism=picnic_site
#  shelter=yes on highway=bus_stop or highway=tram_stop or railway=halt
amenity=shelter & shelter_type=picnic_shelter {set tourism=picnic_site ; delete amenity}
amenity=shelter [0x6417 resolution 23 default_name 'Shelter']
# amenity=supermarket is superceded by shop=supermarket
name=* & amenity=supermarket [0x2e03 resolution 24]
amenity=taxi [0x2f17 resolution 24]
amenity=telephone [0x2f12 resolution 24 default_name 'Telephone']
name=* & amenity=theatre [0x2d01 resolution 24]
amenity=toilets & tourism=information [0x2f0c resolution 24]
amenity=toilets [0x4e00 resolution 24 ]
name=* & amenity=townhall [0x3003 resolution 24]
name=* & office=* [0x3007 resolution 24]
name=* & amenity=university [0x2c05 resolution 24]
# amenity=zoo is superceded by tourism=zoo
name=* & amenity=zoo [0x2c07 resolution 24]
amenity=bicycle_parking [0x2f0f resolution 24]

healthcare=hospital  & name=*  | amenity=hospital  & name=*  [0x3002 resolution 22]
healthcare=*  & name=*  | amenity=dentist  & name=*  | amenity=doctors  & name=*  [0x3002 resolution 24]

highway=bus_stop [0x2f17 resolution 24]


highway=motorway_junction [0x2100 resolution 24]

highway=services & mkgmap:area2poi!=true [0x210f resolution 24 default_name 'Services']

name=* & historic=museum [0x2c02 resolution 24]
historic=archaeological_site | historic=ruins [0x2c02 resolution 24]
historic=memorial [0x2c02 resolution 24]
historic=wayside_cross [0x2c02 resolution 24]
historic=wreck [0x04200 resolution 24]
historic=mine [0x0640c resolution 24]
historic=monument [0x05205 resolution 24]
historic=city_gate [0x05204 resolution 24]
historic=manor [0x03007 resolution 24]
historic=* & name=*  [0x2c02 resolution 24]

leisure=common & name=* [0x2c06 resolution 24]
leisure=garden & name=* [0x2c06 resolution 24]
leisure=golf_course [0x2d05 resolution 24]
leisure=ice_rink [0x2d08 resolution 24]
leisure=marina [0x4300 resolution 24]
leisure=nature_reserve & name=* [0x6612 resolution 23]
leisure=park & name=*  [0x2c06 resolution 24]
leisure=pitch & name=*   [0x2c08 resolution 24]
leisure=playground & name=*  [0x0640e resolution 24]
leisure=recreation_ground & name=*  [0x2c08 resolution 24]
leisure=sports_center | leisure=sports_centre & name=*   [0x2d0a resolution 24]
leisure=stadium & name=*   [0x2c08 resolution 24]
leisure=track & name=*   [0x2c08 resolution 24]
leisure=water_park & name=*  [0x2d09 resolution 24]
man_made=tower [0x6411 resolution 24]
landmark=chimney [0x6411 resolution 24]
man_made=chimney [0x6411 resolution 24]

landuse=cemetery|landuse=cemetary|amenity=grave_yard & name=*  [0x6403 resolution 24]
landuse=military & name=*  [0x640b resolution 24]
landuse=village_green & name=* [0x2c06 resolution 24]

military=bunker [0x640b resolution 24]
man_made=cairn [0x4c03 resolution 24]
man_made=adit | man_made=mineshaft [0x640c resolution 24]
man_made=petroleum_well [0x640d resolution 24]
amenity=post_box {name '${operator}' | '${name}'} [0x641b resolution 24]
amenity=clock [0x6410 resolution 24]
man_made=water_tower [0x6415 resolution 23]
amenity=hunting_stand [0x2b07 resolution 24]
man_made=survey_point [0x6418 resolution 24]
man_made=flagpole [0x6419 resolution 24]
man_made=reservoir_covered | man_made=gasometer [0x641a resolution 24]
man_made=crane [0x6610 resolution 24]
#man_made=surveillance [0x6611 resolution 24]
#power_source=*			{add generator:source=$power_source ; delete power_source}
man_made=windmill | generator:source=wind [0x6608 resolution 24]
generator:source=nuclear {set powercheck=j}  [0x07204 resolution 24]
(generator:source ~ 'hydro|tidal|wave') | man_made=watermill {set powercheck=j} [0x07203 resolution 24]
(generator:source ~ 'biomass|biofuel|biogas|coal|gas|oil|waste')	[0x07200 resolution 24]
power=tower [0x7201 resolution 24]
man_made=works | man_made=water_works [0x6609 resolution 24]
man_made=mast [0x6416 resolution 24]
man_made=lighthouse	[0x6413 resolution 23]
man_made=* & name=*	[0x02f15 resolution 24]
power=substation [0x7200 resolution 24]

natural=cave_entrance [0x6601 resolution 24]
natural=peak &	(name=*|ele=*) 						[0x6616 resolution 24-23 continue]
natural=peak &!	(name=*|ele=*) 						[0x6616 resolution 24-24 continue]
natural=peak &	name=* & ele > '999.*'  			[0x5602 resolution 22-20]
natural=peak &	(name=*|ele=*) 				  		[0x5602 resolution 22-21]
natural=peak &!	(name=*|ele=*) 				  		[0x5602 resolution 22-22]
natural=rock [0x6614 resolution 21]
natural=volcano					[0x660e resolution 24-23 continue]
natural=volcano & ele > '500.*' [0x5603 resolution 22-20]
natural=volcano  				[0x5603 resolution 22-21]
name=* & natural=tree & denotation=* [0x6602 resolution 24]
natural=glacier & name=* [0x07206 resolution 21]
natural=glacier & name!=* [0x07206 resolution 24]
natural=sinkhole [0x6617 resolution 24]
natural~'geyser|blowhole' [0x6509 resolution 24]

railway=halt [0x2f08 resolution 24]
railway=station [0x2f08 resolution 23]
railway=tram_stop [0x2f08 resolution 24]

shop=* & name!=*   {delete shop}
shop=greengrocer [0x2e08 resolution 24]
shop=bakers [0x2e02 resolution 24]
shop=bakery [0x2e02 resolution 24]
shop=beauty [0x2f10 resolution 24]
shop=bicycle [0x2f13 resolution 24]
shop=boat [0x2f09 resolution 24]
shop=butcher [0x2e0c resolution 24]
shop=car [0x2f07 resolution 24]
shop=car_dealer [0x2f07 resolution 24]
shop=car_parts [0x2f07 resolution 24]
shop=car_rental [0x2f02 resolution 24]
shop=car_repair [0x2f03 resolution 24]
shop=car_wrecker [0x2f0a resolution 24]
shop=chemist [0x2e05 resolution 24]
shop=clothes [0x2e07 resolution 24]
shop=computer [0x2e0b resolution 24]
shop=convenience [0x2e03 resolution 24]
shop=department_store [0x2e01 resolution 24]
shop=doityourself [0x2e09 resolution 24]
shop=fashion [0x2e07 resolution 24]
shop=furniture [0x2e09 resolution 24]
shop=garden_centre [0x2e08 resolution 24]
shop=garden_center [0x2e08 resolution 24]
shop=general [0x2e03 resolution 24]
shop=hardware [0x2e09 resolution 24]
shop=hairdresser [0x2f10 resolution 24]
shop=mall [0x2e04 resolution 24]
shop=organic [0x2e0a resolution 24]
shop=shoes [0x2e07 resolution 24]
shop=supermarket [0x2e03 resolution 24]
shop=tires [0x2f07 resolution 24]
shop=tyres [0x2f07 resolution 24]
shop=* & shop!=no & shop!=none & name=* [0x2e0c resolution 24]

sport=9pin  & name=* [0x2d07 resolution 24]
sport=10pin  & name=* [0x2d07 resolution 24]
leisure=bowling_alley  & name=* [0x2d07 resolution 24]
sport=airport  & name=* [0x2d0b resolution 24]
sport=multi  & name=* [0x2d0a resolution 24]
sport=skating  & name=* [0x2d08 resolution 24]
sport=skiing  & name=* [0x2d06 resolution 24]
sport=swimming & name=*  [0x2d09 resolution 24]

tourism=alpine_hut [0x06417 resolution 24]
tourism=attraction & historic=* [0x2c02 resolution 24]
tourism=attraction [0x6611 resolution 22]
tourism=artwork [0x6400 resolution 24]
tourism=aquarium [0x2c07 resolution 24]
tourism=camp_site [0x2b05 resolution 22]
tourism=caravan_site [0x2b06 resolution 24]
tourism=chalet [0x2b02 resolution 24]
tourism=guest_house  & name=* [0x2b02 resolution 24]
tourism=apartment & name=*  [0x2b02 resolution 24]
tourism=hostel  & name=* [0x2b02 resolution 24]
tourism=hotel & name=* [0x2b01 resolution 24]
tourism=motel & name=* [0x2b01 resolution 24]


rcn_ref=*				{set qrcn_ref='[${rcn_ref}] ${SpeicheName}' | '[${rcn_ref}]'}
rcn_ref=* & route_lcn=*	{set qrcn_ref='${qrcn_ref} ${route_lcn}' | '${route_lcn}'}
rcn_ref=* & route_rcn=*	{set qrcn_ref='${qrcn_ref} ${route_rcn}' | '${route_rcn}'}
rcn_ref=* & route_ncn=*	{set qrcn_ref='${qrcn_ref} ${route_ncn}' | '${route_ncn}'}
rcn_ref=* & route_icn=*	{set qrcn_ref='${qrcn_ref} ${route_icn}' | '${route_icn}'}
qrcn_ref='[${rcn_ref}]'		{delete qrcn_ref}
rcn_ref=*				{set mkgmap:label:1='${rcn_ref}';delete name;delete SpeicheName}	[0x4c00 resolution 24 continue]
rcn_ref=*				{set mkgmap:label:1='${rcn_ref}';delete name;delete SpeicheName}	[0x4a01 resolution 23-22 continue]
qrcn_ref=* 				{set mkgmap:label:1='${qrcn_ref}';delete name;delete SpeicheName}	[0x2919 resolution 22]

KnPSchild=ja	& name!=* & description=*	{set name='${description}'}
KnPSchild=ja	& name!=* & note=*	{set name='${note}'}
KnPSchild=ja	& name!=* & note=*	{set name='${KnPSchild}'}
KnPSchild=ja 	{set mkgmap:label:1='${name}';delete name;delete SpeicheName}		[0x4c01 resolution 24]

(guidepost=* | information=guidepost)  & name=* [0x4c02 resolution 24]
tourism=information	[0x2f0c resolution 24]
information=*			[0x2f0c resolution 24]
tourism=lean_to [0x2b05 resolution 24 default_name 'lean-to']
tourism=wilderness_hut [0x2b07 resolution 24 default_name 'wilderness hut']
tourism=museum [0x2c02 resolution 24]
tourism=picnic_site [0x04a00 resolution 24]
tourism=picnic_table [0x05002 resolution 24]
tourism=theme_park [0x2c01 resolution 24]
tourism=viewpoint  [0x6611 resolution 21]
tourism=wine_cellar [0x2c0a resolution 24]
tourism=zoo [0x2c07 resolution 24]
tourism=resort [0x2b04 resolution 24]

barrier=* & barrier !=no & laufen=nein & rad=nein	{set barrier=ok}	[0x2818 resolution 24]
barrier=bollard [0x2816 resolution 24]
barrier=lift_gate [0x2817 resolution 24]
level_crossing=automatic_barrier [0x2817 resolution 24]
railway=level_crossing [0x2817 resolution 24]
railway=crossing [0x2817 resolution 24]
barrier=block | barrier=cycle_barrier | barrier=stile | barrier=kissing_gate [0x2819 resolution 24]
barrier=toll_booth [0x2819 resolution 24]

barrier=* & barrier !=no &! (barrier=door) [0x2819 resolution 24]
railway=buffer_stop [0x2902 resolution 24]


highway=passing_place [0x280b resolution 24]
traffic_sign=city_limit [0x2910 resolution 23]
highway=traffic_signals & bicycle=no {delete bicycle}
highway=traffic_signals [0x640f resolution 24]
crossing=traffic_signals [0x640f resolution 24]
level_crossing=traffic_signals [0x640f resolution 24]
noexit=yes [0x2914 resolution 24]
highway=crossing [0x2917 resolution 24]
highway=mini_roundabout [0x2915 resolution 24]


seamark:type=distance_mark [0x07205 resolution 24]
waterway=milestone [0x07205 resolution 24]

highway=speed_camera  [0x5601 resolution 24]

mkgmap:from-node:mountain_pass=yes & highway=* & name=* & highway~'primary|secondary|tertiary|unclassified|minor|cycleway|badcycleway|badstreet'
 {set mkgmap:label:1='${mkgmap:from-node:name}';delete SpeicheName;delete name} [0x6613 resolution 22-19]
mountain_pass=yes & name=*  	[0x6613 resolution 23]
natural=saddle & name=* 	[0x6615 resolution 23]


natural=beach & name=* [0x6604 resolution 24]
natural=glacier & name=* [0x650a resolution 24]
natural=spring [0x6511 resolution 24]
natural=stream & name=* [0x6512 resolution 24]
natural=water & name=* & name!=Nette [0x6510 resolution 24]
natural=waterfall  [0x6508 resolution 24]
waterway=waterfall  [0x6508 resolution 24]
natural=wetland & name=* [0x6513 resolution 24]
landuse=cemetery|landuse=cemetary|amenity=grave_yard & name=* [0x6403 resolution 24]
landuse=military & name=* [0x640b resolution 24]
landuse=village_green & name=* [0x2c06 resolution 24]
(landuse=wood|landuse=forest|natural=wood) & name=* [0x6618 resolution 24]


route~'ferry|boat' & mkgmap:line2poitype=start		[0x4700 resolution 24 ]
route=ferry & mkgmap:line2poitype=mid				[0x4700 resolution 21 ]
route~'ferry|boat' & mkgmap:line2poitype=end		[0x4700 resolution 24 ]


#smoothness ~ '(bad|very_horrible|very_bad|horrible|impassable)' & mkgmap:line2poitype=mid {set mkgmap:label:1='${smoothness}';delete SpeicheName;delete name}	[0x2809 resolution 24 ]
trail_visibility ~ '.*(bad|horrible|no|poor|low)' & mkgmap:line2poitype=mid  {set mkgmap:label:1='${trail_visibility}';delete SpeicheName;delete name}	[0x2812 resolution 24 ]

highway=* & rad=nein & laufen=nein &! (highway ~ 'motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|road|minor|living_street|bridleway') {set highway=verboten}
highway=* & radanzeige=ja &! ((highway ~ 'motorway|motorway_link|trunk|trunk_link|steps|cycleway|verboten')|sac_scale=*|mtb:scale=*|mtb:scale:uphill=*) & mkgmap:line2poitype=mid  {set mkgmap:label:1='no bike';delete SpeicheName;delete name}	 [0x2810 resolution 24]

highway=* &! (highway=tunnel|highway=bridge) & opening_hours=* 			& mkgmap:line2poitype=mid {set mkgmap:label:1='${opening_hours}';delete SpeicheName;delete name}	[0x07207 resolution 24 ]
highway=* &! (highway=tunnel|highway=bridge) & bicycle:conditional=* 	& mkgmap:line2poitype=mid {set mkgmap:label:1='${bicycle:conditional}';delete SpeicheName;delete name}	[0x07207 resolution 24 ]
highway=* &! (highway=tunnel|highway=bridge) & foot:conditional=* 		& mkgmap:line2poitype=mid {set mkgmap:label:1='${foot:conditional}';delete SpeicheName;delete name}	[0x07207 resolution 24 ]

highway=* & (highway=tunnel|highway=bridge) & opening_hours=* 			& mkgmap:line2poitype=mid {set mkgmap:label:1='${opening_hours}';delete SpeicheName;delete name}	[0x07207 resolution 22 ]
highway=* & (highway=tunnel|highway=bridge) & bicycle:conditional=* 	& mkgmap:line2poitype=mid {set mkgmap:label:1='${bicycle:conditional}';delete SpeicheName;delete name}	[0x07207 resolution 22 ]
highway=* & (highway=tunnel|highway=bridge) & foot:conditional=* 		& mkgmap:line2poitype=mid {set mkgmap:label:1='${foot:conditional}';delete SpeicheName;delete name}	[0x07207 resolution 22 ]

highway=ford {set ford=yes}	
ford=* & mkgmap:line2poi=true {delete ford}	
ford=* & ford!=no 	{set mkgmap:label:1='ford';delete SpeicheName;delete name} [0x2814 resolution 24]
flood_prone=* & flood_prone!=no  	{set mkgmap:label:1='flood_prone';delete SpeicheName;delete name} [0x2814 resolution 24]

incline > 10 & !(incline=up|incline=down|incline=yes) & mkgmap:line2poitype=mid  {set mkgmap:label:1='${incline}';delete SpeicheName;delete name}	[0x2815 resolution 24]
incline < -10 & !(incline=up|incline=down|incline=yes) & mkgmap:line2poitype=mid {set mkgmap:label:1='${incline}';delete SpeicheName;delete name}	[0x2815 resolution 24]

bicycle=dismount & mkgmap:line2poitype=mid	{set mkgmap:label:1='${bicycle}';delete SpeicheName;delete name}	[0x2807 resolution 24]

<finalize>
# The finalizer section is executed for each element when a rule with an element type matches

include 'inc/address';

barrier=* & name!=* {delete SpeicheName}
barrier=* {set mkgmap:label:1='${barriername}'}

amenity=bench & name!=* {delete SpeicheName}
railway=level_crossing & name!=* {delete SpeicheName}
railway=crossing & name!=* {delete SpeicheName}
highway=passing_place & name!=* {delete SpeicheName}
highway=traffic_signals & bicycle=no & name!=* {delete SpeicheName}
highway=traffic_signals & name!=* {delete SpeicheName}
crossing=traffic_signals & name!=* {delete SpeicheName}
level_crossing=traffic_signals & name!=* {delete SpeicheName}
noexit=yes & name!=* {delete SpeicheName}
highway=crossing & name!=* {delete SpeicheName}
highway=mini_roundabout & name!=* {delete SpeicheName}

name=* & SpeicheName!=* &! (place=*|admin_level~'[1-8]')		 	{set mkgmap:label:1='${name}'}
SpeicheName=* &!(disname=ok|place=*|admin_level~'[1-8]') 	 		{set mkgmap:label:1='${SpeicheName}'}
(natural~'peak|volcano') & name=* & SpeicheName=* 					{set mkgmap:label:1='${name} ${SpeicheName}'}
