addr:housenumber=* {set mkgmap:execute_finalize_rules=true}
highway=* & name=* { set mkgmap:street='${name}' }


#include something
include 'inc/address';
include 'inc/access';


#isin rad nein
(highway~'motorway|trunk|primary|secondary|tertiary|unclassified|minor|residential|living_street|cycleway|steps')	{set isin=n}
highway=* & rad!=ja & laufen!=ja  & tunnel!=* & bridge!=* & isin!=n & is_in(landuse,cemetery,all)=true				{set isin=j}
highway=* & rad!=ja & laufen!=ja  & tunnel!=* & bridge!=* & isin!=n & is_in(landuse,landfill,all)=true				{set isin=j}
highway=* & rad!=ja & laufen!=ja  & tunnel!=* & bridge!=* & isin!=n & is_in(landuse,quarry,all)=true				{set isin=j}
highway=* & rad!=ja & laufen!=ja  & tunnel!=* & bridge!=* & isin!=n & is_in(landuse,allotments,all)=true			{set isin=j}
highway=* & rad!=ja & laufen!=ja  & tunnel!=* & bridge!=* & isin!=n & is_in(amenity,grave_yard,all)=true			{set isin=j}
highway=* & rad!=ja & laufen!=ja  & tunnel!=* & bridge!=* & isin!=n & is_in(amenity,kindergarten,all)=true 			{set isin=j}
highway=* & rad!=ja & laufen!=ja  & tunnel!=* & bridge!=* & isin!=n & is_in(amenity,college,all)=true				{set isin=j}
highway=* & rad!=ja & laufen!=ja  & tunnel!=* & bridge!=* & isin!=n & is_in(amenity,school,all)=true				{set isin=j}
highway=* & rad!=ja & laufen!=ja  & tunnel!=* & bridge!=* & isin!=n & is_in(amenity,university,all)=true			{set isin=j}
highway=* & rad!=ja & laufen!=ja  & tunnel!=* & bridge!=* & isin!=n & is_in(amenity,prison,all)=true				{set isin=j}
highway=* & rad!=ja & laufen!=ja  & tunnel!=* & bridge!=* & isin!=n & is_in(amenity,hospital,all)=true				{set isin=j}
highway=* & rad!=ja & laufen!=ja  & tunnel!=* & bridge!=* & isin!=n & is_in(healthcare,hospital,all)=true  			{set isin=j}
isin=j {set rad=nein}


# Hide removed ways
(highway=razed | highway=dismantled | destroyed:highway=*) {deletealltags}
(railway=razed | railway=dismantled | destroyed:railway=*) {delete railway}
# Hide other non-existent ways
(highway=unbuilt | highway=neverbuilt | highway=rejected | highway ~ 'x-.*') {delete highway;delete junction}
# Remove highway tag from ways which are not suitable for routing
highway=traffic_signals | highway=junction | highway=island | highway=centre_line | highway=traffic_island | highway=stopline {delete highway} 
highway=piste | highway=ski {delete highway}
highway=no | highway=none {delete highway}

# Disable dead-end-checks for unaccessible oneways
highway=* & oneway=yes & (access=private|access=no)
{add mkgmap:dead-end-check=false}
# Validation-like checks (uncomment to enable)
#highway=motorway_link & oneway!=yes & oneway!=no { echo "motorway_link lacks oneway" }
highway=motorway|highway=motorway_link { add oneway=yes; add mkgmap:numbers=false }

route~'ferry|boat'													{set donotremove=d}
waterway=dam														{set donotremove=d}
junction=roundabout													{set donotremove=d}
amenity=parking|park_ride=yes										{set donotremove=d}
leisure=track & area!=yes & sport~'mtb|bicycle|cycling'				{set donotremove=d}
(public_transport=platform | highway=platform | railway=platform)	{set donotremove=d}
aerialway=*															{set donotremove=d}
ford=* 																{set donotremove=d}

mtb:scale=* & highway!=* & donotremove!=d			{delete mtb:scale}
mtb:scale:uphill=* & highway!=* & donotremove!=d	{delete mtb:scale:uphill}
mtb:scale:imba=* & highway!=* & donotremove!=d		{delete mtb:scale:imba}
sac_scale=* & highway!=* & donotremove!=d			{delete sac_scale}
ref_icn=* & highway!=* & donotremove!=d		{delete ref_icn}
ref_ncn=* & highway!=* & donotremove!=d		{delete ref_ncn}
ref_lcn=* & highway!=* & donotremove!=d		{delete ref_lcn}
ref_rcn=* & highway!=* & donotremove!=d		{delete ref_rcn}
ref_mtb=* & highway!=* & donotremove!=d		{delete ref_mtb}
ref_iwn=* & highway!=* & donotremove!=d		{delete ref_iwn}
ref_nwn=* & highway!=* & donotremove!=d		{delete ref_nwn}
ref_lwn=* & highway!=* & donotremove!=d		{delete ref_lwn}
ref_rwn=* & highway!=* & donotremove!=d		{delete ref_rwn}
highway=motorvehicleno & cycleway=no {delete cycleway}

#Definitionen

sac_scale=* 										{set sac='${sac_scale}'}
sac_scale=hiking									{set sac=T1}
sac_scale=mountain_hiking							{set sac=T2}
sac_scale=demanding_mountain_hiking					{set sac=T3}
sac_scale=alpine_hiking								{set sac=T4}
sac_scale=demanding_alpine_hiking					{set sac=T5}
sac_scale=difficult_alpine_hiking					{set sac=T6}

(route_mtb=*|route_icn=*|route_ncn=*|route_lcn=*|route_rcn=*|bicycle~'yes|official|designated|dismount|ok|permissive')	&!(highway=*) & (railway=abandoned|railway=disused)	{set highway=cycleway}
(route_mtb=*|route_icn=*|route_ncn=*|route_lcn=*|route_rcn=*)	&!(highway=*) &! (railway=*|route=shuttle_train) 										{set highway=cycleway}
(route_iwn=*|route_nwn=*|route_lwn=*|route_rwn=*|foot~'yes|official|designated|dismount|ok|permissive') 					&!(highway=*) & (railway=abandoned|railway=disused)	{set highway=path}
(route_iwn=*|route_nwn=*|route_lwn=*|route_rwn=*) 					&!(highway=*) &! (railway=*|route=shuttle_train) 										{set highway=path}

highway=bridleway & (route_mtb=*|route_icn=*|route_ncn=*|route_lcn=*|route_rcn=*|bicycle~'yes|official|designated|dismount|ok|permissive'|route_iwn=*|route_nwn=*|route_lwn=*|route_rwn=*|foot~'yes|official|designated|dismount|ok|permissive')	{set highway=path}
highway=services	{delete highway ; set servicearea=yes}
highway=rest_area	{delete highway ; set servicearea=yes}
highway=trail {set highway=path}


highway=footway								{set highway=footpath}
highway=byway								{set highway=track; set tracktype=grade3}
highway=unsurfaced							{set highway=track}
#bicycle_road=yes							{set highway=cycleway}
cycleway=cyclestreet						{set highway=cycleway}
tunnel=1									{set tunnel=tunnel}
tunnel=true									{set tunnel=tunnel}
tunnel=yes									{set tunnel=tunnel}
mtb:scale=*									{delete access}
waterway=dam 								{delete highway}
route~'ferry|boat' 							{delete highway}
aerialway=razed								{delete aerialway}
aerialway=abandoned							{delete aerialway}
aerialway=*									{delete highway}
highway=ford								{set ford=yes}
smoothness=very_good		{set smoothness=good}
smoothness=robust_wheels	{set smoothness=bad}
construction=*	&! (highway=*)	&! (historic=*)		{set highway=construction}
proposed=*	&! (highway=*)				{set highway=proposed}
(highway=proposal | highway=planned | highway ~ '.*proposed.*')	{set highway=proposed}
highway=* &! (highway=proposed) & motorroad=yes {set highway=trunk}
abandoned=yes & highway=* &!(abandoned:highway=*)	{set highway=abandoned}
disused=yes & highway=* & railway~'abandoned|disused'		{delete disused	}
disused=yes & highway=* &!(disused:highway=*)		{set disused:highway='${highway}'}
abandoned:highway=* & (abandoned:highway='${highway}')									{set highway=abandoned}
disused:highway=*									{set highway=disused}
abandoned=yes &! (highway=*) &! (railway=*)			{set highway=abandoned; delete abandoned}
disused=yes &! (landuse=*) &! (area=yes) &! (highway=*) &! (railway=*)			{set highway=disused; delete disused}
highway=disused							{delete access; delete trail_visibility; delete smoothness; delete surface; delete mtb:scale; delete sac_scale; delete sac}
highway=abandoned						{delete access; delete trail_visibility; delete smoothness; delete surface; delete mtb:scale; delete sac_scale; delete sac}
cycleway:bicycle=designated				{set bicycle=designated}
cycleway:bicycle=yes					{set bicycle=Cyc}
cycleway:bicycle=official				{set bicycle=official}
cycleway:bicycle=permissive				{set bicycle=permissive}
cycleway:left=* & cycleway:right=* 		{set bicycle=Cyc}	
cycleway:left=* &!(cycleway:right=*)	{set bicycle=left}	
cycleway:right=* &!(cycleway:left=*)	{set bicycle=right}
cycleway:surface=paving_stones 			{set bicycle=Cyc; set surface=paving_stones}
cycleway:surface=paved		  			{set bicycle=Cyc; set surface=paving_stones}
cycleway:surface=concrete_plates		{set bicycle=Cyc; set surface=concrete_plates}
cycleway:surface=concrete				{set bicycle=Cyc; set surface=concrete}
cycleway:surface=sett					{set bicycle=Cyc; set surface=sett}
cycleway:surface=asphalt				{set bicycle=Cyc; set surface=asphalt}
cycleway:surface=cobblestone:flattened	{set bicycle=Cyc; set surface=cobblestone:flattened}
cycleway:surface=cobblestone			{set bicycle=Cyc; set surface=cobblestone}
cycleway:surface=metal					{set bicycle=Cyc; set surface=metal}
cycleway:smoothness=good				{set bicycle=Cyc; set smoothness=good}
cycleway:smoothness=very_good			{set bicycle=Cyc; set smoothness=very_good}
cycleway:smoothness=excellent			{set bicycle=Cyc; set smoothness=excellent}
cycleway:smoothness=good		&!(surface=*)		{set surface=paved}
cycleway:smoothness=very_good	&!(surface=*)		{set surface=paved}
cycleway:smoothness=excellent	&!(surface=*)		{set surface=paved}
cycleway=*	& !(bicycle=*) &!(cycleway~'no|separate')				{set bicycle=Cyc}
ford=no {delete ford}
tunnel=no {delete ford}
bridge=no {delete bridge}
embankment=no {delete embankment}
oneway=no {delete oneway}
cutting=no {delete cutting}

#zeichen239
traffic_sign=DE:239 & higway!=footway & highway!=footpath {set highway=footpath}


#tracktype korrigieren
tracktype=1 {set tracktype=grade1}
tracktype=2 {set tracktype=grade2}
tracktype=3 {set tracktype=grade3}
tracktype=4 {set tracktype=grade4}
tracktype=5 {set tracktype=grade5}
tracktype=6 {set tracktype=grade6}
highway=path 			& bicycle=designated & (tracktype=grade1) {set highway=cycleway;delete tracktype}
highway=path 			& (tracktype ~ 'grade[1-6]') {set highway=track}
highway=footpath 		& (tracktype ~ 'grade[1-6]') {set highway=track}
highway=primary 		& (tracktype ~ 'grade[1-6]') {delete tracktype}
highway=secondary 		& (tracktype ~ 'grade[1-6]') {delete tracktype}
highway=tertiary 		& (tracktype ~ 'grade[1-6]') {delete tracktype}
highway=service		 	& (tracktype ~ 'grade[2-6]') {delete tracktype}
highway=cycleway	 	& (tracktype ~ 'grade[1-6]') {delete tracktype}
highway=residential 	& (tracktype ~ 'grade[1-6]') {delete tracktype}
highway=unclassified 	& (tracktype ~ 'grade[1-6]') {delete tracktype}
highway=minor			& (tracktype ~ 'grade[1-6]') {delete tracktype}
highway=road			& (tracktype ~ 'grade[1-6]') {delete tracktype}
highway=living_street 	& (tracktype ~ 'grade[1-6]') {delete tracktype}
highway=pedestrian	 	& (tracktype ~ 'grade[2-6]') {delete tracktype}

  
#set paved_way=yes set only_track only_path pav_path

surface ~ 'concrete:plates|concrete|sett|paved|asphalt|paving_stones|cobblestone:flattened|cobblestone|metal|concrete:lanes|set|chipseal|unhewn_cobblestone|wood' {set paved_way=yes}

highway=path & !(paved_way=yes)  							{set highway=only_path}
highway=footpath & !(paved_way=yes)							{set highway=only_footpath}
highway=track & !(tracktype ~ 'grade[1-6]')					{set highway=only_track}
highway=path & paved_way=yes  								{set highway=pav_path}
highway=footpath & paved_way=yes  							{set highway=pav_footpath}
highway=only_track & paved_way=yes							{set highway=pav_track}
(tracktype ~ 'grade[2-6]') {delete paved_way}

#set cycleway
traffic_sign~'.*1022-10' &! (bicycle~'yes|designated|official')	{set bicycle=yes}
bicycle=Cyc					{set bicycle=designated}
highway=only_path   	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=designated						{set highway=cycleway;delete tracktype;delete paved_way}
highway=only_path     	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=official		& cycroute=yes		{set highway=badcycleway;delete tracktype;delete paved_way}
highway=only_path 	 	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=yes			& cycroute=yes		{set highway=badcycleway;delete tracktype;delete paved_way}
highway=only_footpath 	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=designated						{set highway=cycleway;delete tracktype;delete paved_way;set oldfoot=yes}
highway=only_footpath 	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=official							{set highway=badcycleway;delete tracktype;delete paved_way;set oldfoot=yes}
highway=only_footpath	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=yes								{set highway=badcycleway;delete tracktype;delete paved_way;set oldfoot=yes}
highway=only_track		& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=designated 						{set highway=cycleway;delete tracktype;delete paved_way}
highway=only_track		& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=official		& cycroute=yes		{set highway=badcycleway;delete tracktype;delete paved_way}
highway=only_track		& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=yes 			& cycroute=yes		{set highway=badcycleway;delete tracktype;delete paved_way}

tracktype=grade3	   	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=designated					& abandoned:railway=rail	{set highway=badcycleway;delete tracktype;delete paved_way}
tracktype=grade3     	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=official		& cycroute=yes	& abandoned:railway=rail	{set highway=badcycleway;delete tracktype;delete paved_way}
tracktype=grade3 	 	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=yes			& cycroute=yes	& abandoned:railway=rail	{set highway=badcycleway;delete tracktype;delete paved_way}

tracktype=grade2	   	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=designated						{set highway=badcycleway;delete tracktype;delete paved_way}
tracktype=grade2     	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=official		& cycroute=yes		{set highway=badcycleway;delete tracktype;delete paved_way}
tracktype=grade2 	 	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=yes			& cycroute=yes		{set highway=badcycleway;delete tracktype;delete paved_way}

tracktype=grade1	   	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=designated	& cycroute=yes		{set highway=cycleway;delete tracktype;delete paved_way}
tracktype=grade1     	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=official		& cycroute=yes		{set highway=cycleway;delete tracktype;delete paved_way}
tracktype=grade1 	 	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=yes			& cycroute=yes		{set highway=cycleway;delete tracktype;delete paved_way}

highway=service		   	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=designated						{set highway=cycleway;delete tracktype;delete paved_way}
highway=service     	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=official		& cycroute=yes		{set highway=cycleway;delete tracktype;delete paved_way}
highway=service 	 	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=yes			& cycroute=yes		{set highway=cycleway;delete tracktype;delete paved_way}

highway=pav_path   		& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=designated 						{set highway=cycleway;delete tracktype;delete paved_way}
highway=pav_path     	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=official 	& cycroute=yes		{set highway=cycleway;delete tracktype;delete paved_way}
highway=pav_path 	 	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=yes 								{set highway=cycleway;delete tracktype;delete paved_way}
highway=pav_footpath 	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=designated 						{set highway=cycleway;delete tracktype;delete paved_way;set oldfoot=yes}
highway=pav_footpath 	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=official 						{set highway=cycleway;delete tracktype;delete paved_way;set oldfoot=yes}
highway=pav_footpath	& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=yes 								{set highway=cycleway;delete tracktype;delete paved_way;set oldfoot=yes}
highway=pav_track		& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=designated 						{set highway=cycleway;delete tracktype;delete paved_way}
highway=pav_track		& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=official 	& cycroute=yes		{set highway=cycleway;delete tracktype;delete paved_way}
highway=pav_track		& mtb:scale!=* & mtb:scale:uphill!=* & bicycle=yes 	 							{set highway=cycleway;delete tracktype;delete paved_way}

traffic_sign=DE:240 &! (mkgmap:unpaved=yes) &	(highway~'(only_track|only_path|only_footpath|pav_path|pav_footpath|pav_track|service)') 	{set highway=cycleway;delete tracktype;delete paved_way}
traffic_sign=DE:241 &! (mkgmap:unpaved=yes) &	(highway~'(only_track|only_path|only_footpath|pav_path|pav_footpath|pav_track|service)')	{set highway=cycleway;delete tracktype;delete paved_way}
traffic_sign=DE:237 &! (mkgmap:unpaved=yes) &	(highway~'(only_track|only_path|only_footpath|pav_path|pav_footpath|pav_track|service)')	{set highway=cycleway;delete tracktype;delete paved_way}

traffic_sign=DE:240 & (mkgmap:unpaved=yes) &	(highway~'(only_track|only_path|only_footpath|pav_path|pav_footpath|pav_track|service)') 	{set highway=badcycleway;delete tracktype}
traffic_sign=DE:241 & (mkgmap:unpaved=yes) &	(highway~'(only_track|only_path|only_footpath|pav_path|pav_footpath|pav_track|service)')	{set highway=badcycleway;delete tracktype}
traffic_sign=DE:237 & (mkgmap:unpaved=yes) &	(highway~'(only_track|only_path|only_footpath|pav_path|pav_footpath|pav_track|service)')	{set highway=badcycleway;delete tracktype}



#set tracktype and surface
surface ~ 'gravel|dirt|earth|grass|grass_paver|gravel_turf|ground|mud|sand' {set surf_name=yes}
highway=only_track & surface=compacted			{set highway=trksurf2}
highway=only_track & surface=grass				{set highway=trksurf4}
highway=only_track & surface=grass_paver		{set highway=trksurf2}
highway=only_track & surface=gravel				{set highway=trksurf3}
highway=only_track & surface=fine_gravel		{set highway=trksurf2}
highway=only_track & surface=grit				{set highway=trksurf4}
highway=only_track & surface=ground				{set highway=trksurf4}
highway=only_track & surface=mud				{set highway=trksurf5}
highway=only_track & surface=pebblestone		{set highway=trksurf2}
highway=only_track & surface=sand				{set highway=trksurf5}
highway=only_track & surface=shell				{set highway=trksurf5}
highway=only_track & surface=shells				{set highway=trksurf5}
highway=only_track & surface=ash				{set highway=trksurf5}
highway=only_track & surface=bad				{set highway=trksurf4}
highway=only_track & surface=clay				{set highway=trksurf5}
highway=only_track & surface=cob				{set highway=trksurf2}
highway=only_track & surface=compact			{set highway=trksurf2}
highway=only_track & surface=dirt				{set highway=trksurf4}
highway=only_track & surface=earth				{set highway=trksurf5}
highway=only_track & surface=gravel_turf		{set highway=trksurf3}
highway=only_track & surface=erde				{set highway=trksurf5}
highway=only_track & surface=gr					{set highway=trksurf3}
highway=only_track & surface=peb				{set highway=trksurf2}
highway=only_track & surface=shotter			{set highway=trksurf3}
highway=only_track & surface=rock				{set highway=trksurf5}
highway=only_track & surface=turf				{set highway=trksurf5}
highway~'only_track|only_path' & smoothness=excellent		{set highway=trksurf1}
highway~'only_track|only_path' & smoothness=good			{set highway=trksurf1}
highway~'only_track' & smoothness=intermediate	{set highway=trksurf2}
highway~'only_track' & smoothness=bad				{set highway=trksurf3}
highway~'only_track' & smoothness=very_bad		{set highway=trksurf4}
tracktype=grade1							{set highway=trksurf1}
tracktype=grade2							{set highway=trksurf2}
tracktype=grade3							{set highway=trksurf3}
tracktype=grade4							{set highway=trksurf4}
tracktype=grade5							{set highway=trksurf5}

# unbefestigt 
(bridge=* & bridge !=no | tunnel=* & tunnel !=no | waterway=dam) {set allwayspaved=yes}

highway=only_path  			&! (allwayspaved=yes)	{ add mkgmap:unpaved=yes; set unbroute=yes }
highway=only_track 			&! (allwayspaved=yes)	{ add mkgmap:unpaved=yes; set unbroute=yes }
highway=only_footpath 		&! (allwayspaved=yes)	{ add mkgmap:unpaved=yes; set unbroute=yes }
highway=bridleway 			&! (allwayspaved=yes)	{ add mkgmap:unpaved=yes; set unbroute=yes }
highway=badcycleway			&! (allwayspaved=yes)	{ add mkgmap:unpaved=yes; set unbroute=yes }
highway=steps				&! (allwayspaved=yes)	{ add mkgmap:unpaved=yes; set unbroute=yes }
highway=tobadforbike	&! (allwayspaved=yes)	{ add mkgmap:unpaved=yes; set unbroute=yes }
(smoothness ~ '.*(very_horrible|very_bad|horrible|impassable)' )	&! (allwayspaved=yes)	{set smoroute=yes}

highway=* & (surface ~'compacted|grass|grass_paver|gravel|fine_gravel|grit|ground|mud|pebblestone|sand|shell|shells|ash|bad|clay|cob|compact|dirt|earth|gravel_turf|erde|gr|loam|peb|shotter|rock|turf|unpaved' |mtb:scale=*|mtb:scale:uphill=*|mtb:scale:imba=*  |tracktype ~ 'grade[2-6]' | smoroute=yes | sport=via_ferrata)  &! (allwayspaved=yes)	{ add mkgmap:unpaved=yes; set unbroute=yes }

unbroute=yes {set unb_str=yes}
smoothness=* &!(smoothness ~ '(excellent|good|intermediate)') 	{set unb_str=yes}

highway=cycleway & unb_str=yes {delete unb_str ; set highway=badcycleway}


tracktype=grade1 		 	&	smoothness ~ '(intermediate|bad|very_horrible|very_bad|horrible|impassable)' &! (allwayspaved=yes)	{ add mkgmap:unpaved=yes; set unbroute=yes }
highway=pav_track			&	smoothness ~ '(intermediate|bad|very_horrible|very_bad|horrible|impassable)' &! (allwayspaved=yes)	{ add mkgmap:unpaved=yes; set unbroute=yes }
highway=pav_path		 	&	smoothness ~ '(intermediate|bad|very_horrible|very_bad|horrible|impassable)' &! (allwayspaved=yes)	{ add mkgmap:unpaved=yes; set unbroute=yes }
highway=pav_footpath	 	&	smoothness ~ '(intermediate|bad|very_horrible|very_bad|horrible|impassable)' &! (allwayspaved=yes)	{ add mkgmap:unpaved=yes; set unbroute=yes }

highway ~ 'pav_footpath|pedestrian' &! (cycroute=yes | rad=ja | smoothness ~'excellent|good')	&! (allwayspaved=yes)	{add mkgmap:unpaved=yes}

tracktype=grade1 & unbroute=yes &! (paved_way=yes)		{set highway=trksurf2;set tracktype=grade2}
tracktype=grade2 & paved_way=yes						{set highway=trksurf1;set tracktype=grade1}

#unnuetze info
unbroute=yes & surface=unpaved {delete surface}
highway~"primary|secondary|residential|unclassified|minor|road|cycleway|trksurf1|motorway|trunk|pav_path|pav_footpath|pav_track|living_street|road|"  & surface=paved {delete surface}

#pruefen ob rad erlaubt bei Wegen wo eigentlich Rad verboten
(highway ~'trunk|motorway|trunk_link|motorway_link|pav_footpath|only_footpath|pedestrian|briddleway') &	bicycle~'yes|official|designated|dismount|ok|permissive'	{set radOK=ok}
(highway ~'trunk|motorway|trunk_link|motorway_link|pav_footpath|only_footpath|pedestrian|briddleway') &	cycleway=* &! (cycleway~'no|separate')					{set radOK=ok}
(highway ~'trunk|motorway|trunk_link|motorway_link|pav_footpath|only_footpath|pedestrian|briddleway') &	cycleway:left=* &!(cycleway:right=*)		{set radOK=ok}
(highway ~'trunk|motorway|trunk_link|motorway_link|pav_footpath|only_footpath|pedestrian|briddleway') &	cycleway:right=* &!(cycleway:left=*)		{set radOK=ok}

highway=trksurf2 & length()< 100 {delete mkgmap:unpaved}
highway=trksurf3 & length()< 50 {delete mkgmap:unpaved}
highway=trksurf1 & length()< 500 {delete mkgmap:unpaved}
highway=pav_track & length()< 100 {delete mkgmap:unpaved}
highway=pav_path & length()< 100 {delete mkgmap:unpaved}
highway=badcycleway & length()< 200 {delete mkgmap:unpaved}
highway=only_track & length()< 50 {delete mkgmap:unpaved}
highway=* & highway!=steps & length()<20 {delete mkgmap:unpaved}

#tobadforbike
trail_visibility ~ '.*(bad|horrible|no|poor|low)' &!  (mtb:scale~'[0-2]'|mtb:scale:uphill~'[0-3]'|route_mtb=*|route_icn=*|route_ncn=*|route_lcn=*|route_rcn=*|bicycle~'yes|official|designated|dismount|ok|permissive')	{set highway=tobadforbike;delete tracktype}
smoothness ~ '.*(very_horrible|horrible|impassable)' &! 	(mtb:scale~'0-2'|mtb:scale:uphill~'0-2'|route_mtb=*|route_icn=*|route_ncn=*|route_lcn=*|route_rcn=*|bicycle~'yes|official|designated|dismount|ok|permissive')	{set highway=tobadforbike;delete tracktype}
(incline>30|mtb:scale~'4-6') &!  	(mtb:scale~'0-2'|mtb:scale:uphill~'0-2'|route_mtb=*|route_icn=*|route_ncn=*|route_lcn=*|route_rcn=*|bicycle~'yes|official|designated|dismount|ok|permissive')	{set highway=tobadforbike;delete tracktype}
highway ~ 'only_path|only_footpath' & smoothness ~ '.*(very_bad|very_horrible|horrible|impassable)' &! 	(mtb:scale~'0-2'|mtb:scale:uphill~'0-3'|route_mtb=*|route_icn=*|route_ncn=*|route_lcn=*|route_rcn=*|bicycle~'yes|official|designated|dismount|ok|permissive')	{set highway=tobadforbike;delete tracktype}
(ladder=*|safety_rope=*|rungs=*|assisted_trail=*)		{set highway=tobadforbike;delete tracktype}
highway=tobadforbike &! (ladder=*|safety_rope=*|rungs=*|assisted_trail=*)	{set LangBez='bad:${LangBez}';set KurzBez='bad:${KurzBez}'}


(path=desire | informal~'yes|path|probably|true') {set highway=buildbyuse;delete tracktype}

#breite Pfade
highway=only_path & width >2.1	{set highway=only_track}

#service umbewerten
highway=service & unbroute=yes {set highway=trksurf2}
highway=service & length()>100 {set highway=residential}

#isin
isin=j	{set highway=tobadforbike}

# dünner zeichnen is_in
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(landuse,residential,all)=true		{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(landuse,industrial,all)=true		{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(landuse,commercial,all)=true		{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(landuse,landfill,all)=true			{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(landuse,cemetery,all)=true			{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(landuse,quarry,all)=true			{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(landuse,allotments,all)=true		{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(amenity,grave_yard,all)=true		{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(amenity,kindergarten,all)=true		{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(amenity,college,all)=true			{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(amenity,school,all)=true			{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(amenity,university,all)=true		{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(amenity,prison,all)=true			{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(amenity,hospital,all)=true			{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(healthcare,hospital,all)=true		{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(place,hamlet,all)=true				{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(place,village,all)=true				{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1' & is_in(place,suburb,all)=true				{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(place,town,all)=true				{set duenner=ja}
highway~'unclassified|minor|residential|living_street|service|trksurf1'	& is_in(place,city,all)=true				{set duenner=ja}

#badstreet
unbroute=yes & (highway~'primary|secondary|tertiary|unclassified|minor|road|residential|living_street|service')  &!(area=yes) { set highway=badstreet}
unbroute=yes & motor_vehicle=yes &! (bicycle_road=yes) { set highway=badstreet}
4wd_only=yes { set highway=badstreet}

#include names
include 'inc/line_name';




#Unbenutzt
highway~'abandoned|disused'	{ set mkgmap:label:1='${KurzBez}'}	[0x12006 resolution 24 continue]
highway=abandoned			{ set mkgmap:label:1='${LangBez}'}	[0x12017 resolution 24]
highway=disused				{ set mkgmap:label:1='${LangBez}'}	[0x12016 resolution 24]

#verboten
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=verboten	& KurzBez=*	{ set mkgmap:label:1='${KurzBez}'}	[0x12006 resolution 24 continue]
highway=verboten { set mkgmap:label:1='${LangBez}'} [0x12008 resolution 24 continue]
highway=verboten { set mkgmap:label:1='${LangBez}'} [0x12009 resolution 23-22 continue]
radanzeige=* & highway=*	&! (highway ~ 'motorway|motorway_link|trunk|trunk_link|verboten|steps|cycleway|badcycleway|only_footpath|pav_footpath')	{ set mkgmap:label:1='${LangBez}'}	 [0x03 road_speed=0 road_class=0 resolution 24 continue]

#Rad/Wanderrouten
route_iwn=* & highway=*		{ name'iwn:${route_iwn}'}	[0x12a0e resolution 24-23 continue]
route_nwn=* & highway=*		{ name'nwn:${route_nwn}'}	[0x12a0f resolution 24-23 continue]
route_rwn=* & highway=*		{ name'rwn:${route_rwn}'}	[0x12a10 resolution 24-23 continue]
route_lwn=* & highway=*		{ name'lwn:${route_lwn}'}	[0x12a11 resolution 24-23 continue]

route_iwn=* & highway=*		{ name'iwn:${route_iwn}'}	[0x12a12 resolution 22-19 continue]
route_nwn=* & highway=*		{ name'nwn:${route_nwn}'}	[0x12a13 resolution 22-20 continue]
route_rwn=* & highway=*		{ name'rwn:${route_rwn}'}	[0x12a14 resolution 22-21 continue]
route_lwn=* & highway=*		{ name'lwn:${route_lwn}'}	[0x12a15 resolution 22-22 continue]


route_icn=* & highway=* &! (unbroute=yes)	{ name'icn:${route_icn}'}	[0x12a01 resolution 24-23 continue]
route_ncn=* & highway=* &! (unbroute=yes)	{ name'ncn:${route_ncn}'}	[0x12a02 resolution 24-23 continue]
route_rcn=* & highway=* &! (unbroute=yes)	{ name'rcn:${route_rcn}'}	[0x12a03 resolution 24-23 continue]
route_lcn=* & highway=* &! (unbroute=yes)	{ name'lcn:${route_lcn}'}	[0x12a04 resolution 24-23 continue]

route_icn=* & highway=* &! (unbroute=yes)	{ name'icn:${route_icn}'}	[0x12a09 resolution 22-19 continue]
route_ncn=* & highway=* &! (unbroute=yes)	{ name'ncn:${route_ncn}'}	[0x12a0a resolution 22-20 continue]
route_rcn=* & highway=* &! (unbroute=yes)	{ name'rcn:${route_rcn}'}	[0x12a0b resolution 22-20 continue]
route_lcn=* & highway=* &! (unbroute=yes)	{ name'lcn:${route_lcn}'}	[0x12a0c resolution 22-21 continue]

route_icn=* & highway=* & (unbroute=yes)	{ name'icn:${route_icn}'}	[0x12a05 resolution 24-23 continue]
route_ncn=* & highway=* & (unbroute=yes)	{ name'ncn:${route_ncn}'}	[0x12a06 resolution 24-23 continue]
route_rcn=* & highway=* & (unbroute=yes)	{ name'rcn:${route_rcn}'}	[0x12a07 resolution 24-23 continue]
route_lcn=* & highway=* & (unbroute=yes)	{ name'lcn:${route_lcn}'}	[0x12a08 resolution 24-23 continue]

route_icn=* & highway=* & (unbroute=yes)	{ name'icn:${route_icn}'}	[0x12a09 resolution 22-19 continue]
route_ncn=* & highway=* & (unbroute=yes)	{ name'ncn:${route_ncn}'}	[0x12a0a resolution 22-20 continue]
route_rcn=* & highway=* & (unbroute=yes)	{ name'rcn:${route_rcn}'}	[0x12a0b resolution 22-20 continue]
route_lcn=* & highway=* & (unbroute=yes)	{ name'lcn:${route_lcn}'}	[0x12a0c resolution 22-21 continue]

route_mtb=* & highway=*     { name'mtb:${route_mtb}'}	[0x12a0d resolution 24-22 continue]
route_mtb=* & highway=*     { name'mtb:${route_mtb}'}	[0x12a0d resolution 21-20 continue]

#area
highway=* & area=* & area!=no {set highway=hwarea}

highway=hwarea	{ set mkgmap:label:1='${LangBez}'}	[0x10e00 resolution 22 continue]

#Autobahn
highway=motorway & tunnel=* & tunnel !=no				{ set mkgmap:label:1='${LangBez}'}	[0x12a19 resolution 18 continue]
highway=motorway &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${LangBez}'}	[0x10100 resolution 24 continue]
highway=motorway &!(tunnel=* & tunnel !=no) 			{ set mkgmap:label:1='${KurzBez}'}	[0x10101 resolution 23-20 continue]
highway=motorway &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10102 resolution 19-18 continue]
highway=motorway_link & tunnel=* & tunnel !=no		{ set mkgmap:label:1='${KurzBez}'}	[0x12a19 resolution 22 continue]
highway=motorway_link &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${LangBez}'}	[0x10e16 resolution 24 continue]
highway=motorway_link &!(tunnel=* & tunnel !=no) 		{ set mkgmap:label:1='${KurzBez}'}	[0x10e17 resolution 23-22 continue]

#Kraftfahrstrasse
highway=trunk & tunnel=* & tunnel !=no				{ set mkgmap:label:1='${LangBez}'}	[0x12a19 resolution 18 continue]
highway=trunk &!(tunnel=* & tunnel !=no)				{ set mkgmap:label:1='${LangBez}'} [0x10103 resolution 24 continue]
highway=trunk &!(tunnel=* & tunnel !=no)				{ set mkgmap:label:1='${KurzBez}'}	[0x10104 resolution 23-21 continue]
highway=trunk &!(tunnel=* & tunnel !=no)				{ set mkgmap:label:1='${KurzBez}'}	[0x10105 resolution 20-18 continue]
highway=trunk_link & tunnel=* & tunnel !=no			{ set mkgmap:label:1='${KurzBez}'}	[0x12a19 resolution 22 continue]
highway=trunk_link &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${LangBez}'}	[0x10e18 resolution 24 continue]
highway=trunk_link &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10e19 resolution 23-22 continue]

#Bundesstrasse
highway=primary  & tunnel=* & tunnel !=no				{ set mkgmap:label:1='${LangBez}'}	[0x12a1a resolution 19 continue]
highway=primary	 &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${LangBez}'}	[0x10106 resolution 24 continue ]
highway=primary  &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10107 resolution 23-22 continue]
highway=primary  &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10108 resolution 21-21 continue]
highway=primary  &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10109 resolution 20-19 continue]
highway=primary_link & tunnel=* & tunnel !=no			{ set mkgmap:label:1='${KurzBez}'}	[0x12a1a resolution 22 continue]
highway=primary_link &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${LangBez}'}	[0x10106 resolution 24 continue]
highway=primary_link  &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x10107 resolution 23-23 continue]
highway=primary_link  &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x10108 resolution 22-22 continue]

#Landstrasse
highway=secondary & tunnel=* & tunnel !=no			{ set mkgmap:label:1='${LangBez}'}	[0x12a1b resolution 19 continue]
LangBez=* & highway=secondary &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${LangBez}'}	[0x10600 resolution 24 continue]
highway=secondary &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10601 resolution 23-22 continue]
highway=secondary &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10602 resolution 21-21 continue]
highway=secondary &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10603 resolution 20-20 continue]
highway=secondary_link & tunnel=* & tunnel !=no		{ set mkgmap:label:1='${KurzBez}'}	[0x12a1b resolution 20 continue]
highway=secondary_link &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${LangBez}'}	[0x10600 resolution 24 continue]
highway=secondary_link &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x10601 resolution 23-23 continue]
highway=secondary_link &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x10602 resolution 22-22 continue]

#Kreisstrasse
highway=tertiary & tunnel=* & tunnel !=no				{ set mkgmap:label:1='${LangBez}'}	[0x12a1b resolution 20 continue]
LangBez=* & highway=tertiary &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${LangBez}'}	[0x10604 resolution 24 continue]
highway=tertiary &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10605 resolution 23-22 continue]
highway=tertiary &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10606 resolution 21-21 continue]
highway=tertiary &!(tunnel=* & tunnel !=no) & length()> 100			{ set mkgmap:label:1='${KurzBez}'}	[0x10607 resolution 20-20 continue]
highway=tertiary_link & tunnel=* & tunnel !=no		{ set mkgmap:label:1='${KurzBez}'}	[0x12a1b resolution 22 continue]
highway=tertiary_link &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${LangBez}'}	[0x10604 resolution 24 continue]
highway=tertiary_link &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x10605 resolution 23-23 continue]
highway=tertiary_link &!(tunnel=* & tunnel !=no) & length()> 100		{ set mkgmap:label:1='${KurzBez}'}	[0x10606 resolution 22-22 continue]

#Strasse
highway~'unclassified|minor|road' & tunnel=* & tunnel !=no			{ set mkgmap:label:1='${LangBez}'}	[0x12a1b resolution 20 continue]
highway=road &!(tunnel=* & tunnel !=no)				{ set mkgmap:label:1='${KurzBez}'}	[0x1011f resolution 23 continue]
LangBez=* & highway~'unclassified|minor'	&!(duenner=ja) &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${LangBez}'}	[0x10608 resolution 24 continue]
highway~'unclassified|minor'	&!(duenner=ja) &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${KurzBez}'}	[0x10609 resolution 23-22 continue]
highway~'unclassified|minor'	&!(duenner=ja) &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${KurzBez}'}	[0x1060a resolution 21-21 continue]
highway~'unclassified|minor'	&!(duenner=ja) &!(tunnel=* & tunnel !=no) & length()> 100	{ set mkgmap:label:1='${KurzBez}'}	[0x1060b resolution 20-20 continue]
LangBez=* & highway~'unclassified|minor'	&(duenner=ja) &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${LangBez}'}	[0x10608 resolution 24 continue]
highway~'unclassified|minor'	&(duenner=ja) &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${KurzBez}'}	[0x10609 resolution 23-23 continue]
highway~'unclassified|minor'	&(duenner=ja) &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${KurzBez}'}	[0x1060a resolution 22-21 continue]
highway~'unclassified|minor'	&(duenner=ja) &!(tunnel=* & tunnel !=no) & length()> 100	{ set mkgmap:label:1='${KurzBez}'}	[0x1060b resolution 20-20 continue]

#Straße für Radler
highway=motorvehicleno & tunnel=* & tunnel !=no				{ set mkgmap:label:1='${LangBez}'}	[0x12a1b resolution 20 continue]
LangBez=* & highway=motorvehicleno &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${LangBez}'}	[0x1060c resolution 24 continue]
highway=motorvehicleno &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x1060d resolution 23-22 continue]
highway=motorvehicleno &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x1060e resolution 21-21 continue]
highway=motorvehicleno &!(tunnel=* & tunnel !=no) & length()> 100			{ set mkgmap:label:1='${KurzBez}'}	[0x10607 resolution 20-20 continue]

#badstreet
highway=badstreet & tunnel=* & tunnel !=no				{ set mkgmap:label:1='${LangBez}'}	[0x12a1b resolution 20 continue]
highway=badstreet &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${LangBez}'}	[0x10f07 resolution 24 continue]
highway=badstreet &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10f08 resolution 23-23 continue]
highway=badstreet &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10f09 resolution 22-21 continue]
highway=badstreet &!(tunnel=* & tunnel !=no) & length()> 10000			{ set mkgmap:label:1='${KurzBez}'}	[0x10f09 resolution 20-20 continue]

#Spielstraße
highway~'living_street|residential' & tunnel=* & tunnel !=no			{ set mkgmap:label:1='${LangBez}'}	[0x12a1d resolution 21 continue]
highway=living_street &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${LangBez}'}	[0x10116 resolution 24 continue]
highway=living_street &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x10117 resolution 23-23 continue]
highway=living_street &!(tunnel=* & tunnel !=no) & length()> 10000 		{ set mkgmap:label:1='${KurzBez}'}	[0x10118 resolution 22-22 continue]

#Wohnstrasse

highway~'living_street|residential' & tunnel=* & tunnel !=no			{ set mkgmap:label:1='${LangBez}'}	[0x12a1d resolution 21 continue]
highway=living_street &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${LangBez}'}	[0x10116 resolution 24 continue]
highway=living_street &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x10117 resolution 23-23 continue]
highway=living_street &!(tunnel=* & tunnel !=no) & length()> 10000 		{ set mkgmap:label:1='${KurzBez}'}	[0x10118 resolution 22-21 continue]

highway=residential & tunnel=* & tunnel !=no			{ set mkgmap:label:1='${LangBez}'}	[0x12a1d resolution 21 continue]
LangBez=* & highway=residential	&!(duenner=ja) &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${LangBez}'}	[0x10e08 resolution 24 continue]
highway=residential	&!(duenner=ja) &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x10e09 resolution 23-23 continue]
highway=residential	&!(duenner=ja) &!(tunnel=* & tunnel !=no) 	{ set mkgmap:label:1='${KurzBez}'}	[0x10e0a resolution 22-22 continue]
highway=residential	&!(duenner=ja) &!(tunnel=* & tunnel !=no) & length()> 10000{ set mkgmap:label:1='${KurzBez}'}	[0x10e0b resolution 21-20 continue]
LangBez=* & highway=residential	&(duenner=ja)	 &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${LangBez}'}	[0x10e08 resolution 24 continue]
highway=residential	&(duenner=ja)	 &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x10e0a resolution 23-23 continue]
highway=residential	&(duenner=ja)	 &!(tunnel=* & tunnel !=no) & length()> 10000		{ set mkgmap:label:1='${KurzBez}'}	[0x10e0b resolution 22-22 continue]
highway=residential	&(duenner=ja) &!(tunnel=* & tunnel !=no) & length()> 10000		{ set mkgmap:label:1='${KurzBez}'}	[0x10e0b resolution 21-21 continue]

#service
highway=service & tunnel=* & tunnel !=no			{ set mkgmap:label:1='${LangBez}'}	[0x12a1d resolution 21 continue]
highway=service &!(duenner=ja) &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${LangBez}'}	[0x10119 resolution 24 continue]
highway=service &!(duenner=ja) &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x1011a resolution 23-23 continue]
highway=service &!(duenner=ja) &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x1011b resolution 22-22 continue]
highway=service &!(duenner=ja) &!(tunnel=* & tunnel !=no) & length()> 10000			{ set mkgmap:label:1='${KurzBez}'}	[0x1011b resolution 21-21 continue]
highway=service &(duenner=ja)	 &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${LangBez}'}	[0x10119 resolution 24 continue]
highway=service &(duenner=ja)	&!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x1011a resolution 23-23 continue]
highway=service &(duenner=ja)	 &!(tunnel=* & tunnel !=no) & length()> 10000			{ set mkgmap:label:1='${KurzBez}'}	[0x1011b resolution 22-22 continue]

#Radweg
highway=cycleway & tunnel=* & tunnel !=no			{ set mkgmap:label:1='${LangBez}'}	[0x12a1c resolution 20 continue]
LangBez=* & highway=cycleway  &!(tunnel=* & tunnel !=no) &	(surface~'asphalt|paving_stones|concrete|paved|concrete:lanes|concrete:plates|sett')	{ set mkgmap:label:1='${LangBez}'}	[0x1011c resolution 24 continue]
highway=cycleway  &!(tunnel=* & tunnel !=no|surface~'asphalt|pving_stones|concrete|paved|concrete:lanes|concrete:plates|sett')		{ set mkgmap:label:1='${LangBez}'}	[0x10e02 resolution 24 continue]
highway=cycleway 	 &!(tunnel=* & tunnel !=no)						{ set mkgmap:label:1='${KurzBez}'}	[0x1011d resolution 23-22 continue]
highway=cycleway	& cycroute=yes	 &!(tunnel=* & tunnel !=no) & length()> 100		{ set mkgmap:label:1='${KurzBez}'}	[0x1011e resolution 21-20 continue]
highway=cycleway	&! (cycroute=yes) &!(tunnel=* & tunnel !=no) & length()> 100		{ set mkgmap:label:1='${KurzBez}'}	[0x1011e resolution 21-21 continue]

#schlechter Radweg
highway=badcycleway & tunnel=* & tunnel !=no			{ set mkgmap:label:1='${LangBez}'}	[0x12a1c resolution 21 continue]
LangBez=* & highway=badcycleway  &!(tunnel=* & tunnel !=no)								{ set mkgmap:label:1='${LangBez}'}	[0x10f10 resolution 24 continue]
highway=badcycleway  &!(tunnel=* & tunnel !=no)								{ set mkgmap:label:1='${KurzBez}'}	[0x10f11 resolution 23-22 continue]
highway=badcycleway	& cycroute=yes &!(tunnel=* & tunnel !=no)	 & length()> 100				{ set mkgmap:label:1='${KurzBez}'}	[0x10f12 resolution 21-20 continue]
highway=badcycleway	&! (cycroute=yes)	 &!(tunnel=* & tunnel !=no) & length()> 100			{ set mkgmap:label:1='${KurzBez}'}	[0x10f12 resolution 21-21 continue]

#Path Track asphaltiert
highway=pav_path  & tunnel=* & tunnel !=no				{ set mkgmap:label:1='${KurzBez}'}	[0x12a1e resolution 22 continue]
highway=pav_path  &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${LangBez}'}	[0x10e0f resolution 24 continue]
highway=pav_path  &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10e10 resolution 23-23 continue]
highway=pav_path  &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10e11 resolution 22-22 continue]
highway=pav_path  &!(tunnel=* & tunnel !=no) & length()> 10000			{ set mkgmap:label:1='${KurzBez}'}	[0x10e0c resolution 21-21 continue]
highway=pav_footpath  & tunnel=* & tunnel !=no			{ set mkgmap:label:1='${KurzBez}'}	[0x12a1f resolution 22 continue]
highway=pav_footpath  &!(tunnel=* & tunnel !=no) 		{ set mkgmap:label:1='${LangBez}'}	[0x12013 resolution 24 continue]
highway=pav_footpath  &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x12014 resolution 23-23 continue]
highway=pav_footpath  &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x12015 resolution 22-22 continue]
highway=pav_footpath  &!(tunnel=* & tunnel !=no) & length()> 10000		{ set mkgmap:label:1='${KurzBez}'}	[0x10e0c resolution 21-21 continue]
highway=pav_track & tunnel=* & tunnel !=no			{ set mkgmap:label:1='${KurzBez}'}	[0x12a1e resolution 22 continue]
highway=pav_track &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${LangBez}'}	[0x10e0f resolution 24 continue]
highway=pav_track &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10e10 resolution 23-23 continue]
highway=pav_track &!(tunnel=* & tunnel !=no)			{ set mkgmap:label:1='${KurzBez}'}	[0x10e11 resolution 22-22 continue]
highway=pav_track &!(tunnel=* & tunnel !=no) & length()> 10000		{ set mkgmap:label:1='${KurzBez}'}	[0x10e0c resolution 21-21 continue]

#Bahnsteig
(public_transport=platform | highway=platform | railway=platform)	{ set mkgmap:label:1='${KurzBez}'}	[0x12007 resolution 24 continue]

#Fussgaengerzone
highway=pedestrian 	& tunnel=* & tunnel !=no	{ set mkgmap:label:1='${KurzBez}'}	[0x12a1f resolution 22 continue]
highway=pedestrian 	&!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${LangBez}'}	[0x10001 resolution 24 continue]
#highway=pedestrian 	&!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${KurzBez}'}	[0x10002 resolution 23-23 continue]
#highway=pedestrian 	&!(tunnel=* & tunnel !=no) & length()> 100	{ set mkgmap:label:1='${KurzBez}'}	[0x10003 resolution 22-22 continue]

# Grade1 asphaltierter Wirtschaftsweg
highway=trksurf1 & tunnel=* & tunnel !=no								{ set mkgmap:label:1='${KurzBez}'}	[0x12a1e resolution 22 continue]
LangBez=* & highway=trksurf1 &!(duenner=ja) &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${LangBez}'}	[0x10004 resolution 24 continue]
highway=trksurf1 &!(duenner=ja) &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${KurzBez}'}	[0x10005 resolution 23-23 continue]
highway=trksurf1 &!(duenner=ja) &!(tunnel=* & tunnel !=no) & length()> 100	{ set mkgmap:label:1='${KurzBez}'}	[0x10006 resolution 22-21 continue]
LangBez=* & highway=trksurf1 &(duenner=ja) &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${KurzBez}'}	[0x10004 resolution 24 continue]
highway=trksurf1 &(duenner=ja) &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${KurzBez}'}	[0x10005 resolution 23-23 continue]
highway=trksurf1 &(duenner=ja) &!(tunnel=* & tunnel !=no) & length()> 100	{ set mkgmap:label:1='${KurzBez}'}	[0x10006 resolution 22-22 continue]
highway=trksurf1 &(duenner=ja) &!(tunnel=* & tunnel !=no) & length()> 10000	{ set mkgmap:label:1='${KurzBez}'}	[0x10e0c resolution 21-21 continue]

# Grade2 nicht asphaltierter Wirtschaftsweg
highway=trksurf2 & tunnel=* & tunnel !=no		{ set mkgmap:label:1='${KurzBez}'}	[0x12a1e resolution 22 continue]
LangBez=* & highway=trksurf2 &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${LangBez}'}	[0x10007 resolution 24 continue]
highway=trksurf2 &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${KurzBez}'}	[0x10008 resolution 23-23 continue]
highway=trksurf2 &!(tunnel=* & tunnel !=no) & length()> 100	{ set mkgmap:label:1='${KurzBez}'}	[0x10009 resolution 22-22 continue]
highway=trksurf2 &!(tunnel=* & tunnel !=no) & length()> 10000	{ set mkgmap:label:1='${KurzBez}'}	[0x10e0c resolution 21-21 continue]

# Grade3 Piste
highway=trksurf3 & tunnel=* & tunnel !=no		{ set mkgmap:label:1='${KurzBez}'}	[0x12a1e resolution 22 continue]
LangBez=* & highway=trksurf3 &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${LangBez}'}	[0x1000a resolution 24 continue]
highway=trksurf3 &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${KurzBez}'}	[0x1000b resolution 23-23 continue]
highway=trksurf3 &!(tunnel=* & tunnel !=no) & length()> 100	{ set mkgmap:label:1='${KurzBez}'}	[0x1000c resolution 22-22 continue]
highway=trksurf3 &!(tunnel=* & tunnel !=no) & length()> 10000	{ set mkgmap:label:1='${KurzBez}'}	[0x10e0c resolution 21-21 continue]

# Grade4 Holperweg
highway=trksurf4 & tunnel=* & tunnel !=no		{ set mkgmap:label:1='${KurzBez}'}	[0x12a1e resolution 22 continue]
highway=trksurf4 &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${LangBez}'}	[0x1000d resolution 24 continue]
highway=trksurf4 &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${KurzBez}'}	[0x1000e resolution 23-23 continue]
highway=trksurf4 &!(tunnel=* & tunnel !=no) & length()> 100	{ set mkgmap:label:1='${KurzBez}'}	[0x1000f resolution 22-22 continue]
highway=trksurf4 &!(tunnel=* & tunnel !=no) & length()> 10000	{ set mkgmap:label:1='${KurzBez}'}	[0x10e0c resolution 21-21 continue]

# Grade5 schlechter Wirtschaftsweg
highway=tracksurf5 & tunnel=* & tunnel !=no	{ set mkgmap:label:1='${KurzBez}'}	[0x12a1e resolution 22 continue]
highway=trksurf5 &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${LangBez}'}	[0x10010 resolution 24 continue]
highway=trksurf5 &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${KurzBez}'}	[0x10011 resolution 23-23 continue]
highway=trksurf5 &!(tunnel=* & tunnel !=no) & length()> 100	{ set mkgmap:label:1='${KurzBez}'}	[0x10012 resolution 22-22 continue]
highway=trksurf5 &!(tunnel=* & tunnel !=no) & length()> 10000	{ set mkgmap:label:1='${KurzBez}'}	[0x10e0c resolution 21-21 continue]

# Wirtschaftsweg
highway=only_track & tunnel=* & tunnel !=no		{ set mkgmap:label:1='${KurzBez}'}	[0x12a1e resolution 22 continue]
LangBez=* & highway=only_track &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${LangBez}'}	[0x10013 resolution 24 continue]
highway=only_track &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x10014 resolution 23-23 continue]
highway=only_track &!(tunnel=* & tunnel !=no) & length()> 100		{ set mkgmap:label:1='${KurzBez}'}	[0x10015 resolution 22-22 continue]
highway=only_track &!(tunnel=* & tunnel !=no) & length()> 10000		{ set mkgmap:label:1='${KurzBez}'}	[0x10e0c resolution 21-21 continue]

# Pfad
highway=only_path & tunnel=* & tunnel !=no			{ set mkgmap:label:1='${KurzBez}'}	[0x12a1e resolution 22 continue]
LangBez=* & highway= only_path  &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${LangBez}'}	[0x10016 resolution 24 continue ]
highway= only_path	 &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x10017 resolution 23-23 continue]
highway= only_path	 &!(tunnel=* & tunnel !=no) & length()> 100		{ set mkgmap:label:1='${KurzBez}'}	[0x10018 resolution 22-22 continue]
highway= only_path	 &!(tunnel=* & tunnel !=no) & length()> 10000	{ set mkgmap:label:1='${KurzBez}'}	[0x10e0c resolution 21-21 continue]
highway= only_footpath & tunnel=* & tunnel !=no		{ set mkgmap:label:1='${KurzBez}'}	[0x12a1f resolution 22 continue]
highway= only_footpath &!(tunnel=* & tunnel !=no) 	{ set mkgmap:label:1='${LangBez}'}	[0x12010 resolution 24 continue]
highway= only_footpath &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x12011 resolution 23-23 continue]
highway= only_footpath &!(tunnel=* & tunnel !=no) & length()> 100		{ set mkgmap:label:1='${KurzBez}'}	[0x12012 resolution 22-22 continue]
highway= only_footpath &!(tunnel=* & tunnel !=no) & length()> 10000		{ set mkgmap:label:1='${KurzBez}'}	[0x10e0c resolution 21-21 continue]

# Reitweg
highway=bridleway & tunnel=* & tunnel !=no		{ set mkgmap:label:1='${KurzBez}'}	[0x12a1e resolution 22 continue]
highway=bridleway &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${LangBez}'}	[0x10019 resolution 24 continue]
highway=bridleway &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x1001a resolution 23-23 continue]
#highway=bridleway &!(tunnel=* & tunnel !=no) & length()> 100		{ set mkgmap:label:1='${KurzBez}'}	[0x1001b resolution 22-21 continue]

# Treppen
highway=steps & (ramp=yes|bicycle:ramp=yes|bicycle=dismount) {set steps_bc=ok}
highway=steps &! (steps_bc=ok)	{ set mkgmap:label:1='${LangBez}'}	[0x1001c resolution 24 continue]
highway=steps &! (steps_bc=ok)	{ set mkgmap:label:1='${KurzBez}'}	[0x1001d resolution 23-23 continue]
#highway=steps &! (steps_bc=ok) & length()> 100	{ set mkgmap:label:1='${KurzBez}'}	[0x1001e resolution 22-22 continue]
highway=steps & steps_bc=ok	 	{ set mkgmap:label:1='${LangBez}'}	[0x12a16 resolution 24 continue]
highway=steps & steps_bc=ok		{ set mkgmap:label:1='${KurzBez}'}	[0x12a17 resolution 23-23 continue]
#highway=steps & steps_bc=ok	 & length()> 100	{ set mkgmap:label:1='${KurzBez}'}	[0x12a18 resolution 22-22 continue]

# Rennstrecke
leisure=track & area!=yes &! (sport~'mtb|bicycle|cycling')		{ set mkgmap:label:1='${LangBez}'}	[0x12006 resolution 24 continue]
leisure=track & area!=yes	{ set mkgmap:label:1='${LangBez}'}	[0x11e1a resolution 24-24 continue]
#leisure=track & area!=yes	{ set mkgmap:label:1='${KurzBez}'}	[0x11e1b resolution 23-21 continue]
highway=raceway  & tunnel=* & tunnel !=no			{ set mkgmap:label:1='${KurzBez}'}	[0x12a1a resolution 20 continue]
highway=raceway 	& KurzBez=*			{ set mkgmap:label:1='${LangBez}'}	[0x12006 resolution 24 continue]
highway=raceway 	 &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${LangBez}'}	[0x1201a  resolution 24 continue]
highway=raceway 	 &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x1201b resolution 23-23 continue]
highway=raceway 	 &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x1201c resolution 22-21 continue]

highway=gallop & tunnel=* & tunnel !=no			{ set mkgmap:label:1='${KurzBez}'}	[0x12a1a resolution 20 continue]
highway=gallop	& KurzBez=*			{ set mkgmap:label:1='${LangBez}'}	[0x12006 resolution 24 continue]
highway=gallop	 &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${LangBez}'}	[0x1201a  resolution 24 continue]
#highway=gallop	 &!(tunnel=* & tunnel !=no)		{ set mkgmap:label:1='${KurzBez}'}	[0x1201b resolution 23-23 continue]


#Faehre Ford
route~'ferry|boat'					{ set mkgmap:label:1='${KurzBez}'}	[0x1201d resolution 23 continue]
route~'ferry|boat' & length()< 1500 					{ set mkgmap:label:1='${KurzBez}'}	[0x1201e resolution 22-22 continue]
route~'ferry|boat' & length()> 1500 					{ set mkgmap:label:1='${KurzBez}'}	[0x1201e resolution 22-20 continue]
ford=* & ford!=no & length()< 1500				{ set mkgmap:label:1='${KurzBez}'}	[0x1201f resolution 24 continue]
flood_prone=* & flood_prone!=no & length()< 1500		{ set mkgmap:label:1='${KurzBez}'}	[0x1201f resolution 24 continue]

# Seilbahn
aerialway=*	 & aerialway!=no	{ set mkgmap:label:1='${LangBez}'}	[0x12018 resolution 24-23 continue]


#Kreisel
junction=roundabout	&! (highway=*) & length()> 100		{ set mkgmap:label:1='${LangBez}'}			[0x1001f resolution 24-21 continue]

# Staudamm
waterway=dam  		{ set mkgmap:label:1='${LangBez}'}	[0x10e03 resolution 21 continue]

#Baustelle 
highway=construction 	& water=* |natural=* |	bicycle=* &! (bicycle=no)				{set conyes=yes} 
highway=construction 	& water=* |natural=* |	foot=* &! (foot=no)						{set conyes=yes} 
highway=construction	& KurzBez=*									{ set mkgmap:label:1='${KurzBez}'}	[0x12006 resolution 24 continue]
highway=construction 	& conyes=yes								{ set mkgmap:label:1='${LangBez}'}	[0x10e0d resolution 24-23 continue]
highway=construction 	&! (conyes=yes)								{ set mkgmap:label:1='${LangBez}'}	[0x10e0d resolution 24-23 ]
highway=proposed		& KurzBez=*									{ set mkgmap:label:1='${KurzBez}'}	[0x12006 resolution 24 continue]
highway=proposed 													{ set mkgmap:label:1='${LangBez}'}	[0x10e0e resolution 24-23 ]

#diverses
scenic=yes			{ set mkgmap:label:1='${KurzBez}'}	 [0x1200e resolution 19 continue]
highway=via_ferrata	& KurzBez=*	{ set mkgmap:label:1='${KurzBez}'}	[0x12006 resolution 24 continue]
highway=via_ferrata { set mkgmap:label:1='${LangBez}'}	 [0x1200c resolution 23 ]
highway=tobadforbike 			{ set mkgmap:label:1='${LangBez}'}	 [0x10e00 resolution 24 continue]
highway=tobadforbike 			{ set mkgmap:label:1='${LangBez}'}	 [0x10e01 resolution 23-23 continue]
highway=tobadforbike & length()> 100 			{ set mkgmap:label:1='${LangBez}'}	 [0x10e01 resolution 22-22 continue]

highway=buildbyuse 			{ set mkgmap:label:1='${LangBez}'}	 [0x10e00 resolution 24 continue]
highway=buildbyuse 			{ set mkgmap:label:1='${LangBez}'}	 [0x10e01 resolution 23-23 continue]
highway=buildbyuse & length()> 100 			{ set mkgmap:label:1='${LangBez}'}	 [0x10e01 resolution 22-22 continue]

# MTB Skalen
(mtb:scale:imba=0 | mtb:scale=0 ) [0x11e00 resolution 24 continue]
(mtb:scale:imba=0 | mtb:scale=0 ) [0x11e01 resolution 23-22 continue]
(mtb:scale:imba=1 | mtb:scale=1 ) [0x11e02 resolution 24 continue]
(mtb:scale:imba=1 | mtb:scale=1 ) [0x11e03 resolution 23-22 continue]
(mtb:scale:imba=2 | mtb:scale=2 ) [0x11e04 resolution 24 continue]
(mtb:scale:imba=2 | mtb:scale=2 ) [0x11e05 resolution 23-22 continue]
(mtb:scale:imba=3 | mtb:scale=3 ) [0x11e06 resolution 24 continue]
(mtb:scale:imba=3 | mtb:scale=3 ) [0x11e07 resolution 23-22 continue]
(mtb:scale:imba=4 | mtb:scale=4 ) [0x11e08 resolution 24 continue]
(mtb:scale:imba=4 | mtb:scale=4 ) [0x11e09 resolution 23-22 continue]
(mtb:scale:imba=5 | mtb:scale=5 ) [0x11e0a resolution 24 continue]
(mtb:scale:imba=5 | mtb:scale=5 ) [0x11e0b resolution 23-22 continue]
(mtb:scale:imba=6 | mtb:scale=6 ) [0x11e0c resolution 24 continue]
(mtb:scale:imba=6 | mtb:scale=6 ) [0x11e0d resolution 23-22 continue]

(mtb:scale:imba='0+' | mtb:scale='0+' ) [0x11e00 resolution 24 continue]
(mtb:scale:imba='0+' | mtb:scale='0+' ) [0x11e01 resolution 23-22 continue]
(mtb:scale:imba='1+' | mtb:scale='1+' ) [0x11e02 resolution 24 continue]
(mtb:scale:imba='1+' | mtb:scale='1+' ) [0x11e03 resolution 23-22 continue]
(mtb:scale:imba='2+' | mtb:scale='2+' ) [0x11e04 resolution 24 continue]
(mtb:scale:imba='2+' | mtb:scale='2+' ) [0x11e05 resolution 23-22 continue]
(mtb:scale:imba='3+' | mtb:scale='3+' ) [0x11e06 resolution 24 continue]
(mtb:scale:imba='3+' | mtb:scale='3+' ) [0x11e07 resolution 23-22 continue]
(mtb:scale:imba='4+' | mtb:scale='4+' ) [0x11e08 resolution 24 continue]
(mtb:scale:imba='4+' | mtb:scale='4+' ) [0x11e09 resolution 23-22 continue]
(mtb:scale:imba='5+' | mtb:scale='5+' ) [0x11e0a resolution 24 continue]
(mtb:scale:imba='5+' | mtb:scale='5+' ) [0x11e0b resolution 23-22 continue]
(mtb:scale:imba='6+' | mtb:scale='6+' ) [0x11e0c resolution 24 continue]
(mtb:scale:imba='6+' | mtb:scale='6+' ) [0x11e0d resolution 23-22 continue]

(mtb:scale:imba='0-' | mtb:scale='0-' ) [0x11e00 resolution 24 continue]
(mtb:scale:imba='0-' | mtb:scale='0-' ) [0x11e01 resolution 23-22 continue]
(mtb:scale:imba='1-' | mtb:scale='1-' ) [0x11e02 resolution 24 continue]
(mtb:scale:imba='1-' | mtb:scale='1-' ) [0x11e03 resolution 23-22 continue]
(mtb:scale:imba='2-' | mtb:scale='2-' ) [0x11e04 resolution 24 continue]
(mtb:scale:imba='2-' | mtb:scale='2-' ) [0x11e05 resolution 23-22 continue]
(mtb:scale:imba='3-' | mtb:scale='3-' ) [0x11e06 resolution 24 continue]
(mtb:scale:imba='3-' | mtb:scale='3-' ) [0x11e07 resolution 23-22 continue]
(mtb:scale:imba='4-' | mtb:scale='4-' ) [0x11e08 resolution 24 continue]
(mtb:scale:imba='4-' | mtb:scale='4-' ) [0x11e09 resolution 23-22 continue]
(mtb:scale:imba='5-' | mtb:scale='5-' ) [0x11e0a resolution 24 continue]
(mtb:scale:imba='5-' | mtb:scale='5-' ) [0x11e0b resolution 23-22 continue]
(mtb:scale:imba='6-' | mtb:scale='6-' ) [0x11e0c resolution 24 continue]
(mtb:scale:imba='6-' | mtb:scale='6-' ) [0x11e0d resolution 23-22 continue]


mtb:scale:uphill=0 [0x11e0e resolution 24-23 continue]
mtb:scale:uphill=0 [0x11e0f resolution 22-22 continue]
mtb:scale:uphill=1 [0x11e10 resolution 24-23 continue]
mtb:scale:uphill=1 [0x11e11 resolution 22-22 continue]
mtb:scale:uphill=2 [0x11e12 resolution 24-23 continue]
mtb:scale:uphill=2 [0x11e13 resolution 22-22 continue]
mtb:scale:uphill=3 [0x11e14 resolution 24-23 continue]
mtb:scale:uphill=3 [0x11e15 resolution 22-22 continue]
mtb:scale:uphill=4 [0x11e16 resolution 24-23 continue]
mtb:scale:uphill=4 [0x11e17 resolution 22-22 continue]
mtb:scale:uphill=5 [0x11e18 resolution 24-23 continue]
mtb:scale:uphill=5 [0x11e19 resolution 22-22 continue]

mtb:scale:uphill='0+' [0x11e0e resolution 24-23 continue]
mtb:scale:uphill='0+' [0x11e0f resolution 22-22 continue]
mtb:scale:uphill='1+' [0x11e10 resolution 24-23 continue]
mtb:scale:uphill='1+' [0x11e11 resolution 22-22 continue]
mtb:scale:uphill='2+' [0x11e12 resolution 24-23 continue]
mtb:scale:uphill='2+' [0x11e13 resolution 22-22 continue]
mtb:scale:uphill='3+' [0x11e14 resolution 24-23 continue]
mtb:scale:uphill='3+' [0x11e15 resolution 22-22 continue]
mtb:scale:uphill='4+' [0x11e16 resolution 24-23 continue]
mtb:scale:uphill='4+' [0x11e17 resolution 22-22 continue]
mtb:scale:uphill='5+' [0x11e18 resolution 24-23 continue]
mtb:scale:uphill='5+' [0x11e19 resolution 22-22 continue]

mtb:scale:uphill='0-' [0x11e0e resolution 24-23 continue]
mtb:scale:uphill='0-' [0x11e0f resolution 22-22 continue]
mtb:scale:uphill='1-' [0x11e10 resolution 24-23 continue]
mtb:scale:uphill='1-' [0x11e11 resolution 22-22 continue]
mtb:scale:uphill='2-' [0x11e12 resolution 24-23 continue]
mtb:scale:uphill='2-' [0x11e13 resolution 22-22 continue]
mtb:scale:uphill='3-' [0x11e14 resolution 24-23 continue]
mtb:scale:uphill='3-' [0x11e15 resolution 22-22 continue]
mtb:scale:uphill='4-' [0x11e16 resolution 24-23 continue]
mtb:scale:uphill='4-' [0x11e17 resolution 22-22 continue]
mtb:scale:uphill='5-' [0x11e18 resolution 24-23 continue]
mtb:scale:uphill='5-' [0x11e19 resolution 22-22 continue]


#Radwege an Wegen
#bicycle ~'yes|official|designated'	&! (cycone=yes)	&! (cycroute=yes|mtb:scale ~'[0-6]'|mtb:scale:uphill ~'[0-6]'|highway~'cycleway|badcycleway')	 { set mkgmap:label:1='${LangBez}'}	[0x10f06 resolution 24 continue] 
radOK=ok	{ set mkgmap:label:1='${LangBez}'}	[0x10f06 resolution 24 continue] 
cycleway=* &! (cycleway~'no|opposite|opposite_lane|opposite_track|separate'|highway~'cycleway|badcycleway')				{ set mkgmap:label:1='${LangBez}'}	[0x10f05 resolution 24 continue] 
cycleway:lane=*  &! (cycleway:lane~'no|opposite|opposite_lane|opposite_track')	{ set mkgmap:label:1='${LangBez}'}	[0x10f05 resolution 24 continue] 
cycleway:left=* &!(cycleway:right=*)	{ set mkgmap:label:1='${LangBez}'}	[0x10f03 resolution 24 continue] 
cycleway:right=* &!(cycleway:left=*)	{ set mkgmap:label:1='${LangBez}'} 	[0x10f04 resolution 24 continue]

# Bruecken
KurzBez=* & LangBez=*		{set BridgeBez='$(KurzBez) ${LangBez}'}
KurzBez!=* & LangBez=*		{set BridgeBez='${LangBez}'}
KurzBez=* & LangBez!=*		{set BridgeBez='$(KurzBez)'}
bridge=* & bridge !=no    { set mkgmap:label:1='${BridgeBez}' }	  [0x10e1a resolution 24-24 continue]
bridge=* & bridge !=no    { set mkgmap:label:1='${BridgeBez}' }	  [0x10e1b resolution 23-21 continue]
man_made=bridge    { delete man_made }


# Wassertunnel
tunnel=* & tunnel !=no  & waterway ~ 'river|canal|stream|drain|ditch'  	 { set mkgmap:label:1='${BridgeBez}'}	 [0x10000 resolution 24-21 ]

#Wanderskalen
sac_scale=hiking 					  	{ set mkgmap:label:1='${KurzBez}'}	[0x12000 resolution 23 continue]
sac_scale=mountain_hiking 			  	{ set mkgmap:label:1='${KurzBez}'}	[0x12001 resolution 23 continue]
sac_scale=demanding_mountain_hiking	  	{ set mkgmap:label:1='${KurzBez}'}	[0x12002 resolution 23 continue]
sac_scale=alpine_hiking				  	{ set mkgmap:label:1='${KurzBez}'}	[0x12003 resolution 23 continue]
sac_scale=demanding_alpine_hiking	  	{ set mkgmap:label:1='${KurzBez}'}	[0x12004 resolution 23 continue]
sac_scale=difficult_alpine_hiking	  	{ set mkgmap:label:1='${KurzBez}'}	[0x12005 resolution 23 continue]

# Barriere
barrier=* & barrier !=no 		{ set mkgmap:label:1='${KurzBez}'}	[0x1200d resolution 23 continue]
man_made=groyne					{ set mkgmap:label:1='${KurzBez}'}	[0x1200d resolution 23 continue]
man_made=cutline				{ set mkgmap:label:1='${KurzBez}'}	[0x1200d resolution 23 continue]

#embankment cutting
embankment=yes				{ set mkgmap:label:1='${KurzBez}'}	[0x10e14  resolution 24 continue]
man_made=embankment			{ set mkgmap:label:1='${KurzBez}'}	[0x10e12  resolution 24 continue]
man_made=dyke				{ set mkgmap:label:1='${KurzBez}'}	[0x10e14  resolution 24 continue]
cutting=yes					{ set mkgmap:label:1='${KurzBez}'}	[0x10e13  resolution 24 continue]

# Kopfsteinpflaster und bad
highway=* & surface ~ 'cobblestone|cobblestone:flattened|paving_stones'	&!(junction=roundabout)  &!(area=yes) { set mkgmap:label:1='${KurzBez}';set welle=ja}	 
smoothness=* &! (smoothness ~'excellent|good') & (highway~'primary|secondary|tertiary|unclassified|minor|road|residential|living_street|service|cycleway'|paved_way=yes|tracktype=grade1)	&!(area=yes) { set mkgmap:label:1='${KurzBez}';set welle=ja}
(ladder=*|safety_rope=*|rungs=*|assisted_trail=*) { set mkgmap:label:1='${KurzBez}';set welle=ja}

welle=ja [0x1200b resolution 22 continue]

# Zug
KurzBez=* & LangBez=*		{set RailBez='$(KurzBez) ${LangBez}'}
KurzBez!=* & LangBez=*		{set RailBez='${LangBez}'}
KurzBez=* & LangBez!=*		{set RailBez='$(KurzBez)'}

(route=shuttle_train|railway=*) &!  (railway=abandoned | highway=* | public_transport=platform | railway=platform) & tunnel=* & tunnel !=no		{ set mkgmap:label:1='${RailBez}'}	[0x12a1e resolution 20 continue]
(route=shuttle_train|railway=*) &!  (railway=abandoned | highway=* | public_transport=platform | railway=platform) 	 &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${RailBez}'}	[0x10e05 resolution 24 continue]
(route=shuttle_train|railway=*) &!  (railway=abandoned | highway=* | public_transport=platform | railway=platform) 	 &!(tunnel=* & tunnel !=no)	{ set mkgmap:label:1='${RailBez}'}	[0x10e06 resolution 23-20 ]
railway=abandoned &! (highway=*) & tunnel=* & tunnel !=no & layer!=-1		{ set mkgmap:label:1='${RailBez}'}		[0x12a1e resolution 23 continue]
railway=abandoned &! (highway=*) &!(tunnel=* & tunnel !=no) & layer!=-1	{ set mkgmap:label:1='${RailBez}' }	[0x10e07 resolution 24]

# Grenzen
grenze1=* { name '${grenze1}' | '${name}'}		[0x1e resolution 18 continue]
grenze2=* { name '${grenze2}' | '${name}'}		[0x1d resolution 18 continue]
grenze3=* { name '${grenze3}' | '${name}'}		[0x1c resolution 21 continue]
grenze=ja &! (grenze1=*|grenze2=*|grenze3=*) 	[0x1c resolution 21 continue]

boundary=national_park	{ set mkgmap:label:1='${LangBez}'}						[0x1f resolution 21 continue]
boundary=protected_area	{ set mkgmap:label:1='${LangBez}'}						[0x1f resolution 21 continue]

boundary=national_park	{ set mkgmap:label:1='${KurzBez}'}						[0x12006 resolution 24 continue]
boundary=protected_area	{ set mkgmap:label:1='${KurzBez}'}						[0x12006 resolution 24 continue]


# Kanten

natural=cliff 		{ set mkgmap:label:1='${KurzBez}'|'cliff'}				[0x11006 resolution 23]
natural=barranco 	{ set mkgmap:label:1='${KurzBez}'|'barranco'}			[0x11006 resolution 23]
natural=gorge 		{ set mkgmap:label:1='${KurzBez}'|'gorge'}				[0x11006 resolution 23]
natural=ridge 		{ set mkgmap:label:1='${KurzBez}'|'ridge'}				[0x11005 resolution 23]
natural=arete 		{ set mkgmap:label:1='${KurzBez}'|'arete'}				[0x11007 resolution 23]
natural=volcano		{ set mkgmap:label:1='${KurzBez}'|'volcano'}			[0x11008 resolution 23 continue]
geological=volcanic_caldera_rim	{ set mkgmap:label:1='${KurzBez}'|'volcano'}	[0x11008 resolution 23 continue]
natural=tree_row 	{ set mkgmap:label:1='${KurzBez}'|'tree_row'}			[0x1f resolution 24]
natural=valley 	 	{ set mkgmap:label:1='${KurzBez}'|'valley'}				[0x1f resolution 24]

# Strom
(power=minor_line|power=line) & ref=*	{ name'${ref}'}	[0x12006 resolution 24 continue]
(power=minor_line|power=line) 	{ set mkgmap:label:1='${LangBez}'}		[0x10e1e resolution 24 continue]
(power=minor_line|power=line) 	{ set mkgmap:label:1='${KurzBez}'}		[0x10e1f resolution 23-21]

# Startbahn
aeroway ~ 'runway|taxiway' & KurzBez=*	{ set mkgmap:label:1='${KurzBez}'}	[0x12006 resolution 24 continue]
aeroway=runway		{ set mkgmap:label:1='${LangBez}'}	[0x28 resolution 24 continue ]
aeroway=runway		{ set mkgmap:label:1='${KurzBez}'}	[0x27 resolution 23-20 ]
aeroway=taxiway 	{ set mkgmap:label:1='${LangBez}'}	[0x27 resolution 24]

#Wasserwege
waterway ~ 'river|canal|stream|drain|ditch' & LangBez=*  { set mkgmap:label:1='${LangBez}'}	[0x10e15 resolution 24 continue]
#natural=coastline 	{ set mkgmap:label:1='${LangBez}'}	[0x15 resolution 12]
waterway=river	& name=*		& length()>20000 {set bigriver=yes}
waterway=river	& name=*		& width>10 {set bigriver=yes}
waterway=river	& name=*		& length()>200000 {set verybigriver=yes}
waterway=river	& name=*		& width>100 {set verybigriver=yes}
waterway=river & verybigriver=yes	{ set mkgmap:label:1='${KurzBez}'}	[0x10f00 resolution 18-18 continue]
waterway=river & bigriver=yes		{ set mkgmap:label:1='${KurzBez}'}	[0x10f00 resolution 24-21 continue]
waterway=river & bigriver=yes		{ set mkgmap:label:1='${KurzBez}'}	[0x10f01 resolution 20-19 ]

waterway=river 						{ set mkgmap:label:1='${KurzBez}'}	[0x10f00 resolution 24 continue]
waterway=river & length()> 100000 	{ set mkgmap:label:1='${KurzBez}'}	[0x10f02 resolution 20-20 continue]
waterway=river						{ set mkgmap:label:1='${KurzBez}'}	[0x10f01 resolution 23-21 ]

waterway=canal						{ set mkgmap:label:1='${KurzBez}'}	[0x10f00 resolution 24 continue]
waterway=canal & length()> 100000	{ set mkgmap:label:1='${KurzBez}'}	[0x10f02 resolution 20-20 continue]
waterway=canal						{ set mkgmap:label:1='${KurzBez}'}	[0x10f01 resolution 23-21 ]
waterway=stream						{ set mkgmap:label:1='${KurzBez}'}	[0x10f00 resolution 24 continue]
waterway=stream & length()> 100000	{ set mkgmap:label:1='${KurzBez}'}	[0x10f02 resolution 22-22 continue]
waterway=stream						{ set mkgmap:label:1='${KurzBez}'}	[0x10f01 resolution 23-23 ]
waterway=drain						{ set mkgmap:label:1='${KurzBez}'}	[0x10f01 resolution 24 continue]
waterway=drain						{ set mkgmap:label:1='${KurzBez}'}	[0x10f02 resolution 23-22 ]
waterway=ditch						{ set mkgmap:label:1='${KurzBez}'}	[0x10f01 resolution 24 continue]
waterway=ditch						{ set mkgmap:label:1='${KurzBez}'}	[0x10f02 resolution 23-22 ]

waterway=rapids|waterway=waterfall		{ set mkgmap:label:1='${KurzBez}'}	[0x10f00 resolution 24 continue]
waterway=rapids|waterway=waterfall		{ set mkgmap:label:1='${LangBez}'}	[0x10f01 resolution 23-23 ]


#include something

include 'inc/routing';
include 'inc/contour_lines';

<finalize>
cycone=yes {delete oneway}
#limit artificial cycleways to to resolution 24
mkgmap:synthesised=yes & mkgmap:bicycle=yes { set mkgmap:highest-resolution-only = true }

# don't add house numbers to unnamed or artifical bicycle ways
mkgmap:bicycle=yes & (mkgmap:foot=no & mkgmap:car=no & mkgmap:street!=* | mkgmap:synthesised=yes) {set mkgmap:numbers=false}

#access

rad=nein &! ((incline > 100)|(incline < -30)|mtb:scale ~'[4-6]'|mtb:scale:uphill ~'[4-6]'|sac_scale ~'mountain_hiking|demanding_mountain_hiking|alpine_hiking|demanding_alpine_hiking|difficult_alpine_hiking'|smoroute=yes|highway~'tobadforbike|steps|verboten'|isin=j|bicycle~'no|private|permit') & (unbroute=yes|tracktype=grade1) {set rad=ja}

barrier=* & rad!=nein {set rad=ja}

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
}



laufen=nein { set mkgmap:foot=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
}
laufen=ja { set mkgmap:foot=yes }

highway=service & length()< 9 {set mkgmap:set_semi_connected_type=none}
highway=* & mkgmap:unpaved=yes & length()< 9 {set mkgmap:set_semi_connected_type=none}