wiki:Styles/Enhanced_Lane_and_Road_Attributes

Version 5 (modified by Klumbumbus, 8 years ago) ( diff )

wikitext fixes

Icon (NOZIP) Enhanced Lanes and Road Attributes mappaint style

The differences between this and the normal style are :

  • Ability to show the end segments as a square.
  • All roads that are higher then unclassified will be showed with red, so you can easily find and fix them.
  • Ability to see your edits with green

This style visualizes a number of lane and road specific attributes. Namely common variants of the following tags are considered:

  • lanes: Number of lanes for motorized traffic.
  • width: The width of the carriageway. Lane-dependent width using width:lanes is fully supported.
  • change: Allowed resp. forbidden lane changes.
  • turn: Indication of turning lanes, including preliminary support for values hook_right and hook_left (this might change!)
  • cycleway: Only cycle tracks are supported if specified with cycleway. Cycle lanes need bicycle:lanes=...|designated|... to be visible.
  • bicycle:lanes: Dedicated bicycle lanes.
  • bus:lanes: Dedicated bus lanes.
  • psv:lanes: Dedicated PSV (public service vehicle) lanes.
  • placement: Placement of the road relative to the OSM-way. The value transition is not supported.
  • man_made=bridge: Used to indicate the outline of a bridge and group together all features of that bridge.
  • lit: Indication if a road is lit or not.
  • highway=street_lamp: Street lamp
  • destination: Signposted destination of a road. Only rudimentary support without lane-dependent values. The subkeys destination:ref and destination:country are also supported.
  • highway=junction: Can be used to indicate the outline of a junction and group together all features of it.
  • Relation enforcement: The to and from members of such relations are highlighted
  • traffic_sign: Traffic signs for speed limits and overtaking are displayed if tagged with traffic_sign=maxspeed/overtaking and maxspeed=<limit> resp. overtaking=yes/no. The value implicit for maxspeed is interpreted as the end of the speed limit. Combinations like traffic_sign=maxspeed;overtaking are also supported.
  • hov:lanes: Dedicated HOV lanes. The minimum requirement can be specified by hov:minimum (supported values: 2 and 3)
  • Relation destination_sign: Experimental and very limited support!
  • driving_side: Used to specify the driving side of the traffic. This is only supported on ways.
  • railway: Tracks of railways are rendered with limited support for gauge, embedded and electrified.
  • transit: Specify how a lane continues in the next road segment. Only verification of valid values!

Furthermore:

  • Common suffixes like :forward, :backward, :left, :right: and :both as well as the proposed :both_ways (for lanes in both directions) are supported where appropriate.
  • Some common tagging errors are detected and displayed, e.g. inconsistent number of lane-dependent values and typos in the keys turn and change.
  • The style also supports left-hand traffic; see section Settings.

Use the Map Style Dialog to download and activate the style. A good starting point to see it in action is the area around Graz in Austria.

To report bugs or provide feedback send me a message.

Settings

Some settings of the style can be configured using Edit -> Preferences -> Display settings -> Colours. All settings start with mappaint.lane.and.road.attributes. Settings that contain the text "boolean" treat white as yes and any other color as no. Settings that contain the text "opacity" use the lightness to specify the opacity (the values for transparency or alpha are completely ignored!)

  • The settings carriage.way.backward, carriage.way.forward and carriage.way.both_ways specify the colour of the respective lanes.
  • The settings sidewalk, cycletrack and combined.sidewalk.and.cycletrack specify the colour of the sidewalk, a cycletrack and a combined sidewalk and cycletrack
  • If boolean.right.hand.traffic is set to white, lanes are rendered for right hand traffic, if set to black for left hand traffic and if set to anything else (which is now the default) the right- and left-hand traffic database from JOSM is used to automatically determine the side.
  • If boolean.use.svg.for.turning.markings is set to white, the markings for turning lanes are rendered more precisely. If you run into memory problems, set this to black. If this is set to black, the setting integer.png.turn.variant can be used to specify which set of png images should be used for turn markings. Currently two sets are supplied (value 000000 and 000001).
  • The settings opacity.lane, opacity.markings and opacity.sidewalk specify the opacity of the lane background, road markings and the sidewalk background. If set to white they are opaque; if set to black they are completely transparent, any grey setting in between is treated an appropriate opacity.

Known limitations/bugs

  • A bug in JOSM leads sometimes to rendering artefacts.
  • Left-hand traffic is nearly untested. Please provide feedback.
  • Roads with oneway=-1 may lead to incorrect results. Please provide feedback.
  • change:lanes without suffix is currently only supported on one-ways and for the special case of change:lanes=no|no.
  • In forward and backward direction a maximum of eight lanes and for lanes in both directions a maximum of four lanes is displayed.

Acknowledgments

  • To Wolfgang Hinsch who created a first style which visualizes many lane-specific features. Before I saw his style I wouldn't believe that this is possible.
  • To Paul Hartmann who implemented some desperately needed extensions for JOSM which made the implementation of this style a lot easier and improved performance significantly.
  • To all who provided valuable feedback during the creation of this style.

Preset

An appropriate preset for lane attributes is available at Lane Attributes.

Screenshot

http://img.ctrlv.in/img/16/09/20/57e0f664d73c8.png http://img.ctrlv.in/img/16/09/20/57e0f54bb5151.jpg

Code


meta 
{
    title: "Enhanced Lane and road attributes";
    description: "Visualization of lanes, width, turn lanes, changing the lane, destination, lighting and street lamps, sidewalk, cycletracks, bicycle lanes, bus lanes, psv lanes. Added modification by Florin Badita : - You can see the end of each road segment as a square. - If you modify the lines from ~70 until ~80 and you add your own name, you will be able to see with green your modifications, so that you can inspect the other ways that already have lanes attributes, but were not made by you. - We only show lanes to road categoryes highwer then unclassified, residential.";
    original_link: "http://josm.openstreetmap.de/wiki/Styles/Lane_and_Road_Attributes";
    link: "http://josm.openstreetmap.de/wiki/Styles/Enhanced_Lane_and_Road_Attributes";
    author: "Martin Vonwald,Florin Badita";
    version: "2.10-61_2015-06-02";
    license: "CC-BY-SA";
    icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNyAxOCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM4NSAtNTI0LjM2KSI+PHBhdGggZmlsbD0iIzIwMmQyMCIgZD0ibSAzODUgNTI0LjM2IGggMTcgdiAxOCBoIC0xNyB6Ii8+PGcgZmlsbD0ibm9uZSI+PGcgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgc3Ryb2tlLXdpZHRoPSIxLjgiPjxwYXRoIGQ9Im0gMzg3LjUgNTI1LjI2IHYgMTYuMiIgc3Ryb2tlPSIjZTRlN2U0Ii8+PHBhdGggZD0ibSAzOTkuNSA1MjUuMjYgdiAxNi4yIiBzdHJva2U9IiNlNWU3ZTUiLz48L2c+PHBhdGggZD0ibSAzOTMuNSA1MjYuMzYgdiA0IiBzdHJva2U9IiNlNWU3ZTUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjciLz48L2c+PHBhdGggZD0ibSAzOTMuNSA1MzUuMzYgdiA0IiBmaWxsPSIjZTRlN2U0IiBzdHJva2U9IiNlNWU3ZTUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjciLz48L2c+PC9zdmc+";
    min-josm-version: "7287";
}

meta[lang=de]
{
    title: "Fahrspur- und Straßenattribute";
    description: "Anzeige von Fahrspuren, Breite, Abbiegespuren, Spurwechsel, Zielangaben, Beleuchtung inkl. Straßenlampen, Gehsteig/Bürgersteig, Radwege, Fahrradspuren, Busspuren, Öffi-Spuren.";
    link: "http://josm.openstreetmap.de/wiki/De:Styles/Lane_and_Road_Attributes";
}



/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Global settings and initialization                                                                                                              */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/

/*TODO - Hide other types of highways/*
/* highlight boundary */
way[highway=residential][!lanes],
way[highway=unclassified][!lanes],
way[highway=tertiary][!lanes],
way[highway=tertiary_link][!lanes],
way[highway=secondary][!lanes],
way[highway=secondary_link][!lanes],
way[highway=primary][!lanes],
way[highway=primary_link][!lanes],
way[highway=trunk][!lanes],
way[highway=trunk_link][!lanes],
way[highway=motorway][!lanes],
way[highway=motorway_link][!lanes]          {
    z-index: -1;
    color: red;
    width: 3;
    opacity: 0.6;
    dashes: 12,12;
}

way[highway=residential][lanes],
way[highway=unclassified][lanes],
way[highway=tertiary][lanes],
way[highway=tertiary_link][lanes],
way[highway=secondary][lanes],
way[highway=secondary_link][lanes],
way[highway=primary][lanes],
way[highway=primary_link][lanes],
way[highway=trunk][!lanes],
way[highway=trunk_link][lanes],
way[highway=motorway][lanes],
way[highway=motorway_link][lanes]          {
    z-index: -1;
    color: white;
    width: 2;
    opacity: 0.4;

}


way[highway=residential][lanes][JOSM_search("user:hoream_telenav")]::my_edits,
way[highway=unclassified][lanes][!JOSM_search("user:hoream_telenav")],
way[highway=tertiary][lanes][!JOSM_search("user:hoream_telenav")],
way[highway=tertiary_link][lanes][!JOSM_search("user:hoream_telenav")],
way[highway=secondary][lanes][!JOSM_search("user:hoream_telenav")],
way[highway=secondary_link][lanes][!JOSM_search("user:hoream_telenav")],
way[highway=primary][lanes][!JOSM_search("user:hoream_telenav")],
way[highway=primary_link][lanes][!JOSM_search("user:hoream_telenav")],
way[highway=trunk][!lanes][!JOSM_search("user:hoream_telenav")],
way[highway=trunk_link][lanes][!JOSM_search("user:hoream_telenav")],
way[highway=motorway][lanes][!JOSM_search("user:hoream_telenav")],
way[highway=motorway_link][lanes][!JOSM_search("user:hoream_telenav")]          {
    z-index: -1;
    color: green;
    width: 12;
    opacity: 0.4;

}


/* zoom out */
 node|z-13:connection {
    symbol-shape: square;
    symbol-size: 20;
    symbol-stroke-color: red;
    symbol-stroke-size: 20;
    z-index: 10;
}



/* The last node of the way is square and grey, 
so we can quickly select the end of a way and Unglue Ways in JOSM using the Keyboard letter "G" */

way[highway] >[index=-1] node|z18-21 {  /* matches the last node of a way  */ 
   symbol-fill-color: grey;
    symbol-shape: square;
    symbol-stroke-color: white;
   symbol-size: 15;
 
}

/* The last node of the way is square and grey, 
so we can quickly select the end of a way and Unglue Ways in JOSM using the Keyboard letter "G" */

way[highway] >[index=-1] node|z15-19 {  /* matches the last node of a way  */ 
   symbol-fill-color: grey;
    symbol-shape: square;
    symbol-stroke-color: white;
   symbol-size: 8;
 
}


way!:closed >[index=1] node!:connection,
way!:closed >[index=-1] node!:connection { /* matches all single way end nodes */
   symbol-stroke-color: blue;
   symbol-size: 10;
}



way
{
  /* Settings: change if necessary */
  style_right_hand_traffic: yes;  /* Will be overriden by ugly hack below */
  style_lane_opacity: 0.5;        /* Will be overriden by ugly hack below */
  style_sidewalk_opacity: 0.5;    /* Will be overriden by ugly hack below */
  style_markings_opacity: 0.8;    /* Will be overriden by ugly hack below */
  style_show_warnings: yes;       /* Will be overriden by ugly hack below */
  style_show_errors: yes;         /* Will be overriden by ugly hack below */
  style_show_disputed: no;        /* Will be overriden by ugly hack below */
  style_use_svg_turn: yes;        /* Will be overriden by ugly hack below */
  
  /* Ugly hack to make opacity configurable */
  ugly_lane_opacity: Opacity_lane#000000;
  style_lane_opacity: eval((red(prop(ugly_lane_opacity))+green(prop(ugly_lane_opacity))+blue(prop(ugly_lane_opacity)))/3);
  ugly_sidewalk_opacity: Opacity_sidewalk#808080;
  style_sidewalk_opacity: eval((red(prop(ugly_sidewalk_opacity))+green(prop(ugly_sidewalk_opacity))+blue(prop(ugly_sidewalk_opacity)))/3);
  ugly_markings_opacity: Opacity_markings#CCCCCC;
  style_markings_opacity: eval((red(prop(ugly_markings_opacity))+green(prop(ugly_markings_opacity))+blue(prop(ugly_markings_opacity)))/3);

  /* Ugly hack to make boolean configurable */
  ugly_right_hand_traffic: Boolean_right_hand_traffic#888888;
  /*style_right_hand_traffic: eval(red(prop(ugly_right_hand_traffic)))=1;*/
  /*style_right_hand_traffic: eval(is_right_hand_traffic());*/
  style_right_hand_traffic: eval((red(prop(ugly_right_hand_traffic))=1)?yes:((red(prop(ugly_right_hand_traffic))=0)?no:is_right_hand_traffic()));
  ugly_show_warnings: Boolean_show_warnings#FFFFFF;
  style_show_warnings: eval(red(prop(ugly_show_warnings)))=1;
  ugly_show_errors: Boolean_show_errors#FFFFFF;
  style_show_errors: eval(red(prop(ugly_show_errors)))=1;
  ugly_show_disputed: Boolean_show_disputed#000000;
  style_show_disputed: eval(red(prop(ugly_show_disputed)))=1;
  ugly_use_svg_turn: Boolean_use_svg_for_turning_markings#FFFFFF;
  style_use_svg_turn: eval(red(prop(ugly_use_svg_turn)))=1;
  ugly_png_turn_variant: Integer_PNG_turn_variant#000000;
  style_png_turn_variant: eval(round(blue(prop((ugly_png_turn_variant)))*256));
  ugly_use_svg_destination: Boolean_use_svg_for_destination#FFFFFF;
  style_use_svg_destination: eval(red(prop(ugly_use_svg_destination)))=1;

  /* Color of the sidewalk: none (ignored), sidewalk only, cycletrack only, sidewalk and cycletrack */
  style_sidewalk_color: eval(list(#000000,Sidewalk#808080,Cycletrack#8080C0,Combined_sidewalk_and_cycletrack#C08080));

  /* Color of the dashes if lane is access=no */
  style_noaccess_color: No_access#FF0000;
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Decide which roads should be rendered                                                                                                           */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way[lanes][!leisure],
way[lanes:forward],
way[lanes:backward],
way[turn:lanes],way[turn:lanes:forward],way[turn:lanes:backward],way[turn:lanes:both_ways],
way[change:lanes],way[change:lanes:forward],way[change:lanes:backward],way[change:lanes:both_ways],
way[sidewalk][highway],
way[cycleway=track],way[cycleway:left],way[cycleway:right],way[cycleway:both],
way[destination],way[destination:forward],way[destination:backward]
{ ok: yes; }

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* One-ways                                                                                                                                        */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way[is_prop_set(ok)]                                 { oneway_type:  0; }
way[is_prop_set(ok)][oneway?]                        { oneway_type:  1; }
way[is_prop_set(ok)][oneway=-1]                      { oneway_type: -1; }
way[is_prop_set(ok)][junction=roundabout][!oneway]   { oneway_type:  1; }

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Overrule left-hand/right-hand traffic                                                                                                           */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way[driving_side]
{
    style_right_hand_traffic: eval((tag(driving_side)="left")?no:yes);
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Pixel per metre (on average)                                                                                                                    */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
*|z16  { pixel_per_metre: 0.625; }
*|z17  { pixel_per_metre: 1.25; }
*|z18  { pixel_per_metre: 2.5; }
*|z19  { pixel_per_metre: 5; }
*|z20  { pixel_per_metre: 10; }
*|z21  { pixel_per_metre: 20; }
*|z22  { pixel_per_metre: 40; }
*|z23  { pixel_per_metre: 80; }
*|z24  { pixel_per_metre: 160; }
*|z25  { pixel_per_metre: 320; }
*|z26- { pixel_per_metre: 640; }

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Colors                                                                                                                                          */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
way[is_prop_set(ok)]
{
    /* Base color of the carriage way */
    /* TODO: obsolete - remove in future release: ground-color:   #404040; */

    /* Individual colors for each direction */
    color_forward:  Carriage_way_forward#405A40;
    color_backward: Carriage_way_backward#5A4040;
    color_bothways: Carriage_way_bothways#40405A;
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Lane initializiation                                                                                                                            */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
way|z17- {} /* ATTENTION: For whatever reason this is needed, otherwise the following won't be interpreted correctly */
way|z17-[is_prop_set(ok)]
{
    change_forward_1_left: yes;    change_forward_1_right: yes;
    change_forward_2_left: yes;    change_forward_2_right: yes;
    change_forward_3_left: yes;    change_forward_3_right: yes;
    change_forward_4_left: yes;    change_forward_4_right: yes;
    change_forward_5_left: yes;    change_forward_5_right: yes;
    change_forward_6_left: yes;    change_forward_6_right: yes;
    change_forward_7_left: yes;    change_forward_7_right: yes;
    change_forward_8_left: yes;    change_forward_8_right: yes;

    change_backward_1_left: yes;    change_backward_1_right: yes;
    change_backward_2_left: yes;    change_backward_2_right: yes;
    change_backward_3_left: yes;    change_backward_3_right: yes;
    change_backward_4_left: yes;    change_backward_4_right: yes;
    change_backward_5_left: yes;    change_backward_5_right: yes;
    change_backward_6_left: yes;    change_backward_6_right: yes;
    change_backward_7_left: yes;    change_backward_7_right: yes;
    change_backward_8_left: yes;    change_backward_8_right: yes;

    change_bothways_1_left: yes;    change_bothways_1_right: yes;
    change_bothways_2_left: yes;    change_bothways_2_right: yes;
    change_bothways_3_left: yes;    change_bothways_3_right: yes;
    change_bothways_4_left: yes;    change_bothways_4_right: yes;

    color_forward_1: prop(color_forward);
    color_forward_2: prop(color_forward);
    color_forward_3: prop(color_forward);
    color_forward_4: prop(color_forward);
    color_forward_5: prop(color_forward);
    color_forward_6: prop(color_forward);
    color_forward_7: prop(color_forward);
    color_forward_8: prop(color_forward);

    color_backward_1: prop(color_backward);
    color_backward_2: prop(color_backward);
    color_backward_3: prop(color_backward);
    color_backward_4: prop(color_backward);
    color_backward_5: prop(color_backward);
    color_backward_6: prop(color_backward);
    color_backward_7: prop(color_backward);
    color_backward_8: prop(color_backward);
    
    color_bothways_1: prop(color_bothways);
    color_bothways_2: prop(color_bothways);
    color_bothways_3: prop(color_bothways);
    color_bothways_4: prop(color_bothways);

    sign_forward_1: "";         sign_backward_1: "";
    sign_forward_2: "";         sign_backward_2: "";
    sign_forward_3: "";         sign_backward_3: "";
    sign_forward_4: "";         sign_backward_4: "";
    sign_forward_5: "";         sign_backward_5: "";
    sign_forward_6: "";         sign_backward_6: "";
    sign_forward_7: "";         sign_backward_7: "";
    sign_forward_8: "";         sign_backward_8: "";

    tag_lanes_all_min:  9999; tag_lanes_all_max: 0;
    tag_lanes_fwd_min:  9999; tag_lanes_fwd_max: 0;
    tag_lanes_bwd_min:  9999; tag_lanes_bwd_max: 0;
    tag_lanes_both_min: 9999; tag_lanes_both_max: 0;
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Determine allowed lane changes                                                                                                                  */
/* TODO: change:lanes without oneway, but only with values yes or no                                                                               */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Error checking                                                                                                                                  */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way["change"]
{
    data_error: eval(regexp_test("^(yes|no|only_left|only_right|not_left|not_right)$",tag("change"))?prop(data_error):"invalid change value");
}
way["change:forward"]
{
    data_error: eval(regexp_test("^(yes|no|only_left|only_right|not_left|not_right)$",tag("change:forward"))?prop(data_error):"invalid change:forward value");
}
way["change:backward"]
{
    data_error: eval(regexp_test("^(yes|no|only_left|only_right|not_left|not_right)$",tag("change:backward"))?prop(data_error):"invalid change:backward value");
}
way["change:both_ways"]
{
    data_error: eval(regexp_test("^(yes|no|only_left|only_right|not_left|not_right)$",tag("change:both_ways"))?prop(data_error):"invalid change:both_ways value");
}
way["change:lanes"][!(prop(oneway_type)=0)]
{
    data_error: eval(regexp_test("^(yes|no|only_left|only_right|not_left|not_right|\\|)*$",tag("change:lanes"))?prop(data_error):"invalid change:lanes value");
}
way["change:lanes"][prop(oneway_type)=0]
{
    data_error: eval(regexp_test("^(yes|no|\\|)*$",tag("change:lanes"))?prop(data_error):"invalid change:lanes value");
}
way["change:lanes:forward"]
{
    data_error: eval(regexp_test("^(yes|no|only_left|only_right|not_left|not_right|\\|)*$",tag("change:lanes:forward"))?prop(data_error):"invalid change:lanes:forward value");
}
way["change:lanes:backward"]
{
    data_error: eval(regexp_test("^(yes|no|only_left|only_right|not_left|not_right|\\|)*$",tag("change:lanes:backward"))?prop(data_error):"invalid change:lanes:backward value");
}
way["change:lanes:both_ways"]
{
    data_error: eval(regexp_test("^(yes|no|only_left|only_right|not_left|not_right|\\|)*$",tag("change:lanes:both_ways"))?prop(data_error):"invalid change:lanes:both_ways value");
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Forward lanes                                                                                                                                   */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["change:lanes:forward"],
way|z17-[is_prop_set(ok)]["change:forward"],
way|z17-[is_prop_set(ok)]["change:lanes"][prop(oneway_type)=1],
way|z17-[is_prop_set(ok)]["change"][prop(oneway_type)=1]
{
    temp: eval(cond(has_tag_key("change:lanes"),tag("change:lanes"),cond(has_tag_key("change"),tag("change"),
                                cond(has_tag_key("change:lanes:forward"),tag("change:lanes:forward"),tag("change:forward")))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));
    change_forward_1_left:  eval((prop(temp_length)>0) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),0)));
    change_forward_1_right: eval((prop(temp_length)>0) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),0)));
    change_forward_2_left:  eval((prop(temp_length)>1) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),1)));
    change_forward_2_right: eval((prop(temp_length)>1) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),1)));
    change_forward_3_left:  eval((prop(temp_length)>2) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),2)));
    change_forward_3_right: eval((prop(temp_length)>2) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),2)));
    change_forward_4_left:  eval((prop(temp_length)>3) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),3)));
    change_forward_4_right: eval((prop(temp_length)>3) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),3)));
    change_forward_5_left:  eval((prop(temp_length)>4) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),4)));
    change_forward_5_right: eval((prop(temp_length)>4) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),4)));
    change_forward_6_left:  eval((prop(temp_length)>5) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),5)));
    change_forward_6_right: eval((prop(temp_length)>5) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),5)));
    change_forward_7_left:  eval((prop(temp_length)>6) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),6)));
    change_forward_7_right: eval((prop(temp_length)>6) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),6)));
    change_forward_8_left:  eval((prop(temp_length)>7) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),7)));
    change_forward_8_right: eval((prop(temp_length)>7) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),7)));

    /* Lane count based on :lanes values */
    tag_lanes_all_min: eval(has_tag_key("change:lanes")?min(prop(tag_lanes_all_min),prop(temp_length)):prop(tag_lanes_all_min));
    tag_lanes_all_max: eval(has_tag_key("change:lanes")?max(prop(tag_lanes_all_max),prop(temp_length)):prop(tag_lanes_all_max));
    tag_lanes_fwd_min: eval(has_tag_key("change:lanes:forward")?min(prop(tag_lanes_fwd_min),prop(temp_length)):prop(tag_lanes_fwd_min));
    tag_lanes_fwd_max: eval(has_tag_key("change:lanes:forward")?max(prop(tag_lanes_fwd_max),prop(temp_length)):prop(tag_lanes_fwd_max));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Backward lanes                                                                                                                                   */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["change:lanes:backward"],
way|z17-[is_prop_set(ok)]["change:backward"],
way|z17-[is_prop_set(ok)]["change:lanes"][prop(oneway_type)=(-1)],
way|z17-[is_prop_set(ok)]["change"][prop(oneway_type)=(-1)]
{
    temp: eval(cond(has_tag_key("change:lanes"),tag("change:lanes"),cond(has_tag_key("change"),tag("change"),
                                cond(has_tag_key("change:lanes:backward"),tag("change:lanes:backward"),tag("change:backward")))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));
    change_lanes_bwd: eval(length(prop(temp_list)));
    change_backward_1_left:  eval((prop(temp_length)>0) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),0)));
    change_backward_1_right: eval((prop(temp_length)>0) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),0)));
    change_backward_2_left:  eval((prop(temp_length)>1) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),1)));
    change_backward_2_right: eval((prop(temp_length)>1) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),1)));
    change_backward_3_left:  eval((prop(temp_length)>2) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),2)));
    change_backward_3_right: eval((prop(temp_length)>2) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),2)));
    change_backward_4_left:  eval((prop(temp_length)>3) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),3)));
    change_backward_4_right: eval((prop(temp_length)>3) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),3)));
    change_backward_5_left:  eval((prop(temp_length)>4) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),4)));
    change_backward_5_right: eval((prop(temp_length)>4) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),4)));
    change_backward_6_left:  eval((prop(temp_length)>5) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),5)));
    change_backward_6_right: eval((prop(temp_length)>5) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),5)));
    change_backward_7_left:  eval((prop(temp_length)>6) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),6)));
    change_backward_7_right: eval((prop(temp_length)>6) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),6)));
    change_backward_8_left:  eval((prop(temp_length)>7) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),7)));
    change_backward_8_right: eval((prop(temp_length)>7) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),7)));

    /* Lane count based on :lanes values */
    tag_lanes_bwd_min: eval(has_tag_key("change:lanes:backward")?min(prop(tag_lanes_bwd_min),prop(temp_length)):prop(tag_lanes_bwd_min));
    tag_lanes_bwd_max: eval(has_tag_key("change:lanes:backward")?max(prop(tag_lanes_bwd_max),prop(temp_length)):prop(tag_lanes_bwd_max));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Bothways lanes                                                                                                                                  */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["change:lanes:both_ways"],
way|z17-[is_prop_set(ok)]["change:both_ways"]
{
    temp: eval(cond(has_tag_key("change:lanes:both_ways"),tag("change:lanes:both_ways"),tag("change:both_ways")));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));

    change_lanes_bth: eval(length(prop(temp_list)));
    change_bothways_1_left:  eval((prop(temp_length)>0) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),0)));
    change_bothways_1_right: eval((prop(temp_length)>0) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),0)));
    change_bothways_2_left:  eval((prop(temp_length)>1) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),1)));
    change_bothways_2_right: eval((prop(temp_length)>1) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),1)));
    change_bothways_3_left:  eval((prop(temp_length)>2) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),2)));
    change_bothways_3_right: eval((prop(temp_length)>2) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),2)));
    change_bothways_4_left:  eval((prop(temp_length)>3) && regexp_test("^(yes|only_left|not_right)$",get(prop(temp_list),3)));
    change_bothways_4_right: eval((prop(temp_length)>3) && regexp_test("^(yes|only_right|not_left)$",get(prop(temp_list),3)));

    /* Lane count based on :lanes values */
    tag_lanes_both_min: eval(has_tag_key("change:lanes:both_ways")?min(prop(tag_lanes_both_min),prop(temp_length)):prop(tag_lanes_both_min));
    tag_lanes_both_max: eval(has_tag_key("change:lanes:both_ways")?max(prop(tag_lanes_both_max),prop(temp_length)):prop(tag_lanes_both_max));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Extra support for change:lanes=no|no on twoway streets                                                                                          */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["change:lanes"="no|no"][prop(oneway_type)=0]
{
    change_forward_1_left:   false;
    change_forward_1_right:  false;
    change_backward_1_left:  false;
    change_backward_1_right: false;

    /* Lane count based on :lanes values */
    tag_lanes_all_min: eval(min(prop(tag_lanes_all_min),2));
    tag_lanes_all_max: eval(max(prop(tag_lanes_all_max),2));
    tag_lanes_fwd_min: eval(min(1,prop(tag_lanes_fwd_min)));
    tag_lanes_fwd_max: eval(max(1,prop(tag_lanes_fwd_max)));
    tag_lanes_bwd_min: eval(min(1,prop(tag_lanes_bwd_min)));
    tag_lanes_bwd_max: eval(max(1,prop(tag_lanes_bwd_max)));
}


/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Determine turning lanes                                                                                                                         */
/* Note: rendering of "reverse" only when using svg                                                                                                */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Error checking                                                                                                                                  */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way["turn"] { data_error: eval(regexp_test("^(none|through|left|slight_left|sharp_left|hook_left|right|slight_right|sharp_right|hook_right|merge_to_left|merge_to_right|reverse|;)*$",tag("turn"))?prop(data_error):"invalid turn value"); }
way["turn:forward"] { data_error: eval(regexp_test("^(none|through|left|slight_left|sharp_left|hook_left|right|slight_right|sharp_right|hook_right|merge_to_left|merge_to_right|reverse|;)*$",tag("turn:forward"))?prop(data_error):"invalid turn:forward value"); }
way["turn:backward"] { data_error: eval(regexp_test("^(none|through|left|slight_left|sharp_left|hook_left|right|slight_right|sharp_right|hook_right|merge_to_left|merge_to_right|reverse|;)*$",tag("turn:backward"))?prop(data_error):"invalid turn:backward value"); }
way["turn:both_ways"] { data_error: eval(regexp_test("^(none|through|left|slight_left|sharp_left|hook_left|right|slight_right|sharp_right|hook_right|merge_to_left|merge_to_right|reverse|;)*$",tag("turn:both_ways"))?prop(data_error):"invalid turn:both_ways value"); }
way["turn:lanes"] { data_error: eval(regexp_test("^(none|through|left|slight_left|sharp_left|hook_left|right|slight_right|sharp_right|hook_right|merge_to_left|merge_to_right|reverse|;|\\|)*$",tag("turn:lanes"))?prop(data_error):"invalid turn:lanes value"); }
way["turn:lanes:forward"] { data_error: eval(regexp_test("^(none|through|left|slight_left|sharp_left|hook_left|right|slight_right|sharp_right|hook_right|merge_to_left|merge_to_right|reverse|;|\\|)*$",tag("turn:lanes:forward"))?prop(data_error):"invalid turn:lanes:forward value"); }
way["turn:lanes:backward"] { data_error: eval(regexp_test("^(none|through|left|slight_left|sharp_left|hook_left|right|slight_right|sharp_right|hook_right|merge_to_left|merge_to_right|reverse|;|\\|)*$",tag("turn:lanes:backward"))?prop(data_error):"invalid turn:lanes:backward value"); }
way["turn:lanes:both_ways"] { data_error: eval(regexp_test("^(none|through|left|slight_left|sharp_left|hook_left|right|slight_right|sharp_right|hook_right|merge_to_left|merge_to_right|reverse|;|\\|)*$",tag("turn:lanes:both_ways"))?prop(data_error):"invalid turn:lanes:both_ways value"); }

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Forward lanes (standard images)                                                                                                                 */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)][!prop(style_use_svg_turn)]["turn:lanes:forward"],
way|z17-[is_prop_set(ok)][!prop(style_use_svg_turn)]["turn:forward"],
way|z17-[is_prop_set(ok)][!prop(style_use_svg_turn)]["turn:lanes"][prop(oneway_type)=1],
way|z17-[is_prop_set(ok)][!prop(style_use_svg_turn)]["turn"][prop(oneway_type)=1]
{
    temp: eval(cond(has_tag_key("turn:lanes"),tag("turn:lanes"),
                                cond(has_tag_key("turn"),tag("turn"),
                                cond(has_tag_key("turn:lanes:forward"),tag("turn:lanes:forward"),
                                     tag("turn:forward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));

    t: eval(get(prop(temp_list),0));
    turn_image_forward_1: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",prop(t),".png")
                                )
                                )
                            );
    t: eval(get(prop(temp_list),1));
    turn_image_forward_2: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",prop(t),".png")
                                )
                                )
                            );
    t: eval(get(prop(temp_list),2));
    turn_image_forward_3: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",prop(t),".png")
                                )
                                )
                            );
    t: eval(get(prop(temp_list),3));
    turn_image_forward_4: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",prop(t),".png")
                                )
                                )
                            );
    t: eval(get(prop(temp_list),4));
    turn_image_forward_5: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",prop(t),".png")
                                )
                                )
                            );
    t: eval(get(prop(temp_list),5));
    turn_image_forward_6: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",prop(t),".png")
                                )
                                )
                            );
    t: eval(get(prop(temp_list),6));
    turn_image_forward_7: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",prop(t),".png")
                                )
                                )
                            );
    t: eval(get(prop(temp_list),7));
    turn_image_forward_8: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn forward ",prop(t),".png")
                                )
                                )
                            );

    /* Lane count based on :lanes values */
    tag_lanes_all_min: eval(has_tag_key("turn:lanes")?min(prop(tag_lanes_all_min),prop(temp_length)):prop(tag_lanes_all_min));
    tag_lanes_all_max: eval(has_tag_key("turn:lanes")?max(prop(tag_lanes_all_max),prop(temp_length)):prop(tag_lanes_all_max));
    tag_lanes_fwd_min: eval(has_tag_key("turn:lanes:forward")?min(prop(tag_lanes_fwd_min),prop(temp_length)):prop(tag_lanes_fwd_min));
    tag_lanes_fwd_max: eval(has_tag_key("turn:lanes:forward")?max(prop(tag_lanes_fwd_max),prop(temp_length)):prop(tag_lanes_fwd_max));
}


/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Backward lanes (standard images)                                                                                                                */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)][!prop(style_use_svg_turn)]["turn:lanes:backward"],
way|z17-[is_prop_set(ok)][!prop(style_use_svg_turn)]["turn:backward"],
way|z17-[is_prop_set(ok)][!prop(style_use_svg_turn)]["turn:lanes"][prop(oneway_type)=(-1)],
way|z17-[is_prop_set(ok)][!prop(style_use_svg_turn)]["turn"][prop(oneway_type)=(-1)]
{
    temp: eval(cond(has_tag_key("turn:lanes"),tag("turn:lanes"),
                                cond(has_tag_key("turn"),tag("turn"),
                                cond(has_tag_key("turn:lanes:backward"),tag("turn:lanes:backward"),
                                     tag("turn:backward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));

    t: eval(get(prop(temp_list),0));
    turn_image_backward_1: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",prop(t),".png")
                                )
                                )
                            );
    t: eval(get(prop(temp_list),1));
    turn_image_backward_2: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",prop(t),".png")
                                )
                                )
                            );
    t: eval(get(prop(temp_list),2));
    turn_image_backward_3: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",prop(t),".png")
                                )
                                )
                            );
    t: eval(get(prop(temp_list),3));
    turn_image_backward_4: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",prop(t),".png")
                                )
                                )
                            );
    t: eval(get(prop(temp_list),4));
    turn_image_backward_5: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",prop(t),".png")
                                )
                                )
                            );
    t: eval(get(prop(temp_list),5));
    turn_image_backward_6: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",prop(t),".png")
                                )
                                )
                            );
    t: eval(get(prop(temp_list),6));
    turn_image_backward_7: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",prop(t),".png")
                                )
                                )
                            );
    t: eval(get(prop(temp_list),7));
    turn_image_backward_8: eval( 
                                ((prop(t)="none") || (prop(t)=""))?prop(unset_property):
                                ( 
                                (prop(t)="reverse")?(prop(style_right_hand_traffic,"default")?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse righthand.png"):concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward reverse lefthand.png")):
                                (
                                    regexp_test(".*;.*",prop(t))?concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",regexp_test(".*left.*",prop(t))?"left":"",regexp_test(".*through.*",prop(t))?"through":"",regexp_test(".*right.*",prop(t))?"right":"",".png"):
                                    concat("images/png/turn-",prop(style_png_turn_variant),"/turn backward ",prop(t),".png")
                                )
                                )
                            );

    /* Lane count based on :lanes values */
    tag_lanes_bwd_min: eval(has_tag_key("turn:lanes:backward")?min(prop(tag_lanes_bwd_min),prop(temp_length)):prop(tag_lanes_bwd_min));
    tag_lanes_bwd_max: eval(has_tag_key("turn:lanes:backward")?max(prop(tag_lanes_bwd_max),prop(temp_length)):prop(tag_lanes_bwd_max));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* SVG for turn images                                                                                                                             */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)][prop(style_use_svg_turn)]
{
        turn_svg_through_forward: eval("<path fill='#FFF' d='m0,17.5,0,15,67.5-5,0,7.5,32.5-10-32.5-10,0,7.5z'/>");
        turn_svg_slight_right_forward: eval("<path fill='#FFF' d='m0,17.5,0,15,67.5-5c11.462-1.0193,18.459,10.285,20.46,13.902l-7.96,4.2,17.5,4.3683,2.5-15-7.753,4.1421c-2.247-4.5-6.12-15.4-24.747-16.6z'/>");
        turn_svg_right_forward: eval("<path fill='#FFF' d='m0,17.5,0,15,67.5-5c6.31-0.505,17.5,5,17.5,10h-10l12.5,12.5,12.5-12.5h-10c0-5-8.43-13.3-22.5-15z'/>");
        turn_svg_sharp_right_forward: eval("<path fill='#FFF' d='m0,17.5,0,15l62.497-4.7c7.5026,0.7633,2.5026,7.1294,0.0026,11.156l-7.5-4.0271,2.5,15,17.5-4.3125-7.878-4.2954c4.3284-6.3921,6.7048-17.943-4.6246-19.263z'/>");
        turn_svg_slight_left_forward: eval(concat("<g transform='translate(0,50) scale(1.0,-1.0)'>",prop(turn_svg_slight_right_forward),"</g>"));
        turn_svg_left_forward: eval(concat("<g transform='translate(0,50) scale(1.0,-1.0)'>",prop(turn_svg_right_forward),"</g>"));
        turn_svg_sharp_left_forward: eval(concat("<g transform='translate(0,50) scale(1.0,-1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"));
        turn_svg_reverse_right_hand_forward: eval("<path fill='#FFF' d='m0,40,0-15,62.497,4.6294c12.503,0.4,15.003-10,0.003-12.1v5.4671l-16.238-7.9671,16.238-7.5v5c15-2.1079,22.5,22.5-0.003,22.871z'/>");
        turn_svg_reverse_left_hand_forward: eval(concat("<g transform='translate(0,50) scale(1.0,-1.0)'>",prop(turn_svg_reverse_right_hand_forward),"</g>"));
        turn_svg_merge_to_right_forward: eval("<path fill='#FFF' d='m0,17.5,0,15,50.034-3.7063c7.4655-0.5212,13.016,2.3222,19.541,4.8112l-2.922,6.3951,33.347,5-25-22.5-3.2955,6.6794c-8.1542-5.6073-14.204-7.5071-21.734-7.9779z'/>");
        turn_svg_merge_to_left_forward: eval(concat("<g transform='translate(0,50) scale(1.0,-1.0)'>",prop(turn_svg_merge_to_right_forward),"</g>"));
        turn_svg_hook_right_forward: eval("<path fill='#FFF' d='m0,22.5,0,15,37.474-2.7759c11.051-1.2406,20.026-5.8731,20.026-15.873,0-5,5-3.8509,13.359-3.8509,9.1412,0,14.141-1.3338,14.141,5v17.5h-10l12.5,12.5,12.5-12.5h-10v-17.5c0-11.271-2.5-12.5-19.23-12.5-15.77,0-20.77,1.351-20.77,11.351,0,5-6.8784,6.8562-12.531,6.4246z'/>");
        turn_svg_hook_left_forward: eval(concat("<g transform='translate(0,50) scale(1.0,-1.0)'>",prop(turn_svg_hook_right_forward),"</g>"));
}


/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Forward lanes (SVG)                                                                                                                             */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)][prop(style_use_svg_turn)]["turn:lanes:forward"],
way|z17-[is_prop_set(ok)][prop(style_use_svg_turn)]["turn:forward"],
way|z17-[is_prop_set(ok)][prop(style_use_svg_turn)]["turn:lanes"][prop(oneway_type)=1],
way|z17-[is_prop_set(ok)][prop(style_use_svg_turn)]["turn"][prop(oneway_type)=1]
{
    temp: eval(cond(has_tag_key("turn:lanes"),tag("turn:lanes"),
                                cond(has_tag_key("turn"),tag("turn"),
                                cond(has_tag_key("turn:lanes:forward"),tag("turn:lanes:forward"),
                                     tag("turn:forward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));

    turn_image_forward_1: ""; t: eval(get(prop(temp_list),0)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_forward_1: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_forward_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_forward_1: eval(prop(t_test)?concat(prop(turn_image_forward_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_forward_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_forward_1: eval(prop(t_test)?concat(prop(turn_image_forward_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_forward_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_forward_1: eval(prop(t_test)?concat(prop(turn_image_forward_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_forward_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_forward_1: eval(prop(t_test)?concat(prop(turn_image_forward_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_forward_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_forward_1: eval(prop(t_test)?concat(prop(turn_image_forward_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_forward_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_forward_1: eval(prop(t_test)?concat(prop(turn_image_forward_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_forward_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_forward_1: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_forward_1),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_forward_1));
    turn_image_forward_1: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_1),prop(turn_svg_merge_to_right_forward)):prop(turn_image_forward_1));
    turn_image_forward_1: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_1),prop(turn_svg_merge_to_left_forward)):prop(turn_image_forward_1));
    turn_image_forward_1: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_1),prop(turn_svg_hook_right_forward)):prop(turn_image_forward_1));
    turn_image_forward_1: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_1),prop(turn_svg_hook_left_forward)):prop(turn_image_forward_1));
    turn_image_forward_1: eval((prop(turn_image_forward_1)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"'>",prop(turn_image_forward_1),"</g></svg>"));

    turn_image_forward_2: ""; t: eval(get(prop(temp_list),1)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_forward_2: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_forward_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_forward_2: eval(prop(t_test)?concat(prop(turn_image_forward_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_forward_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_forward_2: eval(prop(t_test)?concat(prop(turn_image_forward_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_forward_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_forward_2: eval(prop(t_test)?concat(prop(turn_image_forward_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_forward_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_forward_2: eval(prop(t_test)?concat(prop(turn_image_forward_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_forward_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_forward_2: eval(prop(t_test)?concat(prop(turn_image_forward_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_forward_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_forward_2: eval(prop(t_test)?concat(prop(turn_image_forward_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_forward_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_forward_2: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_forward_2),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_forward_2));
    turn_image_forward_2: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_2),prop(turn_svg_merge_to_right_forward)):prop(turn_image_forward_2));
    turn_image_forward_2: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_2),prop(turn_svg_merge_to_left_forward)):prop(turn_image_forward_2));
    turn_image_forward_2: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_2),prop(turn_svg_hook_right_forward)):prop(turn_image_forward_2));
    turn_image_forward_2: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_2),prop(turn_svg_hook_left_forward)):prop(turn_image_forward_2));
    turn_image_forward_2: eval((prop(turn_image_forward_2)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"'>",prop(turn_image_forward_2),"</g></svg>"));

    turn_image_forward_3: ""; t: eval(get(prop(temp_list),2)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_forward_3: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_forward_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_forward_3: eval(prop(t_test)?concat(prop(turn_image_forward_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_forward_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_forward_3: eval(prop(t_test)?concat(prop(turn_image_forward_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_forward_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_forward_3: eval(prop(t_test)?concat(prop(turn_image_forward_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_forward_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_forward_3: eval(prop(t_test)?concat(prop(turn_image_forward_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_forward_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_forward_3: eval(prop(t_test)?concat(prop(turn_image_forward_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_forward_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_forward_3: eval(prop(t_test)?concat(prop(turn_image_forward_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_forward_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_forward_3: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_forward_3),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_forward_3));
    turn_image_forward_3: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_3),prop(turn_svg_merge_to_right_forward)):prop(turn_image_forward_3));
    turn_image_forward_3: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_3),prop(turn_svg_merge_to_left_forward)):prop(turn_image_forward_3));
    turn_image_forward_3: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_3),prop(turn_svg_hook_right_forward)):prop(turn_image_forward_3));
    turn_image_forward_3: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_3),prop(turn_svg_hook_left_forward)):prop(turn_image_forward_3));
    turn_image_forward_3: eval((prop(turn_image_forward_3)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"'>",prop(turn_image_forward_3),"</g></svg>"));

    turn_image_forward_4: ""; t: eval(get(prop(temp_list),3)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_forward_4: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_forward_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_forward_4: eval(prop(t_test)?concat(prop(turn_image_forward_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_forward_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_forward_4: eval(prop(t_test)?concat(prop(turn_image_forward_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_forward_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_forward_4: eval(prop(t_test)?concat(prop(turn_image_forward_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_forward_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_forward_4: eval(prop(t_test)?concat(prop(turn_image_forward_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_forward_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_forward_4: eval(prop(t_test)?concat(prop(turn_image_forward_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_forward_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_forward_4: eval(prop(t_test)?concat(prop(turn_image_forward_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_forward_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_forward_4: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_forward_4),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_forward_4));
    turn_image_forward_4: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_4),prop(turn_svg_merge_to_right_forward)):prop(turn_image_forward_4));
    turn_image_forward_4: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_4),prop(turn_svg_merge_to_left_forward)):prop(turn_image_forward_4));
    turn_image_forward_4: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_4),prop(turn_svg_hook_right_forward)):prop(turn_image_forward_4));
    turn_image_forward_4: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_4),prop(turn_svg_hook_left_forward)):prop(turn_image_forward_4));
    turn_image_forward_4: eval((prop(turn_image_forward_4)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"'>",prop(turn_image_forward_4),"</g></svg>"));

    turn_image_forward_5: ""; t: eval(get(prop(temp_list),4)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_forward_5: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_forward_5));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_forward_5: eval(prop(t_test)?concat(prop(turn_image_forward_5),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_forward_5));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_forward_5: eval(prop(t_test)?concat(prop(turn_image_forward_5),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_forward_5));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_forward_5: eval(prop(t_test)?concat(prop(turn_image_forward_5),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_forward_5));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_forward_5: eval(prop(t_test)?concat(prop(turn_image_forward_5),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_forward_5));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_forward_5: eval(prop(t_test)?concat(prop(turn_image_forward_5),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_forward_5));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_forward_5: eval(prop(t_test)?concat(prop(turn_image_forward_5),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_forward_5));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_forward_5: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_forward_5),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_forward_5));
    turn_image_forward_5: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_5),prop(turn_svg_merge_to_right_forward)):prop(turn_image_forward_5));
    turn_image_forward_5: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_5),prop(turn_svg_merge_to_left_forward)):prop(turn_image_forward_5));
    turn_image_forward_5: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_5),prop(turn_svg_hook_right_forward)):prop(turn_image_forward_5));
    turn_image_forward_5: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_5),prop(turn_svg_hook_left_forward)):prop(turn_image_forward_5));
    turn_image_forward_5: eval((prop(turn_image_forward_5)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"'>",prop(turn_image_forward_5),"</g></svg>"));

    turn_image_forward_6: ""; t: eval(get(prop(temp_list),5)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_forward_6: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_forward_6));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_forward_6: eval(prop(t_test)?concat(prop(turn_image_forward_6),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_forward_6));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_forward_6: eval(prop(t_test)?concat(prop(turn_image_forward_6),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_forward_6));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_forward_6: eval(prop(t_test)?concat(prop(turn_image_forward_6),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_forward_6));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_forward_6: eval(prop(t_test)?concat(prop(turn_image_forward_6),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_forward_6));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_forward_6: eval(prop(t_test)?concat(prop(turn_image_forward_6),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_forward_6));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_forward_6: eval(prop(t_test)?concat(prop(turn_image_forward_6),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_forward_6));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_forward_6: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_forward_6),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_forward_6));
    turn_image_forward_6: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_6),prop(turn_svg_merge_to_right_forward)):prop(turn_image_forward_6));
    turn_image_forward_6: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_6),prop(turn_svg_merge_to_left_forward)):prop(turn_image_forward_6));
    turn_image_forward_6: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_6),prop(turn_svg_hook_right_forward)):prop(turn_image_forward_6));
    turn_image_forward_6: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_6),prop(turn_svg_hook_left_forward)):prop(turn_image_forward_6));
    turn_image_forward_6: eval((prop(turn_image_forward_6)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"'>",prop(turn_image_forward_6),"</g></svg>"));

    turn_image_forward_7: ""; t: eval(get(prop(temp_list),6)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_forward_7: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_forward_7));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_forward_7: eval(prop(t_test)?concat(prop(turn_image_forward_7),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_forward_7));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_forward_7: eval(prop(t_test)?concat(prop(turn_image_forward_7),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_forward_7));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_forward_7: eval(prop(t_test)?concat(prop(turn_image_forward_7),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_forward_7));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_forward_7: eval(prop(t_test)?concat(prop(turn_image_forward_7),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_forward_7));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_forward_7: eval(prop(t_test)?concat(prop(turn_image_forward_7),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_forward_7));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_forward_7: eval(prop(t_test)?concat(prop(turn_image_forward_7),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_forward_7));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_forward_7: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_forward_7),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_forward_7));
    turn_image_forward_7: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_7),prop(turn_svg_merge_to_right_forward)):prop(turn_image_forward_7));
    turn_image_forward_7: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_7),prop(turn_svg_merge_to_left_forward)):prop(turn_image_forward_7));
    turn_image_forward_7: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_7),prop(turn_svg_hook_right_forward)):prop(turn_image_forward_7));
    turn_image_forward_7: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_7),prop(turn_svg_hook_left_forward)):prop(turn_image_forward_7));
    turn_image_forward_7: eval((prop(turn_image_forward_7)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"'>",prop(turn_image_forward_7),"</g></svg>"));

    turn_image_forward_8: ""; t: eval(get(prop(temp_list),7)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_forward_8: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_forward_8));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_forward_8: eval(prop(t_test)?concat(prop(turn_image_forward_8),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_forward_8));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_forward_8: eval(prop(t_test)?concat(prop(turn_image_forward_8),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_forward_8));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_forward_8: eval(prop(t_test)?concat(prop(turn_image_forward_8),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_forward_8));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_forward_8: eval(prop(t_test)?concat(prop(turn_image_forward_8),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_forward_8));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_forward_8: eval(prop(t_test)?concat(prop(turn_image_forward_8),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_forward_8));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_forward_8: eval(prop(t_test)?concat(prop(turn_image_forward_8),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_forward_8));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_forward_8: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_forward_8),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_forward_8));
    turn_image_forward_8: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_8),prop(turn_svg_merge_to_right_forward)):prop(turn_image_forward_8));
    turn_image_forward_8: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_8),prop(turn_svg_merge_to_left_forward)):prop(turn_image_forward_8));
    turn_image_forward_8: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_forward_8),prop(turn_svg_hook_right_forward)):prop(turn_image_forward_8));
    turn_image_forward_8: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_forward_8),prop(turn_svg_hook_left_forward)):prop(turn_image_forward_8));
    turn_image_forward_8: eval((prop(turn_image_forward_8)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"'>",prop(turn_image_forward_8),"</g></svg>"));

    /* Lane count based on :lanes values */
    tag_lanes_all_min: eval(has_tag_key("turn:lanes")?min(prop(tag_lanes_all_min),prop(temp_length)):prop(tag_lanes_all_min));
    tag_lanes_all_max: eval(has_tag_key("turn:lanes")?max(prop(tag_lanes_all_max),prop(temp_length)):prop(tag_lanes_all_max));
    tag_lanes_fwd_min: eval(has_tag_key("turn:lanes:forward")?min(prop(tag_lanes_fwd_min),prop(temp_length)):prop(tag_lanes_fwd_min));
    tag_lanes_fwd_max: eval(has_tag_key("turn:lanes:forward")?max(prop(tag_lanes_fwd_max),prop(temp_length)):prop(tag_lanes_fwd_max));
}


/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Backward lanes (SVG)                                                                                                                            */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)][prop(style_use_svg_turn)]["turn:lanes:backward"],
way|z17-[is_prop_set(ok)][prop(style_use_svg_turn)]["turn:backward"],
way|z17-[is_prop_set(ok)][prop(style_use_svg_turn)]["turn:lanes"][prop(oneway_type)=(-1)],
way|z17-[is_prop_set(ok)][prop(style_use_svg_turn)]["turn"][prop(oneway_type)=(-1)]
{
    temp: eval(cond(has_tag_key("turn:lanes"),tag("turn:lanes"),
                                cond(has_tag_key("turn"),tag("turn"),
                                cond(has_tag_key("turn:lanes:backward"),tag("turn:lanes:backward"),
                                     tag("turn:backward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));

    turn_image_backward_1: ""; t: eval(get(prop(temp_list),0)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_backward_1: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_backward_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_backward_1: eval(prop(t_test)?concat(prop(turn_image_backward_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_backward_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_backward_1: eval(prop(t_test)?concat(prop(turn_image_backward_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_backward_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_backward_1: eval(prop(t_test)?concat(prop(turn_image_backward_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_backward_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_backward_1: eval(prop(t_test)?concat(prop(turn_image_backward_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_backward_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_backward_1: eval(prop(t_test)?concat(prop(turn_image_backward_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_backward_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_backward_1: eval(prop(t_test)?concat(prop(turn_image_backward_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_backward_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_backward_1: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_backward_1),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_backward_1));
    turn_image_backward_1: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_1),prop(turn_svg_merge_to_right_forward)):prop(turn_image_backward_1));
    turn_image_backward_1: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_1),prop(turn_svg_merge_to_left_forward)):prop(turn_image_backward_1));
    turn_image_backward_1: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_1),prop(turn_svg_hook_right_forward)):prop(turn_image_backward_1));
    turn_image_backward_1: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_1),prop(turn_svg_hook_left_forward)):prop(turn_image_backward_1));
    turn_image_backward_1: eval((prop(turn_image_backward_1)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"' transform='rotate(180 50 25)'>",prop(turn_image_backward_1),"</g></svg>"));

    turn_image_backward_2: ""; t: eval(get(prop(temp_list),1)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_backward_2: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_backward_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_backward_2: eval(prop(t_test)?concat(prop(turn_image_backward_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_backward_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_backward_2: eval(prop(t_test)?concat(prop(turn_image_backward_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_backward_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_backward_2: eval(prop(t_test)?concat(prop(turn_image_backward_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_backward_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_backward_2: eval(prop(t_test)?concat(prop(turn_image_backward_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_backward_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_backward_2: eval(prop(t_test)?concat(prop(turn_image_backward_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_backward_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_backward_2: eval(prop(t_test)?concat(prop(turn_image_backward_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_backward_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_backward_2: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_backward_2),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_backward_2));
    turn_image_backward_2: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_2),prop(turn_svg_merge_to_right_forward)):prop(turn_image_backward_2));
    turn_image_backward_2: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_2),prop(turn_svg_merge_to_left_forward)):prop(turn_image_backward_2));
    turn_image_backward_2: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_2),prop(turn_svg_hook_right_forward)):prop(turn_image_backward_2));
    turn_image_backward_2: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_2),prop(turn_svg_hook_left_forward)):prop(turn_image_backward_2));
    turn_image_backward_2: eval((prop(turn_image_backward_2)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"' transform='rotate(180 50 25)'>",prop(turn_image_backward_2),"</g></svg>"));

    turn_image_backward_3: ""; t: eval(get(prop(temp_list),2)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_backward_3: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_backward_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_backward_3: eval(prop(t_test)?concat(prop(turn_image_backward_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_backward_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_backward_3: eval(prop(t_test)?concat(prop(turn_image_backward_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_backward_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_backward_3: eval(prop(t_test)?concat(prop(turn_image_backward_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_backward_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_backward_3: eval(prop(t_test)?concat(prop(turn_image_backward_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_backward_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_backward_3: eval(prop(t_test)?concat(prop(turn_image_backward_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_backward_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_backward_3: eval(prop(t_test)?concat(prop(turn_image_backward_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_backward_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_backward_3: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_backward_3),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_backward_3));
    turn_image_backward_3: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_3),prop(turn_svg_merge_to_right_forward)):prop(turn_image_backward_3));
    turn_image_backward_3: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_3),prop(turn_svg_merge_to_left_forward)):prop(turn_image_backward_3));
    turn_image_backward_3: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_3),prop(turn_svg_hook_right_forward)):prop(turn_image_backward_3));
    turn_image_backward_3: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_3),prop(turn_svg_hook_left_forward)):prop(turn_image_backward_3));
    turn_image_backward_3: eval((prop(turn_image_backward_3)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"' transform='rotate(180 50 25)'>",prop(turn_image_backward_3),"</g></svg>"));

    turn_image_backward_4: ""; t: eval(get(prop(temp_list),3)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_backward_4: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_backward_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_backward_4: eval(prop(t_test)?concat(prop(turn_image_backward_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_backward_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_backward_4: eval(prop(t_test)?concat(prop(turn_image_backward_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_backward_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_backward_4: eval(prop(t_test)?concat(prop(turn_image_backward_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_backward_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_backward_4: eval(prop(t_test)?concat(prop(turn_image_backward_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_backward_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_backward_4: eval(prop(t_test)?concat(prop(turn_image_backward_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_backward_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_backward_4: eval(prop(t_test)?concat(prop(turn_image_backward_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_backward_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_backward_4: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_backward_4),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_backward_4));
    turn_image_backward_4: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_4),prop(turn_svg_merge_to_right_forward)):prop(turn_image_backward_4));
    turn_image_backward_4: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_4),prop(turn_svg_merge_to_left_forward)):prop(turn_image_backward_4));
    turn_image_backward_4: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_4),prop(turn_svg_hook_right_forward)):prop(turn_image_backward_4));
    turn_image_backward_4: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_4),prop(turn_svg_hook_left_forward)):prop(turn_image_backward_4));
    turn_image_backward_4: eval((prop(turn_image_backward_4)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"' transform='rotate(180 50 25)'>",prop(turn_image_backward_4),"</g></svg>"));

    turn_image_backward_5: ""; t: eval(get(prop(temp_list),4)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_backward_5: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_backward_5));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_backward_5: eval(prop(t_test)?concat(prop(turn_image_backward_5),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_backward_5));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_backward_5: eval(prop(t_test)?concat(prop(turn_image_backward_5),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_backward_5));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_backward_5: eval(prop(t_test)?concat(prop(turn_image_backward_5),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_backward_5));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_backward_5: eval(prop(t_test)?concat(prop(turn_image_backward_5),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_backward_5));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_backward_5: eval(prop(t_test)?concat(prop(turn_image_backward_5),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_backward_5));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_backward_5: eval(prop(t_test)?concat(prop(turn_image_backward_5),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_backward_5));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_backward_5: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_backward_5),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_backward_5));
    turn_image_backward_5: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_5),prop(turn_svg_merge_to_right_forward)):prop(turn_image_backward_5));
    turn_image_backward_5: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_5),prop(turn_svg_merge_to_left_forward)):prop(turn_image_backward_5));
    turn_image_backward_5: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_5),prop(turn_svg_hook_right_forward)):prop(turn_image_backward_5));
    turn_image_backward_5: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_5),prop(turn_svg_hook_left_forward)):prop(turn_image_backward_5));
    turn_image_backward_5: eval((prop(turn_image_backward_5)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"' transform='rotate(180 50 25)'>",prop(turn_image_backward_5),"</g></svg>"));

    turn_image_backward_6: ""; t: eval(get(prop(temp_list),5)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_backward_6: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_backward_6));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_backward_6: eval(prop(t_test)?concat(prop(turn_image_backward_6),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_backward_6));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_backward_6: eval(prop(t_test)?concat(prop(turn_image_backward_6),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_backward_6));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_backward_6: eval(prop(t_test)?concat(prop(turn_image_backward_6),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_backward_6));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_backward_6: eval(prop(t_test)?concat(prop(turn_image_backward_6),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_backward_6));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_backward_6: eval(prop(t_test)?concat(prop(turn_image_backward_6),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_backward_6));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_backward_6: eval(prop(t_test)?concat(prop(turn_image_backward_6),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_backward_6));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_backward_6: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_backward_6),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_backward_6));
    turn_image_backward_6: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_6),prop(turn_svg_merge_to_right_forward)):prop(turn_image_backward_6));
    turn_image_backward_6: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_6),prop(turn_svg_merge_to_left_forward)):prop(turn_image_backward_6));
    turn_image_backward_6: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_6),prop(turn_svg_hook_right_forward)):prop(turn_image_backward_6));
    turn_image_backward_6: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_6),prop(turn_svg_hook_left_forward)):prop(turn_image_backward_6));
    turn_image_backward_6: eval((prop(turn_image_backward_6)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"' transform='rotate(180 50 25)'>",prop(turn_image_backward_6),"</g></svg>"));

    turn_image_backward_7: ""; t: eval(get(prop(temp_list),6)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_backward_7: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_backward_7));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_backward_7: eval(prop(t_test)?concat(prop(turn_image_backward_7),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_backward_7));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_backward_7: eval(prop(t_test)?concat(prop(turn_image_backward_7),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_backward_7));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_backward_7: eval(prop(t_test)?concat(prop(turn_image_backward_7),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_backward_7));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_backward_7: eval(prop(t_test)?concat(prop(turn_image_backward_7),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_backward_7));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_backward_7: eval(prop(t_test)?concat(prop(turn_image_backward_7),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_backward_7));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_backward_7: eval(prop(t_test)?concat(prop(turn_image_backward_7),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_backward_7));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_backward_7: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_backward_7),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_backward_7));
    turn_image_backward_7: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_7),prop(turn_svg_merge_to_right_forward)):prop(turn_image_backward_7));
    turn_image_backward_7: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_7),prop(turn_svg_merge_to_left_forward)):prop(turn_image_backward_7));
    turn_image_backward_7: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_7),prop(turn_svg_hook_right_forward)):prop(turn_image_backward_7));
    turn_image_backward_7: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_7),prop(turn_svg_hook_left_forward)):prop(turn_image_backward_7));
    turn_image_backward_7: eval((prop(turn_image_backward_7)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"' transform='rotate(180 50 25)'>",prop(turn_image_backward_7),"</g></svg>"));

    turn_image_backward_8: ""; t: eval(get(prop(temp_list),7)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_backward_8: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_backward_8));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_backward_8: eval(prop(t_test)?concat(prop(turn_image_backward_8),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_backward_8));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_backward_8: eval(prop(t_test)?concat(prop(turn_image_backward_8),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_backward_8));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_backward_8: eval(prop(t_test)?concat(prop(turn_image_backward_8),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_backward_8));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_backward_8: eval(prop(t_test)?concat(prop(turn_image_backward_8),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_backward_8));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_backward_8: eval(prop(t_test)?concat(prop(turn_image_backward_8),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_backward_8));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_backward_8: eval(prop(t_test)?concat(prop(turn_image_backward_8),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_backward_8));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_backward_8: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_backward_8),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_backward_8));
    turn_image_backward_8: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_8),prop(turn_svg_merge_to_right_forward)):prop(turn_image_backward_8));
    turn_image_backward_8: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_8),prop(turn_svg_merge_to_left_forward)):prop(turn_image_backward_8));
    turn_image_backward_8: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_backward_8),prop(turn_svg_hook_right_forward)):prop(turn_image_backward_8));
    turn_image_backward_8: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_backward_8),prop(turn_svg_hook_left_forward)):prop(turn_image_backward_8));
    turn_image_backward_8: eval((prop(turn_image_backward_8)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='100px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"' transform='rotate(180 50 25)'>",prop(turn_image_backward_8),"</g></svg>"));

    /* Lane count based on :lanes values */
    tag_lanes_bwd_min: eval(has_tag_key("turn:lanes:backward")?min(prop(tag_lanes_bwd_min),prop(temp_length)):prop(tag_lanes_bwd_min));
    tag_lanes_bwd_max: eval(has_tag_key("turn:lanes:backward")?max(prop(tag_lanes_bwd_max),prop(temp_length)):prop(tag_lanes_bwd_max));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Both-way lanes (SVG)                                                                                                                            */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)][prop(style_use_svg_turn)]["turn:lanes:both_ways"],
way|z17-[is_prop_set(ok)][prop(style_use_svg_turn)]["turn:both_ways"]
{
    temp: eval(cond(has_tag_key("turn:lanes:both_ways"),tag("turn:lanes:both_ways"),tag("turn:both_ways")));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));

    turn_image_bothways_1: ""; t: eval(get(prop(temp_list),0)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_bothways_1: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_bothways_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_bothways_1: eval(prop(t_test)?concat(prop(turn_image_bothways_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_bothways_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_bothways_1: eval(prop(t_test)?concat(prop(turn_image_bothways_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_bothways_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_bothways_1: eval(prop(t_test)?concat(prop(turn_image_bothways_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_bothways_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_bothways_1: eval(prop(t_test)?concat(prop(turn_image_bothways_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_bothways_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_bothways_1: eval(prop(t_test)?concat(prop(turn_image_bothways_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_bothways_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_bothways_1: eval(prop(t_test)?concat(prop(turn_image_bothways_1),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_bothways_1));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_bothways_1: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_bothways_1),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_bothways_1));
    turn_image_bothways_1: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_bothways_1),prop(turn_svg_merge_to_right_forward)):prop(turn_image_bothways_1));
    turn_image_bothways_1: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_bothways_1),prop(turn_svg_merge_to_left_forward)):prop(turn_image_bothways_1));
    turn_image_bothways_1: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_bothways_1),prop(turn_svg_hook_right_forward)):prop(turn_image_bothways_1));
    turn_image_bothways_1: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_bothways_1),prop(turn_svg_hook_left_forward)):prop(turn_image_bothways_1));
    turn_image_bothways_1: eval((prop(turn_image_bothways_1)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='200px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"'>",prop(turn_image_bothways_1),"</g><g fill-opacity='",prop(style_markings_opacity),"' transform='rotate(180 50 25) translate(-100 0)'>",prop(turn_image_bothways_1),"</g></svg>"));

    turn_image_bothways_2: ""; t: eval(get(prop(temp_list),1)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_bothways_2: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_bothways_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_bothways_2: eval(prop(t_test)?concat(prop(turn_image_bothways_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_bothways_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_bothways_2: eval(prop(t_test)?concat(prop(turn_image_bothways_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_bothways_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_bothways_2: eval(prop(t_test)?concat(prop(turn_image_bothways_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_bothways_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_bothways_2: eval(prop(t_test)?concat(prop(turn_image_bothways_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_bothways_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_bothways_2: eval(prop(t_test)?concat(prop(turn_image_bothways_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_bothways_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_bothways_2: eval(prop(t_test)?concat(prop(turn_image_bothways_2),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_bothways_2));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_bothways_2: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_bothways_2),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_bothways_2));
    turn_image_bothways_2: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_bothways_2),prop(turn_svg_merge_to_right_forward)):prop(turn_image_bothways_2));
    turn_image_bothways_2: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_bothways_2),prop(turn_svg_merge_to_left_forward)):prop(turn_image_bothways_2));
    turn_image_bothways_2: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_bothways_2),prop(turn_svg_hook_right_forward)):prop(turn_image_bothways_2));
    turn_image_bothways_2: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_bothways_2),prop(turn_svg_hook_left_forward)):prop(turn_image_bothways_2));
    turn_image_bothways_2: eval((prop(turn_image_bothways_2)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='200px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"'>",prop(turn_image_bothways_2),"</g><g fill-opacity='",prop(style_markings_opacity),"' transform='rotate(180 50 25) translate(-100 0)'>",prop(turn_image_bothways_2),"</g></svg>"));

    turn_image_bothways_3: ""; t: eval(get(prop(temp_list),2)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_bothways_3: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_bothways_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_bothways_3: eval(prop(t_test)?concat(prop(turn_image_bothways_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_bothways_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_bothways_3: eval(prop(t_test)?concat(prop(turn_image_bothways_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_bothways_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_bothways_3: eval(prop(t_test)?concat(prop(turn_image_bothways_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_bothways_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_bothways_3: eval(prop(t_test)?concat(prop(turn_image_bothways_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_bothways_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_bothways_3: eval(prop(t_test)?concat(prop(turn_image_bothways_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_bothways_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_bothways_3: eval(prop(t_test)?concat(prop(turn_image_bothways_3),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_bothways_3));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_bothways_3: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_bothways_3),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_bothways_3));
    turn_image_bothways_3: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_bothways_3),prop(turn_svg_merge_to_right_forward)):prop(turn_image_bothways_3));
    turn_image_bothways_3: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_bothways_3),prop(turn_svg_merge_to_left_forward)):prop(turn_image_bothways_3));
    turn_image_bothways_3: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_bothways_3),prop(turn_svg_hook_right_forward)):prop(turn_image_bothways_3));
    turn_image_bothways_3: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_bothways_3),prop(turn_svg_hook_left_forward)):prop(turn_image_bothways_3));
    turn_image_bothways_3: eval((prop(turn_image_bothways_3)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='200px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"'>",prop(turn_image_bothways_3),"</g><g fill-opacity='",prop(style_markings_opacity),"' transform='rotate(180 50 25) translate(-100 0)'>",prop(turn_image_bothways_3),"</g></svg>"));

    turn_image_bothways_4: ""; t: eval(get(prop(temp_list),3)); t_scale: 1.0;
    t_test: eval(regexp_test("^(.*;)*through(;.*)*$",prop(t)));         turn_image_bothways_4: eval(prop(t_test)?prop(turn_svg_through_forward):                                                                                              prop(turn_image_bothways_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale_after_through: eval(prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*slight_right(;.*)*$",prop(t)));    turn_image_bothways_4: eval(prop(t_test)?concat(prop(turn_image_bothways_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_right_forward),"</g>"):prop(turn_image_bothways_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*right(;.*)*$",prop(t)));           turn_image_bothways_4: eval(prop(t_test)?concat(prop(turn_image_bothways_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_right_forward),"</g>"):       prop(turn_image_bothways_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_right(;.*)*$",prop(t)));     turn_image_bothways_4: eval(prop(t_test)?concat(prop(turn_image_bothways_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_right_forward),"</g>"): prop(turn_image_bothways_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_scale: eval(prop(t_scale_after_through));
    t_test: eval(regexp_test("^(.*;)*slight_left(;.*)*$",prop(t)));     turn_image_bothways_4: eval(prop(t_test)?concat(prop(turn_image_bothways_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_slight_left_forward),"</g>"): prop(turn_image_bothways_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*left(;.*)*$",prop(t)));            turn_image_bothways_4: eval(prop(t_test)?concat(prop(turn_image_bothways_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_left_forward),"</g>"):        prop(turn_image_bothways_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    t_test: eval(regexp_test("^(.*;)*sharp_left(;.*)*$",prop(t)));      turn_image_bothways_4: eval(prop(t_test)?concat(prop(turn_image_bothways_4),"<g transform='scale(",prop(t_scale)," 1.0)'>",prop(turn_svg_sharp_left_forward),"</g>"):  prop(turn_image_bothways_4));    t_scale: eval(prop(t_test)?(prop(t_scale)*0.666):prop(t_scale));
    turn_image_bothways_4: eval(regexp_test("^(.*;)*reverse(;.*)*$",prop(t))?concat(prop(turn_image_bothways_4),(prop(style_right_hand_traffic)?prop(turn_svg_reverse_right_hand_forward):prop(turn_svg_reverse_left_hand_forward))):prop(turn_image_bothways_4));
    turn_image_bothways_4: eval(regexp_test("^(.*;)*merge_to_right(;.*)*$",prop(t))?concat(prop(turn_image_bothways_4),prop(turn_svg_merge_to_right_forward)):prop(turn_image_bothways_4));
    turn_image_bothways_4: eval(regexp_test("^(.*;)*merge_to_left(;.*)*$",prop(t))?concat(prop(turn_image_bothways_4),prop(turn_svg_merge_to_left_forward)):prop(turn_image_bothways_4));
    turn_image_bothways_4: eval(regexp_test("^(.*;)*hook_right(;.*)*$",prop(t))?concat(prop(turn_image_bothways_4),prop(turn_svg_hook_right_forward)):prop(turn_image_bothways_4));
    turn_image_bothways_4: eval(regexp_test("^(.*;)*hook_left(;.*)*$",prop(t))?concat(prop(turn_image_bothways_4),prop(turn_svg_hook_left_forward)):prop(turn_image_bothways_4));
    turn_image_bothways_4: eval((prop(turn_image_bothways_4)="")?prop(unset_property):concat("data:image/svg+xml,<svg width='200px' height='50px'><g fill-opacity='",prop(style_markings_opacity),"'>",prop(turn_image_bothways_4),"</g><g fill-opacity='",prop(style_markings_opacity),"' transform='rotate(180 50 25) translate(-100 0)'>",prop(turn_image_bothways_4),"</g></svg>"));
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Lane access                                                                                                                                     */
/* The property restriction_color_xxx will be overwritten by later rules                                                                           */
/* TODO: both_ways is not implemented                                                                                                              */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Access=no forward lanes                                                                                                                         */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["access:lanes:forward"],
way|z17-[is_prop_set(ok)]["access:forward"],
way|z17-[is_prop_set(ok)]["access:lanes"][prop(oneway_type)=1],
way|z17-[is_prop_set(ok)]["access"][prop(oneway_type)=1]
{
    temp: eval(cond(has_tag_key("access:lanes"),tag("access:lanes"),
                                cond(has_tag_key("access"),tag("access"),
                                cond(has_tag_key("access:lanes:forward"),tag("access:lanes:forward"),
                                     tag("access:forward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));
    restriction_color_forward_1: eval(((prop(temp_length)>0) && ((get(prop(temp_list),0)="no") || (get(prop(temp_list),0)="private")))?prop(style_noaccess_color):prop(restriction_color_forward_1));
    restriction_color_forward_2: eval(((prop(temp_length)>0) && ((get(prop(temp_list),1)="no") || (get(prop(temp_list),1)="private")))?prop(style_noaccess_color):prop(restriction_color_forward_2));
    restriction_color_forward_3: eval(((prop(temp_length)>0) && ((get(prop(temp_list),2)="no") || (get(prop(temp_list),2)="private")))?prop(style_noaccess_color):prop(restriction_color_forward_3));
    restriction_color_forward_4: eval(((prop(temp_length)>0) && ((get(prop(temp_list),3)="no") || (get(prop(temp_list),3)="private")))?prop(style_noaccess_color):prop(restriction_color_forward_4));
    restriction_color_forward_5: eval(((prop(temp_length)>0) && ((get(prop(temp_list),4)="no") || (get(prop(temp_list),4)="private")))?prop(style_noaccess_color):prop(restriction_color_forward_5));
    restriction_color_forward_6: eval(((prop(temp_length)>0) && ((get(prop(temp_list),5)="no") || (get(prop(temp_list),5)="private")))?prop(style_noaccess_color):prop(restriction_color_forward_6));
    restriction_color_forward_7: eval(((prop(temp_length)>0) && ((get(prop(temp_list),6)="no") || (get(prop(temp_list),6)="private")))?prop(style_noaccess_color):prop(restriction_color_forward_7));
    restriction_color_forward_8: eval(((prop(temp_length)>0) && ((get(prop(temp_list),7)="no") || (get(prop(temp_list),7)="private")))?prop(style_noaccess_color):prop(restriction_color_forward_8));

    /* Lane count based on :lanes values */
    tag_lanes_all_min: eval(has_tag_key("access:lanes")?min(prop(tag_lanes_all_min),prop(temp_length)):prop(tag_lanes_all_min));
    tag_lanes_all_max: eval(has_tag_key("access:lanes")?max(prop(tag_lanes_all_max),prop(temp_length)):prop(tag_lanes_all_max));
    tag_lanes_fwd_min: eval(has_tag_key("access:lanes:forward")?min(prop(tag_lanes_fwd_min),prop(temp_length)):prop(tag_lanes_fwd_min));
    tag_lanes_fwd_max: eval(has_tag_key("access:lanes:forward")?max(prop(tag_lanes_fwd_max),prop(temp_length)):prop(tag_lanes_fwd_max));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Access=no backward lanes                                                                                                                        */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["access:lanes:backward"],
way|z17-[is_prop_set(ok)]["access:backward"],
way|z17-[is_prop_set(ok)]["access:lanes"][prop(oneway_type)=(-1)],
way|z17-[is_prop_set(ok)]["access"][prop(oneway_type)=(-1)]
{
    temp: eval(cond(has_tag_key("access:lanes"),tag("access:lanes"),
                                cond(has_tag_key("access"),tag("access"),
                                cond(has_tag_key("access:lanes:backward"),tag("access:lanes:backward"),
                                     tag("access:backward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));
    restriction_color_backward_1: eval(((prop(temp_length)>0) && ((get(prop(temp_list),0)="no") || (get(prop(temp_list),0)="private")))?prop(style_noaccess_color):prop(restriction_color_backward_1));
    restriction_color_backward_2: eval(((prop(temp_length)>0) && ((get(prop(temp_list),1)="no") || (get(prop(temp_list),1)="private")))?prop(style_noaccess_color):prop(restriction_color_backward_2));
    restriction_color_backward_3: eval(((prop(temp_length)>0) && ((get(prop(temp_list),2)="no") || (get(prop(temp_list),2)="private")))?prop(style_noaccess_color):prop(restriction_color_backward_3));
    restriction_color_backward_4: eval(((prop(temp_length)>0) && ((get(prop(temp_list),3)="no") || (get(prop(temp_list),3)="private")))?prop(style_noaccess_color):prop(restriction_color_backward_4));
    restriction_color_backward_5: eval(((prop(temp_length)>0) && ((get(prop(temp_list),4)="no") || (get(prop(temp_list),4)="private")))?prop(style_noaccess_color):prop(restriction_color_backward_5));
    restriction_color_backward_6: eval(((prop(temp_length)>0) && ((get(prop(temp_list),5)="no") || (get(prop(temp_list),5)="private")))?prop(style_noaccess_color):prop(restriction_color_backward_6));
    restriction_color_backward_7: eval(((prop(temp_length)>0) && ((get(prop(temp_list),6)="no") || (get(prop(temp_list),6)="private")))?prop(style_noaccess_color):prop(restriction_color_backward_7));
    restriction_color_backward_8: eval(((prop(temp_length)>0) && ((get(prop(temp_list),7)="no") || (get(prop(temp_list),7)="private")))?prop(style_noaccess_color):prop(restriction_color_backward_8));

    /* Lane count based on :lanes values */
    tag_lanes_all_min: eval(has_tag_key("access:lanes")?min(prop(tag_lanes_all_min),prop(temp_length)):prop(tag_lanes_all_min));
    tag_lanes_all_max: eval(has_tag_key("access:lanes")?max(prop(tag_lanes_all_max),prop(temp_length)):prop(tag_lanes_all_max));
    tag_lanes_bwd_min: eval(has_tag_key("access:lanes:backward")?min(prop(tag_lanes_bwd_min),prop(temp_length)):prop(tag_lanes_bwd_min));
    tag_lanes_bwd_max: eval(has_tag_key("access:lanes:backward")?max(prop(tag_lanes_bwd_max),prop(temp_length)):prop(tag_lanes_bwd_max));
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Lane designation                                                                                                                                */
/* TODO: both_ways is not implemented                                                                                                              */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Bus forward lanes                                                                                                                               */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["bus:lanes:forward"],
way|z17-[is_prop_set(ok)]["bus:forward"],
way|z17-[is_prop_set(ok)]["bus:lanes"][prop(oneway_type)=1],
way|z17-[is_prop_set(ok)]["bus"][prop(oneway_type)=1]
{
    temp: eval(cond(has_tag_key("bus:lanes"),tag("bus:lanes"),
                                cond(has_tag_key("bus"),tag("bus"),
                                cond(has_tag_key("bus:lanes:forward"),tag("bus:lanes:forward"),
                                     tag("bus:forward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));
    tempa: eval(cond(has_tag_key("access:lanes"),tag("access:lanes"),
                                cond(has_tag_key("access"),tag("access"),
                                cond(has_tag_key("access:lanes:forward"),tag("access:lanes:forward"),
                                     tag("access:forward")
                                    ))));
    tempa_list: eval(split("|",prop(tempa)));
    tempa_length: eval(length(prop(tempa_list)));

    sign_forward_1: eval(((prop(temp_length)>0) && ((get(prop(temp_list),0)="designated") || ((get(prop(temp_list),0)="yes") && (get(prop(tempa_list),0)="no"))))?concat(prop(sign_forward_1),";images/bus forward.png"):prop(sign_forward_1));
    sign_forward_2: eval(((prop(temp_length)>1) && ((get(prop(temp_list),1)="designated") || ((get(prop(temp_list),1)="yes") && (get(prop(tempa_list),1)="no"))))?concat(prop(sign_forward_2),";images/bus forward.png"):prop(sign_forward_2));
    sign_forward_3: eval(((prop(temp_length)>2) && ((get(prop(temp_list),2)="designated") || ((get(prop(temp_list),2)="yes") && (get(prop(tempa_list),2)="no"))))?concat(prop(sign_forward_3),";images/bus forward.png"):prop(sign_forward_3));
    sign_forward_4: eval(((prop(temp_length)>3) && ((get(prop(temp_list),3)="designated") || ((get(prop(temp_list),3)="yes") && (get(prop(tempa_list),3)="no"))))?concat(prop(sign_forward_4),";images/bus forward.png"):prop(sign_forward_4));
    sign_forward_5: eval(((prop(temp_length)>4) && ((get(prop(temp_list),4)="designated") || ((get(prop(temp_list),4)="yes") && (get(prop(tempa_list),4)="no"))))?concat(prop(sign_forward_5),";images/bus forward.png"):prop(sign_forward_5));
    sign_forward_6: eval(((prop(temp_length)>5) && ((get(prop(temp_list),5)="designated") || ((get(prop(temp_list),5)="yes") && (get(prop(tempa_list),5)="no"))))?concat(prop(sign_forward_6),";images/bus forward.png"):prop(sign_forward_6));
    sign_forward_7: eval(((prop(temp_length)>6) && ((get(prop(temp_list),6)="designated") || ((get(prop(temp_list),6)="yes") && (get(prop(tempa_list),6)="no"))))?concat(prop(sign_forward_7),";images/bus forward.png"):prop(sign_forward_7));
    sign_forward_8: eval(((prop(temp_length)>7) && ((get(prop(temp_list),7)="designated") || ((get(prop(temp_list),7)="yes") && (get(prop(tempa_list),7)="no"))))?concat(prop(sign_forward_8),";images/bus forward.png"):prop(sign_forward_8));

    /* Lane count based on :lanes values */
    tag_lanes_all_min: eval(has_tag_key("bus:lanes")?min(prop(tag_lanes_all_min),prop(temp_length)):prop(tag_lanes_all_min));
    tag_lanes_all_max: eval(has_tag_key("bus:lanes")?max(prop(tag_lanes_all_max),prop(temp_length)):prop(tag_lanes_all_max));
    tag_lanes_fwd_min: eval(has_tag_key("bus:lanes:forward")?min(prop(tag_lanes_fwd_min),prop(temp_length)):prop(tag_lanes_fwd_min));
    tag_lanes_fwd_max: eval(has_tag_key("bus:lanes:forward")?max(prop(tag_lanes_fwd_max),prop(temp_length)):prop(tag_lanes_fwd_max));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Bus backward lanes                                                                                                                              */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["bus:lanes:backward"],
way|z17-[is_prop_set(ok)]["bus:backward"],
way|z17-[is_prop_set(ok)]["bus:lanes"][prop(oneway_type)=(-1)],
way|z17-[is_prop_set(ok)]["bus"][prop(oneway_type)=(-1)]
{
    temp: eval(cond(has_tag_key("bus:lanes"),tag("bus:lanes"),
                                cond(has_tag_key("bus"),tag("bus"),
                                cond(has_tag_key("bus:lanes:backward"),tag("bus:lanes:backward"),
                                     tag("bus:backward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));
    /* TODO: oneway=-1*/
    tempa: eval(cond(has_tag_key("access:lanes:backward"),tag("access:lanes:backward"),tag("access:backward")));
    tempa_list: eval(split("|",prop(tempa)));
    tempa_length: eval(length(prop(tempa_list)));

    sign_backward_1: eval(((prop(temp_length)>0) && ((get(prop(temp_list),0)="designated") || ((get(prop(temp_list),0)="yes") && (get(prop(tempa_list),0)="no"))))?concat(prop(sign_backward_1),";images/bus backward.png"):prop(sign_backward_1));
    sign_backward_2: eval(((prop(temp_length)>1) && ((get(prop(temp_list),1)="designated") || ((get(prop(temp_list),1)="yes") && (get(prop(tempa_list),1)="no"))))?concat(prop(sign_backward_2),";images/bus backward.png"):prop(sign_backward_2));
    sign_backward_3: eval(((prop(temp_length)>2) && ((get(prop(temp_list),2)="designated") || ((get(prop(temp_list),2)="yes") && (get(prop(tempa_list),2)="no"))))?concat(prop(sign_backward_3),";images/bus backward.png"):prop(sign_backward_3));
    sign_backward_4: eval(((prop(temp_length)>3) && ((get(prop(temp_list),3)="designated") || ((get(prop(temp_list),3)="yes") && (get(prop(tempa_list),3)="no"))))?concat(prop(sign_backward_4),";images/bus backward.png"):prop(sign_backward_4));
    sign_backward_5: eval(((prop(temp_length)>4) && ((get(prop(temp_list),4)="designated") || ((get(prop(temp_list),4)="yes") && (get(prop(tempa_list),4)="no"))))?concat(prop(sign_backward_5),";images/bus backward.png"):prop(sign_backward_5));
    sign_backward_6: eval(((prop(temp_length)>5) && ((get(prop(temp_list),5)="designated") || ((get(prop(temp_list),5)="yes") && (get(prop(tempa_list),5)="no"))))?concat(prop(sign_backward_6),";images/bus backward.png"):prop(sign_backward_6));
    sign_backward_7: eval(((prop(temp_length)>6) && ((get(prop(temp_list),6)="designated") || ((get(prop(temp_list),6)="yes") && (get(prop(tempa_list),6)="no"))))?concat(prop(sign_backward_7),";images/bus backward.png"):prop(sign_backward_7));
    sign_backward_8: eval(((prop(temp_length)>7) && ((get(prop(temp_list),7)="designated") || ((get(prop(temp_list),7)="yes") && (get(prop(tempa_list),7)="no"))))?concat(prop(sign_backward_8),";images/bus backward.png"):prop(sign_backward_8));

    /* Lane count based on :lanes values */
    tag_lanes_bwd_min: eval(has_tag_key("bus:lanes:backward")?min(prop(tag_lanes_bwd_min),prop(temp_length)):prop(tag_lanes_bwd_min));
    tag_lanes_bwd_max: eval(has_tag_key("bus:lanes:backward")?max(prop(tag_lanes_bwd_max),prop(temp_length)):prop(tag_lanes_bwd_max));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Taxi forward lanes                                                                                                                               */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["taxi:lanes:forward"],
way|z17-[is_prop_set(ok)]["taxi:forward"],
way|z17-[is_prop_set(ok)]["taxi:lanes"][prop(oneway_type)=1],
way|z17-[is_prop_set(ok)]["taxi"][prop(oneway_type)=1]
{
    temp: eval(cond(has_tag_key("taxi:lanes"),tag("taxi:lanes"),
                                cond(has_tag_key("taxi"),tag("taxi"),
                                cond(has_tag_key("taxi:lanes:forward"),tag("taxi:lanes:forward"),
                                     tag("taxi:forward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));
    tempa: eval(cond(has_tag_key("access:lanes"),tag("access:lanes"),
                                cond(has_tag_key("access"),tag("access"),
                                cond(has_tag_key("access:lanes:forward"),tag("access:lanes:forward"),
                                     tag("access:forward")
                                    ))));
    tempa_list: eval(split("|",prop(tempa)));
    tempa_length: eval(length(prop(tempa_list)));

    sign_forward_1: eval(((prop(temp_length)>0) && ((get(prop(temp_list),0)="designated") || ((get(prop(temp_list),0)="yes") && (get(prop(tempa_list),0)="no"))))?concat(prop(sign_forward_1),";images/taxi forward.png"):prop(sign_forward_1));
    sign_forward_2: eval(((prop(temp_length)>1) && ((get(prop(temp_list),1)="designated") || ((get(prop(temp_list),1)="yes") && (get(prop(tempa_list),1)="no"))))?concat(prop(sign_forward_2),";images/taxi forward.png"):prop(sign_forward_2));
    sign_forward_3: eval(((prop(temp_length)>2) && ((get(prop(temp_list),2)="designated") || ((get(prop(temp_list),2)="yes") && (get(prop(tempa_list),2)="no"))))?concat(prop(sign_forward_3),";images/taxi forward.png"):prop(sign_forward_3));
    sign_forward_4: eval(((prop(temp_length)>3) && ((get(prop(temp_list),3)="designated") || ((get(prop(temp_list),3)="yes") && (get(prop(tempa_list),3)="no"))))?concat(prop(sign_forward_4),";images/taxi forward.png"):prop(sign_forward_4));
    sign_forward_5: eval(((prop(temp_length)>4) && ((get(prop(temp_list),4)="designated") || ((get(prop(temp_list),4)="yes") && (get(prop(tempa_list),4)="no"))))?concat(prop(sign_forward_5),";images/taxi forward.png"):prop(sign_forward_5));
    sign_forward_6: eval(((prop(temp_length)>5) && ((get(prop(temp_list),5)="designated") || ((get(prop(temp_list),5)="yes") && (get(prop(tempa_list),5)="no"))))?concat(prop(sign_forward_6),";images/taxi forward.png"):prop(sign_forward_6));
    sign_forward_7: eval(((prop(temp_length)>6) && ((get(prop(temp_list),6)="designated") || ((get(prop(temp_list),6)="yes") && (get(prop(tempa_list),6)="no"))))?concat(prop(sign_forward_7),";images/taxi forward.png"):prop(sign_forward_7));
    sign_forward_8: eval(((prop(temp_length)>7) && ((get(prop(temp_list),7)="designated") || ((get(prop(temp_list),7)="yes") && (get(prop(tempa_list),7)="no"))))?concat(prop(sign_forward_8),";images/taxi forward.png"):prop(sign_forward_8));

    /* Lane count based on :lanes values */
    tag_lanes_all_min: eval(has_tag_key("taxi:lanes")?min(prop(tag_lanes_all_min),prop(temp_length)):prop(tag_lanes_all_min));
    tag_lanes_all_max: eval(has_tag_key("taxi:lanes")?max(prop(tag_lanes_all_max),prop(temp_length)):prop(tag_lanes_all_max));
    tag_lanes_fwd_min: eval(has_tag_key("taxi:lanes:forward")?min(prop(tag_lanes_fwd_min),prop(temp_length)):prop(tag_lanes_fwd_min));
    tag_lanes_fwd_max: eval(has_tag_key("taxi:lanes:forward")?max(prop(tag_lanes_fwd_max),prop(temp_length)):prop(tag_lanes_fwd_max));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Taxi backward lanes                                                                                                                              */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["taxi:lanes:backward"],
way|z17-[is_prop_set(ok)]["taxi:backward"],
way|z17-[is_prop_set(ok)]["taxi:lanes"][prop(oneway_type)=(-1)],
way|z17-[is_prop_set(ok)]["taxi"][prop(oneway_type)=(-1)]
{
    temp: eval(cond(has_tag_key("taxi:lanes"),tag("taxi:lanes"),
                                cond(has_tag_key("taxi"),tag("taxi"),
                                cond(has_tag_key("taxi:lanes:backward"),tag("taxi:lanes:backward"),
                                     tag("taxi:backward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));
    /* TODO: oneway=-1*/
    tempa: eval(cond(has_tag_key("access:lanes:backward"),tag("access:lanes:backward"),tag("access:backward")));
    tempa_list: eval(split("|",prop(tempa)));
    tempa_length: eval(length(prop(tempa_list)));

    sign_backward_1: eval(((prop(temp_length)>0) && ((get(prop(temp_list),0)="designated") || ((get(prop(temp_list),0)="yes") && (get(prop(tempa_list),0)="no"))))?concat(prop(sign_backward_1),";images/taxi backward.png"):prop(sign_backward_1));
    sign_backward_2: eval(((prop(temp_length)>1) && ((get(prop(temp_list),1)="designated") || ((get(prop(temp_list),1)="yes") && (get(prop(tempa_list),1)="no"))))?concat(prop(sign_backward_2),";images/taxi backward.png"):prop(sign_backward_2));
    sign_backward_3: eval(((prop(temp_length)>2) && ((get(prop(temp_list),2)="designated") || ((get(prop(temp_list),2)="yes") && (get(prop(tempa_list),2)="no"))))?concat(prop(sign_backward_3),";images/taxi backward.png"):prop(sign_backward_3));
    sign_backward_4: eval(((prop(temp_length)>3) && ((get(prop(temp_list),3)="designated") || ((get(prop(temp_list),3)="yes") && (get(prop(tempa_list),3)="no"))))?concat(prop(sign_backward_4),";images/taxi backward.png"):prop(sign_backward_4));
    sign_backward_5: eval(((prop(temp_length)>4) && ((get(prop(temp_list),4)="designated") || ((get(prop(temp_list),4)="yes") && (get(prop(tempa_list),4)="no"))))?concat(prop(sign_backward_5),";images/taxi backward.png"):prop(sign_backward_5));
    sign_backward_6: eval(((prop(temp_length)>5) && ((get(prop(temp_list),5)="designated") || ((get(prop(temp_list),5)="yes") && (get(prop(tempa_list),5)="no"))))?concat(prop(sign_backward_6),";images/taxi backward.png"):prop(sign_backward_6));
    sign_backward_7: eval(((prop(temp_length)>6) && ((get(prop(temp_list),6)="designated") || ((get(prop(temp_list),6)="yes") && (get(prop(tempa_list),6)="no"))))?concat(prop(sign_backward_7),";images/taxi backward.png"):prop(sign_backward_7));
    sign_backward_8: eval(((prop(temp_length)>7) && ((get(prop(temp_list),7)="designated") || ((get(prop(temp_list),7)="yes") && (get(prop(tempa_list),7)="no"))))?concat(prop(sign_backward_8),";images/taxi backward.png"):prop(sign_backward_8));

    /* Lane count based on :lanes values */
    tag_lanes_bwd_min: eval(has_tag_key("taxi:lanes:backward")?min(prop(tag_lanes_bwd_min),prop(temp_length)):prop(tag_lanes_bwd_min));
    tag_lanes_bwd_max: eval(has_tag_key("taxi:lanes:backward")?max(prop(tag_lanes_bwd_max),prop(temp_length)):prop(tag_lanes_bwd_max));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* PSV forward lanes                                                                                                                               */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["psv:lanes:forward"],
way|z17-[is_prop_set(ok)]["psv:forward"],
way|z17-[is_prop_set(ok)]["psv:lanes"][prop(oneway_type)=1],
way|z17-[is_prop_set(ok)]["psv"][prop(oneway_type)=1]
{
    temp: eval(cond(has_tag_key("psv:lanes"),tag("psv:lanes"),
                                cond(has_tag_key("psv"),tag("psv"),
                                cond(has_tag_key("psv:lanes:forward"),tag("psv:lanes:forward"),
                                     tag("psv:forward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));
    tempa: eval(cond(has_tag_key("access:lanes"),tag("access:lanes"),
                                cond(has_tag_key("access"),tag("access"),
                                cond(has_tag_key("access:lanes:forward"),tag("access:lanes:forward"),
                                     tag("access:forward")
                                    ))));
    tempa_list: eval(split("|",prop(tempa)));
    tempa_length: eval(length(prop(tempa_list)));

    sign_forward_1: eval(((prop(temp_length)>0) && ((get(prop(temp_list),0)="designated") || ((get(prop(temp_list),0)="yes") && (get(prop(tempa_list),0)="no"))))?concat(prop(sign_forward_1),";images/psv forward.png"):prop(sign_forward_1));
    sign_forward_2: eval(((prop(temp_length)>1) && ((get(prop(temp_list),1)="designated") || ((get(prop(temp_list),1)="yes") && (get(prop(tempa_list),1)="no"))))?concat(prop(sign_forward_2),";images/psv forward.png"):prop(sign_forward_2));
    sign_forward_3: eval(((prop(temp_length)>2) && ((get(prop(temp_list),2)="designated") || ((get(prop(temp_list),2)="yes") && (get(prop(tempa_list),2)="no"))))?concat(prop(sign_forward_3),";images/psv forward.png"):prop(sign_forward_3));
    sign_forward_4: eval(((prop(temp_length)>3) && ((get(prop(temp_list),3)="designated") || ((get(prop(temp_list),3)="yes") && (get(prop(tempa_list),3)="no"))))?concat(prop(sign_forward_4),";images/psv forward.png"):prop(sign_forward_4));
    sign_forward_5: eval(((prop(temp_length)>4) && ((get(prop(temp_list),4)="designated") || ((get(prop(temp_list),4)="yes") && (get(prop(tempa_list),4)="no"))))?concat(prop(sign_forward_5),";images/psv forward.png"):prop(sign_forward_5));
    sign_forward_6: eval(((prop(temp_length)>5) && ((get(prop(temp_list),5)="designated") || ((get(prop(temp_list),5)="yes") && (get(prop(tempa_list),5)="no"))))?concat(prop(sign_forward_6),";images/psv forward.png"):prop(sign_forward_6));
    sign_forward_7: eval(((prop(temp_length)>6) && ((get(prop(temp_list),6)="designated") || ((get(prop(temp_list),6)="yes") && (get(prop(tempa_list),6)="no"))))?concat(prop(sign_forward_7),";images/psv forward.png"):prop(sign_forward_7));
    sign_forward_8: eval(((prop(temp_length)>7) && ((get(prop(temp_list),7)="designated") || ((get(prop(temp_list),7)="yes") && (get(prop(tempa_list),7)="no"))))?concat(prop(sign_forward_8),";images/psv forward.png"):prop(sign_forward_8));

    /* Lane count based on :lanes values */
    tag_lanes_all_min: eval(has_tag_key("psv:lanes")?min(prop(tag_lanes_all_min),prop(temp_length)):prop(tag_lanes_all_min));
    tag_lanes_all_max: eval(has_tag_key("psv:lanes")?max(prop(tag_lanes_all_max),prop(temp_length)):prop(tag_lanes_all_max));
    tag_lanes_fwd_min: eval(has_tag_key("psv:lanes:forward")?min(prop(tag_lanes_fwd_min),prop(temp_length)):prop(tag_lanes_fwd_min));
    tag_lanes_fwd_max: eval(has_tag_key("psv:lanes:forward")?max(prop(tag_lanes_fwd_max),prop(temp_length)):prop(tag_lanes_fwd_max));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* PSV backward lanes                                                                                                                              */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["psv:lanes:backward"],
way|z17-[is_prop_set(ok)]["psv:backward"],
way|z17-[is_prop_set(ok)]["psv:lanes"][prop(oneway_type)=(-1)],
way|z17-[is_prop_set(ok)]["psv"][prop(oneway_type)=(-1)]
{
    temp: eval(cond(has_tag_key("psv:lanes"),tag("psv:lanes"),
                                cond(has_tag_key("psv"),tag("psv"),
                                cond(has_tag_key("psv:lanes:backward"),tag("psv:lanes:backward"),
                                     tag("psv:backward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));
    /* TODO: oneway=-1*/
    tempa: eval(cond(has_tag_key("access:lanes:backward"),tag("access:lanes:backward"),tag("access:backward")));
    tempa_list: eval(split("|",prop(tempa)));
    tempa_length: eval(length(prop(tempa_list)));

    sign_backward_1: eval(((prop(temp_length)>0) && ((get(prop(temp_list),0)="designated") || ((get(prop(temp_list),0)="yes") && (get(prop(tempa_list),0)="no"))))?concat(prop(sign_backward_1),";images/psv backward.png"):prop(sign_backward_1));
    sign_backward_2: eval(((prop(temp_length)>1) && ((get(prop(temp_list),1)="designated") || ((get(prop(temp_list),1)="yes") && (get(prop(tempa_list),1)="no"))))?concat(prop(sign_backward_2),";images/psv backward.png"):prop(sign_backward_2));
    sign_backward_3: eval(((prop(temp_length)>2) && ((get(prop(temp_list),2)="designated") || ((get(prop(temp_list),2)="yes") && (get(prop(tempa_list),2)="no"))))?concat(prop(sign_backward_3),";images/psv backward.png"):prop(sign_backward_3));
    sign_backward_4: eval(((prop(temp_length)>3) && ((get(prop(temp_list),3)="designated") || ((get(prop(temp_list),3)="yes") && (get(prop(tempa_list),3)="no"))))?concat(prop(sign_backward_4),";images/psv backward.png"):prop(sign_backward_4));
    sign_backward_5: eval(((prop(temp_length)>4) && ((get(prop(temp_list),4)="designated") || ((get(prop(temp_list),4)="yes") && (get(prop(tempa_list),4)="no"))))?concat(prop(sign_backward_5),";images/psv backward.png"):prop(sign_backward_5));
    sign_backward_6: eval(((prop(temp_length)>5) && ((get(prop(temp_list),5)="designated") || ((get(prop(temp_list),5)="yes") && (get(prop(tempa_list),5)="no"))))?concat(prop(sign_backward_6),";images/psv backward.png"):prop(sign_backward_6));
    sign_backward_7: eval(((prop(temp_length)>6) && ((get(prop(temp_list),6)="designated") || ((get(prop(temp_list),6)="yes") && (get(prop(tempa_list),6)="no"))))?concat(prop(sign_backward_7),";images/psv backward.png"):prop(sign_backward_7));
    sign_backward_8: eval(((prop(temp_length)>7) && ((get(prop(temp_list),7)="designated") || ((get(prop(temp_list),7)="yes") && (get(prop(tempa_list),7)="no"))))?concat(prop(sign_backward_8),";images/psv backward.png"):prop(sign_backward_8));

    /* Lane count based on :lanes values */
    tag_lanes_bwd_min: eval(has_tag_key("psv:lanes:backward")?min(prop(tag_lanes_bwd_min),prop(temp_length)):prop(tag_lanes_bwd_min));
    tag_lanes_bwd_max: eval(has_tag_key("psv:lanes:backward")?max(prop(tag_lanes_bwd_max),prop(temp_length)):prop(tag_lanes_bwd_max));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Bicycle forward lanes                                                                                                                           */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["bicycle:lanes:forward"],
way|z17-[is_prop_set(ok)]["bicycle:forward"],
way|z17-[is_prop_set(ok)]["bicycle:lanes"][prop(oneway_type)=1],
way|z17-[is_prop_set(ok)]["bicycle"][prop(oneway_type)=1]
{
    temp: eval(cond(has_tag_key("bicycle:lanes"),tag("bicycle:lanes"),
                                cond(has_tag_key("bicycle"),tag("bicycle"),
                                cond(has_tag_key("bicycle:lanes:forward"),tag("bicycle:lanes:forward"),
                                     tag("bicycle:forward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));
    tempa: eval(cond(has_tag_key("access:lanes"),tag("access:lanes"),
                                cond(has_tag_key("access"),tag("access"),
                                cond(has_tag_key("access:lanes:forward"),tag("access:lanes:forward"),
                                     tag("access:forward")
                                    ))));
    tempa_list: eval(split("|",prop(tempa)));
    tempa_length: eval(length(prop(tempa_list)));

    sign_forward_1: eval(((prop(temp_length)>0) && ((get(prop(temp_list),0)="designated") || ((get(prop(temp_list),0)="yes") && (get(prop(tempa_list),0)="no"))))?concat(prop(sign_forward_1),";images/bicycle forward.png"):prop(sign_forward_1));
    sign_forward_2: eval(((prop(temp_length)>1) && ((get(prop(temp_list),1)="designated") || ((get(prop(temp_list),1)="yes") && (get(prop(tempa_list),1)="no"))))?concat(prop(sign_forward_2),";images/bicycle forward.png"):prop(sign_forward_2));
    sign_forward_3: eval(((prop(temp_length)>2) && ((get(prop(temp_list),2)="designated") || ((get(prop(temp_list),2)="yes") && (get(prop(tempa_list),2)="no"))))?concat(prop(sign_forward_3),";images/bicycle forward.png"):prop(sign_forward_3));
    sign_forward_4: eval(((prop(temp_length)>3) && ((get(prop(temp_list),3)="designated") || ((get(prop(temp_list),3)="yes") && (get(prop(tempa_list),3)="no"))))?concat(prop(sign_forward_4),";images/bicycle forward.png"):prop(sign_forward_4));
    sign_forward_5: eval(((prop(temp_length)>4) && ((get(prop(temp_list),4)="designated") || ((get(prop(temp_list),4)="yes") && (get(prop(tempa_list),4)="no"))))?concat(prop(sign_forward_5),";images/bicycle forward.png"):prop(sign_forward_5));
    sign_forward_6: eval(((prop(temp_length)>5) && ((get(prop(temp_list),5)="designated") || ((get(prop(temp_list),5)="yes") && (get(prop(tempa_list),5)="no"))))?concat(prop(sign_forward_6),";images/bicycle forward.png"):prop(sign_forward_6));
    sign_forward_7: eval(((prop(temp_length)>6) && ((get(prop(temp_list),6)="designated") || ((get(prop(temp_list),6)="yes") && (get(prop(tempa_list),6)="no"))))?concat(prop(sign_forward_7),";images/bicycle forward.png"):prop(sign_forward_7));
    sign_forward_8: eval(((prop(temp_length)>7) && ((get(prop(temp_list),7)="designated") || ((get(prop(temp_list),7)="yes") && (get(prop(tempa_list),7)="no"))))?concat(prop(sign_forward_8),";images/bicycle forward.png"):prop(sign_forward_8));

    /* Lane count based on :lanes values */
    tag_lanes_all_min: eval(has_tag_key("bicycle:lanes")?min(prop(tag_lanes_all_min),prop(temp_length)):prop(tag_lanes_all_min));
    tag_lanes_all_max: eval(has_tag_key("bicycle:lanes")?max(prop(tag_lanes_all_max),prop(temp_length)):prop(tag_lanes_all_max));
    tag_lanes_fwd_min: eval(has_tag_key("bicycle:lanes:forward")?min(prop(tag_lanes_fwd_min),prop(temp_length)):prop(tag_lanes_fwd_min));
    tag_lanes_fwd_max: eval(has_tag_key("bicycle:lanes:forward")?max(prop(tag_lanes_fwd_max),prop(temp_length)):prop(tag_lanes_fwd_max));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Bicycle backward lanes                                                                                                                          */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["bicycle:lanes:backward"],
way|z17-[is_prop_set(ok)]["bicycle:backward"],
way|z17-[is_prop_set(ok)]["bicycle:lanes"][prop(oneway_type)=(-1)],
way|z17-[is_prop_set(ok)]["bicycle"][prop(oneway_type)=(-1)]
{
    temp: eval(cond(has_tag_key("bicycle:lanes"),tag("bicycle:lanes"),
                                cond(has_tag_key("bicycle"),tag("bicycle"),
                                cond(has_tag_key("bicycle:lanes:backward"),tag("bicycle:lanes:backward"),
                                     tag("bicycle:backward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));
    /* TODO: oneway=-1*/
    tempa: eval(cond(has_tag_key("access:lanes:backward"),tag("access:lanes:backward"),tag("access:backward")));
    tempa_list: eval(split("|",prop(tempa)));
    tempa_length: eval(length(prop(tempa_list)));

    sign_backward_1: eval(((prop(temp_length)>0) && ((get(prop(temp_list),0)="designated") || ((get(prop(temp_list),0)="yes") && (get(prop(tempa_list),0)="no"))))?concat(prop(sign_backward_1),";images/bicycle backward.png"):prop(sign_backward_1));
    sign_backward_2: eval(((prop(temp_length)>1) && ((get(prop(temp_list),1)="designated") || ((get(prop(temp_list),1)="yes") && (get(prop(tempa_list),1)="no"))))?concat(prop(sign_backward_2),";images/bicycle backward.png"):prop(sign_backward_2));
    sign_backward_3: eval(((prop(temp_length)>2) && ((get(prop(temp_list),2)="designated") || ((get(prop(temp_list),2)="yes") && (get(prop(tempa_list),2)="no"))))?concat(prop(sign_backward_3),";images/bicycle backward.png"):prop(sign_backward_3));
    sign_backward_4: eval(((prop(temp_length)>3) && ((get(prop(temp_list),3)="designated") || ((get(prop(temp_list),3)="yes") && (get(prop(tempa_list),3)="no"))))?concat(prop(sign_backward_4),";images/bicycle backward.png"):prop(sign_backward_4));
    sign_backward_5: eval(((prop(temp_length)>4) && ((get(prop(temp_list),4)="designated") || ((get(prop(temp_list),4)="yes") && (get(prop(tempa_list),4)="no"))))?concat(prop(sign_backward_5),";images/bicycle backward.png"):prop(sign_backward_5));
    sign_backward_6: eval(((prop(temp_length)>5) && ((get(prop(temp_list),5)="designated") || ((get(prop(temp_list),5)="yes") && (get(prop(tempa_list),5)="no"))))?concat(prop(sign_backward_6),";images/bicycle backward.png"):prop(sign_backward_6));
    sign_backward_7: eval(((prop(temp_length)>6) && ((get(prop(temp_list),6)="designated") || ((get(prop(temp_list),6)="yes") && (get(prop(tempa_list),6)="no"))))?concat(prop(sign_backward_7),";images/bicycle backward.png"):prop(sign_backward_7));
    sign_backward_8: eval(((prop(temp_length)>7) && ((get(prop(temp_list),7)="designated") || ((get(prop(temp_list),7)="yes") && (get(prop(tempa_list),7)="no"))))?concat(prop(sign_backward_8),";images/bicycle backward.png"):prop(sign_backward_8));

    /* Lane count based on :lanes values */
    tag_lanes_bwd_min: eval(has_tag_key("bicycle:lanes:backward")?min(prop(tag_lanes_bwd_min),prop(temp_length)):prop(tag_lanes_bwd_min));
    tag_lanes_bwd_max: eval(has_tag_key("bicycle:lanes:backward")?max(prop(tag_lanes_bwd_max),prop(temp_length)):prop(tag_lanes_bwd_max));
}


/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* HOV forward lanes                                                                                                                               */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["hov:lanes:forward"],
way|z17-[is_prop_set(ok)]["hov:forward"],
way|z17-[is_prop_set(ok)]["hov:lanes"][prop(oneway_type)=1],
way|z17-[is_prop_set(ok)]["hov"][prop(oneway_type)=1]
{
    temp: eval(cond(has_tag_key("hov:lanes"),tag("hov:lanes"),
                                cond(has_tag_key("hov:lanes:forward"),tag("hov:lanes:forward"),
                                cond(has_tag_key("hov"),tag("hov"),
                                     tag("hov:forward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));
    hov_minimum: eval(has_tag_key("hov:minimum:forward")?tag("hov:minimum:forward"):(has_tag_key("hov:minimum")?tag("hov:minimum"):0));
    hov_image: eval((prop(hov_minimum)=2)?";images/hov2 forward.png":((prop(hov_minimum)=3)?";images/hov3 forward.png":";images/hov forward.png"));

    t:              eval(get(prop(temp_list),0));
    sign_forward_1: eval(((prop(temp_length)>0) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_forward_1),prop(hov_image)):prop(sign_forward_1));
    t:              eval(get(prop(temp_list),1));
    sign_forward_2: eval(((prop(temp_length)>1) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_forward_2),prop(hov_image)):prop(sign_forward_2));
    t:              eval(get(prop(temp_list),2));
    sign_forward_3: eval(((prop(temp_length)>2) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_forward_3),prop(hov_image)):prop(sign_forward_3));
    t:              eval(get(prop(temp_list),3));
    sign_forward_4: eval(((prop(temp_length)>3) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_forward_4),prop(hov_image)):prop(sign_forward_4));
    t:              eval(get(prop(temp_list),4));
    sign_forward_5: eval(((prop(temp_length)>4) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_forward_5),prop(hov_image)):prop(sign_forward_5));
    t:              eval(get(prop(temp_list),5));
    sign_forward_6: eval(((prop(temp_length)>5) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_forward_6),prop(hov_image)):prop(sign_forward_6));
    t:              eval(get(prop(temp_list),6));
    sign_forward_7: eval(((prop(temp_length)>6) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_forward_7),prop(hov_image)):prop(sign_forward_7));
    t:              eval(get(prop(temp_list),7));
    sign_forward_8: eval(((prop(temp_length)>7) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_forward_8),prop(hov_image)):prop(sign_forward_8));

    /* Lane count based on :lanes values */
    tag_lanes_all_min: eval(has_tag_key("hov:lanes")?min(prop(tag_lanes_all_min),prop(temp_length)):prop(tag_lanes_all_min));
    tag_lanes_all_max: eval(has_tag_key("hov:lanes")?max(prop(tag_lanes_all_max),prop(temp_length)):prop(tag_lanes_all_max));
    tag_lanes_fwd_min: eval(has_tag_key("hov:lanes:forward")?min(prop(tag_lanes_fwd_min),prop(temp_length)):prop(tag_lanes_fwd_min));
    tag_lanes_fwd_max: eval(has_tag_key("hov:lanes:forward")?max(prop(tag_lanes_fwd_max),prop(temp_length)):prop(tag_lanes_fwd_max));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* HOV backward lanes                                                                                                                               */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["hov:lanes:backward"],
way|z17-[is_prop_set(ok)]["hov:backward"],
way|z17-[is_prop_set(ok)]["hov:lanes"][prop(oneway_type)=(-1)],
way|z17-[is_prop_set(ok)]["hov"][prop(oneway_type)=(-1)]
{
    temp: eval(cond(has_tag_key("hov:lanes"),tag("hov:lanes"),
                                cond(has_tag_key("hov"),tag("hov"),
                                cond(has_tag_key("hov:lanes:backward"),tag("hov:lanes:backward"),
                                     tag("hov:backward")
                                    ))));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));
    hov_minimum: eval(has_tag_key("hov:minimum:backward")?tag("hov:minimum:backward"):(has_tag_key("hov:minimum")?tag("hov:minimum"):0));
    hov_image: eval((prop(hov_minimum)=2)?";images/hov2 backward.png":((prop(hov_minimum)=3)?";images/hov3 backward.png":";images/hov backward.png"));

    t:              eval(get(prop(temp_list),0));
    sign_backward_1: eval(((prop(temp_length)>0) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_backward_1),prop(hov_image)):prop(sign_backward_1));
    t:              eval(get(prop(temp_list),1));
    sign_backward_2: eval(((prop(temp_length)>1) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_backward_2),prop(hov_image)):prop(sign_backward_2));
    t:              eval(get(prop(temp_list),2));
    sign_backward_3: eval(((prop(temp_length)>2) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_backward_3),prop(hov_image)):prop(sign_backward_3));
    t:              eval(get(prop(temp_list),3));
    sign_backward_4: eval(((prop(temp_length)>3) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_backward_4),prop(hov_image)):prop(sign_backward_4));
    t:              eval(get(prop(temp_list),4));
    sign_backward_5: eval(((prop(temp_length)>4) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_backward_5),prop(hov_image)):prop(sign_backward_5));
    t:              eval(get(prop(temp_list),5));
    sign_backward_6: eval(((prop(temp_length)>5) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_backward_6),prop(hov_image)):prop(sign_backward_6));
    t:              eval(get(prop(temp_list),6));
    sign_backward_7: eval(((prop(temp_length)>6) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_backward_7),prop(hov_image)):prop(sign_backward_7));
    t:              eval(get(prop(temp_list),7));
    sign_backward_8: eval(((prop(temp_length)>7) && ((prop(t)="designated") || (prop(t)="lane")))?concat(prop(sign_backward_8),prop(hov_image)):prop(sign_backward_8));

    /* Lane count based on :lanes values */
    tag_lanes_all_min: eval(has_tag_key("hov:lanes")?min(prop(tag_lanes_all_min),prop(temp_length)):prop(tag_lanes_all_min));
    tag_lanes_all_max: eval(has_tag_key("hov:lanes")?max(prop(tag_lanes_all_max),prop(temp_length)):prop(tag_lanes_all_max));
    tag_lanes_bwd_min: eval(has_tag_key("hov:lanes:backward")?min(prop(tag_lanes_bwd_min),prop(temp_length)):prop(tag_lanes_bwd_min));
    tag_lanes_bwd_max: eval(has_tag_key("hov:lanes:backward")?max(prop(tag_lanes_bwd_max),prop(temp_length)):prop(tag_lanes_bwd_max));
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Check of the number of lane-dependent width                                                                                                     */
/* The calculation itself depends on the lane count and therefore is done AFTER the determination of the lane count                                */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
way|z17-["width:lanes:forward"],
way|z17-["width:lanes"][prop(oneway_type)=1]
{
    temp: eval(cond(has_tag_key("width:lanes:forward"),tag("width:lanes:forward"),tag("width:lanes")));
    temp_length: eval(length(split("|",prop(temp))));

    /* Lane count based on :lanes values */
    tag_lanes_fwd_min: eval(min(prop(tag_lanes_fwd_min),prop(temp_length)));
    tag_lanes_fwd_max: eval(max(prop(tag_lanes_fwd_max),prop(temp_length)));
}
way|z17-["width:lanes:backward"],
way|z17-["width:lanes"][prop(oneway_type)=(-1)]
{
    temp: eval(cond(has_tag_key("width:lanes:backward"),tag("width:lanes:backward"),tag("width:lanes")));
    temp_length: eval(length(split("|",prop(temp))));

    /* Lane count based on :lanes values */
    tag_lanes_bwd_min: eval(min(prop(tag_lanes_bwd_min),prop(temp_length)));
    tag_lanes_bwd_max: eval(max(prop(tag_lanes_bwd_max),prop(temp_length)));
}
way|z17-["width:lanes:both_ways"]
{
    temp: eval(tag("width:lanes:both_ways"));
    temp_length: eval(length(split("|",prop(temp))));

    /* Lane count based on :lanes values */
    tag_lanes_both_min: eval(min(prop(tag_lanes_both_min),prop(temp_length)));
    tag_lanes_both_max: eval(max(prop(tag_lanes_both_max),prop(temp_length)));
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Retrieve the lane count from the lanes key, its subkeys and the :lanes-tags                                                                     */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
way[is_prop_set(ok)][lanes]             { lanes_all:  tag(lanes);}
way[is_prop_set(ok)]["lanes:forward"]   { lanes_fwd:  tag("lanes:forward");}
way[is_prop_set(ok)]["lanes:backward"]  { lanes_bwd:  tag("lanes:backward");}
way[is_prop_set(ok)]["lanes:both_ways"] { lanes_both: tag("lanes:both_ways");}

/* Nothing specified */
way[is_prop_set(ok)][prop(oneway_type)=0][!lanes][!"lanes:backward"][!"lanes:both_ways"][!"lanes:forward"]
        { lanes_all: 2; lanes_fwd: 1; lanes_bwd: 1; lanes_both: 0; }
way[is_prop_set(ok)][prop(oneway_type)=1][!lanes][!"lanes:backward"][!"lanes:both_ways"][!"lanes:forward"]
        { lanes_all: 1; lanes_fwd: 1; lanes_bwd: 0; lanes_both: 0; }
way[is_prop_set(ok)][prop(oneway_type)=(-1)][!lanes][!"lanes:backward"][!"lanes:both_ways"][!"lanes:forward"]
        { lanes_all: 1; lanes_fwd: 0; lanes_bwd: 1; lanes_both: 0; }

/* One-ways */
way[is_prop_set(ok)][lanes][!"lanes:forward"][!"lanes:backward"][!"lanes:both_ways"][prop(oneway_type)=1]
        { lanes_fwd: prop(lanes_all); lanes_bwd: 0; lanes_both: 0; }
way[is_prop_set(ok)][lanes][!"lanes:forward"][!"lanes:backward"][!"lanes:both_ways"][prop(oneway_type)=(-1)]
        { lanes_bwd: prop(lanes_all); lanes_fwd: 0; lanes_both: 0; }

way[is_prop_set(ok)][!lanes]["lanes:forward"][!"lanes:backward"][!"lanes:both_ways"][prop(oneway_type)=1]  
        { lanes_all: prop(lanes_fwd); lanes_bwd: 0; lanes_both: 0; }
way[is_prop_set(ok)][!lanes][!"lanes:forward"]["lanes:backward"][!"lanes:both_ways"][prop(oneway_type)=(-1)]
        { lanes_all: prop(lanes_bwd); lanes_fwd: 0; lanes_both: 0; }

/* One count besides both_ways is missing  */
way[is_prop_set(ok)][lanes][!"lanes:forward"]["lanes:backward"][!"lanes:both_ways"]
        { lanes_fwd: eval((prop(lanes_all))-(prop(lanes_bwd))); lanes_both: 0; }
way[is_prop_set(ok)][lanes]["lanes:forward"][!"lanes:backward"][!"lanes:both_ways"]
        { lanes_bwd: eval((prop(lanes_all))-(prop(lanes_fwd))); lanes_both: 0;}
way[is_prop_set(ok)][!lanes]["lanes:forward"]["lanes:backward"][!"lanes:both_ways"]
        { lanes_all: eval((prop(lanes_fwd))+(prop(lanes_bwd))); lanes_both: 0; }

/* One count is missing  */
way[is_prop_set(ok)][lanes]["lanes:forward"]["lanes:backward"][!"lanes:both_ways"]
        { lanes_both: eval((prop(lanes_all))-((prop(lanes_fwd))+(prop(lanes_bwd)))); }
way[is_prop_set(ok)][lanes]["lanes:forward"][!"lanes:backward"]["lanes:both_ways"]
        { lanes_bwd: eval((prop(lanes_all))-((prop(lanes_fwd))+(prop(lanes_both)))); }
way[is_prop_set(ok)][lanes][!"lanes:forward"]["lanes:backward"]["lanes:both_ways"]
        { lanes_fwd: eval((prop(lanes_all))-((prop(lanes_bwd))+(prop(lanes_both)))); }
way[is_prop_set(ok)][!lanes]["lanes:forward"]["lanes:backward"]["lanes:both_ways"]
        { lanes_all: eval((prop(lanes_fwd))+((prop(lanes_bwd))+(prop(lanes_both)))); }

/* Only the lanes tag is set */
way[is_prop_set(ok)][prop(oneway_type)=0][lanes][!"lanes:backward"][!"lanes:both_ways"][!"lanes:forward"]
{

    lanes_fwd:  eval(max(1,floor(tag(lanes)/2)));
    lanes_bwd:  eval(floor(tag(lanes)/2));
    lanes_both: eval((prop(lanes_all))-(prop(lanes_fwd))-(prop(lanes_bwd)));
}

/* Safety check and adding lanes for "non-motorized or non-general traffic" */
way[is_prop_set(ok)]
{
    /* Check for errors */
    data_error: eval(((prop(tag_lanes_all_max)>0) && (prop(tag_lanes_all_min)<prop(tag_lanes_all_max)))?"Inconsistent <tag>:lanes":prop(data_error));
    data_error: eval(((prop(tag_lanes_fwd_max)>0) && (prop(tag_lanes_fwd_min)<prop(tag_lanes_fwd_max)))?"Inconsistent <tag>:lanes:forward":prop(data_error));
    data_error: eval(((prop(tag_lanes_bwd_max)>0) && (prop(tag_lanes_bwd_min)<prop(tag_lanes_bwd_max)))?"Inconsistent <tag>:lanes:backward":prop(data_error));
    data_error: eval(((prop(tag_lanes_both_max)>0) && (prop(tag_lanes_both_min)<prop(tag_lanes_both_max)))?"Inconsistent <tag>:lanes:both_ways":prop(data_error));

    /* Safety check */
    lanes_fwd: eval(cond((prop(lanes_fwd)<0),0,prop(lanes_fwd)));
    lanes_bwd: eval(cond((prop(lanes_bwd)<0),0,prop(lanes_bwd)));
    lanes_both: eval(cond((prop(lanes_both)<0),0,prop(lanes_both)));

    /* In case of one-ways treat the number of all lanes as number of forward/backward lanes */
    tag_lanes_fwd_min: eval((prop(oneway_type)=1)?min(prop(tag_lanes_all_min),prop(tag_lanes_fwd_min)):prop(tag_lanes_fwd_min));
    tag_lanes_fwd_max: eval((prop(oneway_type)=1)?max(prop(tag_lanes_all_max),prop(tag_lanes_fwd_max)):prop(tag_lanes_fwd_max));
    tag_lanes_bwd_min: eval((prop(oneway_type)=(-1))?min(prop(tag_lanes_all_min),prop(tag_lanes_bwd_min)):prop(tag_lanes_bwd_min));
    tag_lanes_bwd_max: eval((prop(oneway_type)=(-1))?max(prop(tag_lanes_all_max),prop(tag_lanes_bwd_max)):prop(tag_lanes_bwd_max));

    /* Difference to the lane count specified by :lanes-tags */
    temp_add_fwd:  eval(max(0,prop(tag_lanes_fwd_max)-prop(lanes_fwd)));
    temp_add_bwd:  eval(max(0,prop(tag_lanes_bwd_max)-prop(lanes_bwd)));
    temp_add_both: eval(max(0,prop(tag_lanes_both_max)-prop(lanes_both)));

    /* Add the difference */
    lanes_fwd: eval(prop(lanes_fwd)+prop(temp_add_fwd));
    lanes_bwd: eval(prop(lanes_bwd)+prop(temp_add_bwd));
    lanes_both: eval(prop(lanes_both)+prop(temp_add_both));

    /* Number of all lanes */
    lanes_all: eval(max(1,((prop(lanes_fwd)+prop(lanes_bwd))+prop(lanes_both))));

    /* Check for some more errors */
    data_error: eval(((prop(tag_lanes_all_max)>0) && (prop(tag_lanes_all_min)<prop(lanes_all)))?"Missing <tag>:lanes values values":prop(data_error));
    data_error: eval(((prop(tag_lanes_fwd_max)>0) && (prop(tag_lanes_fwd_min)<prop(lanes_fwd)))?"Missing <tag>:lanes:forward values":prop(data_error));
    data_error: eval(((prop(tag_lanes_bwd_max)>0) && (prop(tag_lanes_bwd_min)<prop(lanes_bwd)))?"Missing <tag>:lanes:backward values":prop(data_error));
    data_error: eval(((prop(tag_lanes_both_max)>0) && (prop(tag_lanes_both_min)<prop(lanes_both)))?"Missing <tag>:lanes:both_ways values":prop(data_error));
}


/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Determine the width of the lanes, road markings and the inner lane width                                                                        */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17[is_prop_set(ok)]
{
    lane_min_width: 4;
    lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((prop(pixel_per_metre,"default")*tag(width))/prop(lanes_all)):(3*prop(pixel_per_metre,"default"))))); 
    change_allowed: list(6,9);
    road_marking_width: 1;
    road_marking_space: 0;
}

way|z18[is_prop_set(ok)]
{
    lane_min_width: 8;
    lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((prop(pixel_per_metre,"default")*tag(width))/prop(lanes_all)):(3*prop(pixel_per_metre,"default"))))); 
    change_allowed: list(12,18);
    road_marking_width: 2;
    road_marking_space: 1;
}

way|z19[is_prop_set(ok)]
{
    lane_min_width: 8;
    lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((prop(pixel_per_metre,"default")*tag(width))/prop(lanes_all)):(3*prop(pixel_per_metre,"default"))))); 
    change_allowed: list(24,36);
    road_marking_width: 2;
    road_marking_space: 1;
}

way|z20[is_prop_set(ok)]
{
    lane_min_width: 8;
    lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((prop(pixel_per_metre,"default")*tag(width))/prop(lanes_all)):(3*prop(pixel_per_metre,"default"))))); 
    change_allowed: list(48,72);
    road_marking_width: 2;
    road_marking_space: 2;
}

way|z21-[is_prop_set(ok)]
{
    lane_min_width: 12;
    lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((prop(pixel_per_metre,"default")*tag(width))/prop(lanes_all)):(3*prop(pixel_per_metre,"default"))))); 
    change_allowed: list(96,144);
    road_marking_width: 4;
    road_marking_space: 3;
}

way|z22-[is_prop_set(ok)]
{
    lane_min_width: 20;
    lane_default_width: eval(max(prop(lane_min_width),(has_tag_key(width)?((prop(pixel_per_metre,"default")*tag(width))/prop(lanes_all)):(3*prop(pixel_per_metre,"default"))))); 
    change_allowed: list(192,288);
    road_marking_width: 6;
    road_marking_space: 4;
}

/* Zoom indepedent variables and helpers */
way|z17-[is_prop_set(ok)]
{
    lane_casing:  eval((2*prop(road_marking_width))+prop(road_marking_space));
    change_forbidden: 0;
    change_border: eval((has_tag_key("placement") && (tag("placement")="transition"))?list(1,2):prop(change_forbidden));
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Cleanup of allowed lane changes                                                                                                                 */
/* This must be done AFTER the determination of the lanes count                                                                                    */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
way|z17-[is_prop_set(ok)]
{
    change_forward_1_right:  eval(prop(change_forward_1_right)?prop(change_allowed):prop(change_forbidden));
    change_forward_1_left:   eval(prop(change_forward_1_left)?prop(change_allowed):prop(change_forbidden));
    change_forward_2_right:  eval(prop(change_forward_2_right)?prop(change_allowed):prop(change_forbidden));
    change_forward_2_left:   eval(prop(change_forward_2_left)?prop(change_allowed):prop(change_forbidden));
    change_forward_3_right:  eval(prop(change_forward_3_right)?prop(change_allowed):prop(change_forbidden));
    change_forward_3_left:   eval(prop(change_forward_3_left)?prop(change_allowed):prop(change_forbidden));
    change_forward_4_right:  eval(prop(change_forward_4_right)?prop(change_allowed):prop(change_forbidden));
    change_forward_4_left:   eval(prop(change_forward_4_left)?prop(change_allowed):prop(change_forbidden));
    change_forward_5_right:  eval(prop(change_forward_5_right)?prop(change_allowed):prop(change_forbidden));
    change_forward_5_left:   eval(prop(change_forward_5_left)?prop(change_allowed):prop(change_forbidden));
    change_forward_6_right:  eval(prop(change_forward_6_right)?prop(change_allowed):prop(change_forbidden));
    change_forward_6_left:   eval(prop(change_forward_6_left)?prop(change_allowed):prop(change_forbidden));
    change_forward_7_right:  eval(prop(change_forward_7_right)?prop(change_allowed):prop(change_forbidden));
    change_forward_7_left:   eval(prop(change_forward_7_left)?prop(change_allowed):prop(change_forbidden));
    change_forward_8_right:  eval(prop(change_forward_8_right)?prop(change_allowed):prop(change_forbidden));
    change_forward_8_left:   eval(prop(change_forward_8_left)?prop(change_allowed):prop(change_forbidden));

    change_backward_1_right:  eval(prop(change_backward_1_right)?prop(change_allowed):prop(change_forbidden));
    change_backward_1_left:   eval(prop(change_backward_1_left)?prop(change_allowed):prop(change_forbidden));
    change_backward_2_right:  eval(prop(change_backward_2_right)?prop(change_allowed):prop(change_forbidden));
    change_backward_2_left:   eval(prop(change_backward_2_left)?prop(change_allowed):prop(change_forbidden));
    change_backward_3_right:  eval(prop(change_backward_3_right)?prop(change_allowed):prop(change_forbidden));
    change_backward_3_left:   eval(prop(change_backward_3_left)?prop(change_allowed):prop(change_forbidden));
    change_backward_4_right:  eval(prop(change_backward_4_right)?prop(change_allowed):prop(change_forbidden));
    change_backward_4_left:   eval(prop(change_backward_4_left)?prop(change_allowed):prop(change_forbidden));
    change_backward_5_right:  eval(prop(change_backward_5_right)?prop(change_allowed):prop(change_forbidden));
    change_backward_5_left:   eval(prop(change_backward_5_left)?prop(change_allowed):prop(change_forbidden));
    change_backward_6_right:  eval(prop(change_backward_6_right)?prop(change_allowed):prop(change_forbidden));
    change_backward_6_left:   eval(prop(change_backward_6_left)?prop(change_allowed):prop(change_forbidden));
    change_backward_7_right:  eval(prop(change_backward_7_right)?prop(change_allowed):prop(change_forbidden));
    change_backward_7_left:   eval(prop(change_backward_7_left)?prop(change_allowed):prop(change_forbidden));
    change_backward_8_right:  eval(prop(change_backward_8_right)?prop(change_allowed):prop(change_forbidden));
    change_backward_8_left:   eval(prop(change_backward_8_left)?prop(change_allowed):prop(change_forbidden));

    change_bothways_1_right:  eval(prop(change_bothways_1_right)?prop(change_allowed):prop(change_forbidden));
    change_bothways_1_left:   eval(prop(change_bothways_1_left)?prop(change_allowed):prop(change_forbidden));
    change_bothways_2_right:  eval(prop(change_bothways_2_right)?prop(change_allowed):prop(change_forbidden));
    change_bothways_2_left:   eval(prop(change_bothways_2_left)?prop(change_allowed):prop(change_forbidden));
    change_bothways_3_right:  eval(prop(change_bothways_3_right)?prop(change_allowed):prop(change_forbidden));
    change_bothways_3_left:   eval(prop(change_bothways_3_left)?prop(change_allowed):prop(change_forbidden));
    change_bothways_4_right:  eval(prop(change_bothways_4_right)?prop(change_allowed):prop(change_forbidden));
    change_bothways_4_left:   eval(prop(change_bothways_4_left)?prop(change_allowed):prop(change_forbidden));

    /* If two adjacent road markings would look the same, remove one  */
    change_forward_1_right:  eval(cond((prop(lanes_fwd)>1) && (prop(change_forward_2_left)=prop(change_forward_1_right)),list(0.1,999999),prop(change_forward_1_right)));
    change_forward_2_right:  eval(cond((prop(lanes_fwd)>2) && (prop(change_forward_3_left)=prop(change_forward_2_right)),list(0.1,999999),prop(change_forward_2_right)));
    change_forward_3_right:  eval(cond((prop(lanes_fwd)>3) && (prop(change_forward_4_left)=prop(change_forward_3_right)),list(0.1,999999),prop(change_forward_3_right)));
    change_forward_4_right:  eval(cond((prop(lanes_fwd)>4) && (prop(change_forward_5_left)=prop(change_forward_4_right)),list(0.1,999999),prop(change_forward_4_right)));
    change_forward_5_right:  eval(cond((prop(lanes_fwd)>5) && (prop(change_forward_6_left)=prop(change_forward_5_right)),list(0.1,999999),prop(change_forward_5_right)));
    change_forward_6_right:  eval(cond((prop(lanes_fwd)>6) && (prop(change_forward_7_left)=prop(change_forward_6_right)),list(0.1,999999),prop(change_forward_6_right)));
    change_forward_7_right:  eval(cond((prop(lanes_fwd)>7) && (prop(change_forward_8_left)=prop(change_forward_7_right)),list(0.1,999999),prop(change_forward_7_right)));

    change_backward_2_left:  eval(cond((prop(lanes_bwd)>1) && (prop(change_backward_1_right)=prop(change_backward_2_left)),list(0.1,999999),prop(change_backward_2_left)));
    change_backward_3_left:  eval(cond((prop(lanes_bwd)>2) && (prop(change_backward_2_right)=prop(change_backward_3_left)),list(0.1,999999),prop(change_backward_3_left)));
    change_backward_4_left:  eval(cond((prop(lanes_bwd)>3) && (prop(change_backward_3_right)=prop(change_backward_4_left)),list(0.1,999999),prop(change_backward_4_left)));
    change_backward_5_left:  eval(cond((prop(lanes_bwd)>4) && (prop(change_backward_4_right)=prop(change_backward_5_left)),list(0.1,999999),prop(change_backward_5_left)));
    change_backward_6_left:  eval(cond((prop(lanes_bwd)>5) && (prop(change_backward_5_right)=prop(change_backward_6_left)),list(0.1,999999),prop(change_backward_6_left)));
    change_backward_7_left:  eval(cond((prop(lanes_bwd)>6) && (prop(change_backward_6_right)=prop(change_backward_7_left)),list(0.1,999999),prop(change_backward_7_left)));
    change_backward_8_left:  eval(cond((prop(lanes_bwd)>7) && (prop(change_backward_7_right)=prop(change_backward_8_left)),list(0.1,999999),prop(change_backward_8_left)));

    change_bothways_1_right:  eval(cond((prop(lanes_fwd)>1) && (prop(change_bothways_2_left)=prop(change_bothways_1_right)),list(0.1,999999),prop(change_bothways_1_right)));
    change_bothways_2_right:  eval(cond((prop(lanes_fwd)>2) && (prop(change_bothways_3_left)=prop(change_bothways_2_right)),list(0.1,999999),prop(change_bothways_2_right)));
    change_bothways_3_right:  eval(cond((prop(lanes_fwd)>3) && (prop(change_bothways_4_left)=prop(change_bothways_3_right)),list(0.1,999999),prop(change_bothways_3_right)));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Make the borders always solid                                                                                                                   */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)][prop(style_right_hand_traffic)]
{
    change_forward_1_left:  eval(((prop(oneway_type)=1) || (prop(lanes_all)=1))?prop(change_border):prop(change_forward_1_left));
    change_backward_1_left: eval((prop(oneway_type)=(-1))?prop(change_border):prop(change_backward_1_left));
}
way|z17-[is_prop_set(ok)][!prop(style_right_hand_traffic)]
{
    change_forward_1_left:  prop(change_border);
    change_backward_1_left: prop(change_border);
    change_forward_1_right:  eval((prop(lanes_all)=1)?prop(change_border):prop(change_forward_1_right));
}
way|z17-[is_prop_set(ok)][prop(style_right_hand_traffic)],
way|z17-[is_prop_set(ok)][!prop(style_right_hand_traffic)][prop(oneway_type)=1]
{
    change_forward_1_right: eval((prop(lanes_fwd)=1)?prop(change_border):prop(change_forward_1_right));  
    change_forward_2_right: eval((prop(lanes_fwd)=2)?prop(change_border):prop(change_forward_2_right));  
    change_forward_3_right: eval((prop(lanes_fwd)=3)?prop(change_border):prop(change_forward_3_right));  
    change_forward_4_right: eval((prop(lanes_fwd)=4)?prop(change_border):prop(change_forward_4_right));  
    change_forward_5_right: eval((prop(lanes_fwd)=5)?prop(change_border):prop(change_forward_5_right));  
    change_forward_6_right: eval((prop(lanes_fwd)=6)?prop(change_border):prop(change_forward_6_right));  
    change_forward_7_right: eval((prop(lanes_fwd)=7)?prop(change_border):prop(change_forward_7_right));  
    change_forward_8_right: eval((prop(lanes_fwd)=8)?prop(change_border):prop(change_forward_8_right));  
}
way|z17-[is_prop_set(ok)][prop(style_right_hand_traffic)],
way|z17-[is_prop_set(ok)][!prop(style_right_hand_traffic)][prop(oneway_type)=(-1)]
{
    change_backward_1_right: eval((prop(lanes_bwd)=1)?prop(change_border):prop(change_backward_1_right));  
    change_backward_2_right: eval((prop(lanes_bwd)=2)?prop(change_border):prop(change_backward_2_right));  
    change_backward_3_right: eval((prop(lanes_bwd)=3)?prop(change_border):prop(change_backward_3_right));  
    change_backward_4_right: eval((prop(lanes_bwd)=4)?prop(change_border):prop(change_backward_4_right));  
    change_backward_5_right: eval((prop(lanes_bwd)=5)?prop(change_border):prop(change_backward_5_right));  
    change_backward_6_right: eval((prop(lanes_bwd)=6)?prop(change_border):prop(change_backward_6_right));  
    change_backward_7_right: eval((prop(lanes_bwd)=7)?prop(change_border):prop(change_backward_7_right));  
    change_backward_8_right: eval((prop(lanes_bwd)=8)?prop(change_border):prop(change_backward_8_right));  
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Splitting the list of signs into separate properties                                                                                            */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
way[!(prop(sign_forward_1)="")] { t: eval(split(";",prop(sign_forward_1))); sign_1_forward_1: eval(get(prop(t),1)); sign_2_forward_1: eval(get(prop(t),2)); sign_3_forward_1: eval(get(prop(t),3)); }
way[!(prop(sign_forward_2)="")] { t: eval(split(";",prop(sign_forward_2))); sign_1_forward_2: eval(get(prop(t),1)); sign_2_forward_2: eval(get(prop(t),2)); sign_3_forward_2: eval(get(prop(t),3)); }
way[!(prop(sign_forward_3)="")] { t: eval(split(";",prop(sign_forward_3))); sign_1_forward_3: eval(get(prop(t),1)); sign_2_forward_3: eval(get(prop(t),2)); sign_3_forward_3: eval(get(prop(t),3)); }
way[!(prop(sign_forward_4)="")] { t: eval(split(";",prop(sign_forward_4))); sign_1_forward_4: eval(get(prop(t),1)); sign_2_forward_4: eval(get(prop(t),2)); sign_3_forward_4: eval(get(prop(t),3)); }
way[!(prop(sign_forward_5)="")] { t: eval(split(";",prop(sign_forward_5))); sign_1_forward_5: eval(get(prop(t),1)); sign_2_forward_5: eval(get(prop(t),2)); sign_3_forward_5: eval(get(prop(t),3)); }
way[!(prop(sign_forward_6)="")] { t: eval(split(";",prop(sign_forward_6))); sign_1_forward_6: eval(get(prop(t),1)); sign_2_forward_6: eval(get(prop(t),2)); sign_3_forward_6: eval(get(prop(t),3)); }
way[!(prop(sign_forward_7)="")] { t: eval(split(";",prop(sign_forward_7))); sign_1_forward_7: eval(get(prop(t),1)); sign_2_forward_7: eval(get(prop(t),2)); sign_3_forward_7: eval(get(prop(t),3)); }
way[!(prop(sign_forward_7)="")] { t: eval(split(";",prop(sign_forward_8))); sign_1_forward_8: eval(get(prop(t),1)); sign_2_forward_8: eval(get(prop(t),2)); sign_3_forward_8: eval(get(prop(t),3)); }

way[!(prop(sign_backward_1)="")] { t: eval(split(";",prop(sign_backward_1))); sign_1_backward_1: eval(get(prop(t),1)); sign_2_backward_1: eval(get(prop(t),2)); sign_3_backward_1: eval(get(prop(t),3)); }
way[!(prop(sign_backward_2)="")] { t: eval(split(";",prop(sign_backward_2))); sign_1_backward_2: eval(get(prop(t),1)); sign_2_backward_2: eval(get(prop(t),2)); sign_3_backward_2: eval(get(prop(t),3)); }
way[!(prop(sign_backward_3)="")] { t: eval(split(";",prop(sign_backward_3))); sign_1_backward_3: eval(get(prop(t),1)); sign_2_backward_3: eval(get(prop(t),2)); sign_3_backward_3: eval(get(prop(t),3)); }
way[!(prop(sign_backward_4)="")] { t: eval(split(";",prop(sign_backward_4))); sign_1_backward_4: eval(get(prop(t),1)); sign_2_backward_4: eval(get(prop(t),2)); sign_3_backward_4: eval(get(prop(t),3)); }
way[!(prop(sign_backward_5)="")] { t: eval(split(";",prop(sign_backward_5))); sign_1_backward_5: eval(get(prop(t),1)); sign_2_backward_5: eval(get(prop(t),2)); sign_3_backward_5: eval(get(prop(t),3)); }
way[!(prop(sign_backward_6)="")] { t: eval(split(";",prop(sign_backward_6))); sign_1_backward_6: eval(get(prop(t),1)); sign_2_backward_6: eval(get(prop(t),2)); sign_3_backward_6: eval(get(prop(t),3)); }
way[!(prop(sign_backward_7)="")] { t: eval(split(";",prop(sign_backward_7))); sign_1_backward_7: eval(get(prop(t),1)); sign_2_backward_7: eval(get(prop(t),2)); sign_3_backward_7: eval(get(prop(t),3)); }
way[!(prop(sign_backward_7)="")] { t: eval(split(";",prop(sign_backward_8))); sign_1_backward_8: eval(get(prop(t),1)); sign_2_backward_8: eval(get(prop(t),2)); sign_3_backward_8: eval(get(prop(t),3)); }


/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Lane-dependent width                                                                                                                            */
/* This must be done AFTER the determination of the lanes count                                                                                    */
/* Note: the number of values is calcuated BEFORE the determination of the lanes count                                                             */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
way|z17-[is_prop_set(ok)]
{
    lane_width_forward_1: eval(prop(lane_default_width));    lane_width_forward_2: eval(prop(lane_default_width));
    lane_width_forward_3: eval(prop(lane_default_width));    lane_width_forward_4: eval(prop(lane_default_width));
    lane_width_forward_5: eval(prop(lane_default_width));    lane_width_forward_6: eval(prop(lane_default_width));
    lane_width_forward_7: eval(prop(lane_default_width));    lane_width_forward_8: eval(prop(lane_default_width));

    lane_width_backward_1: eval(prop(lane_default_width));    lane_width_backward_2: eval(prop(lane_default_width));
    lane_width_backward_3: eval(prop(lane_default_width));    lane_width_backward_4: eval(prop(lane_default_width));
    lane_width_backward_5: eval(prop(lane_default_width));    lane_width_backward_6: eval(prop(lane_default_width));
    lane_width_backward_7: eval(prop(lane_default_width));    lane_width_backward_8: eval(prop(lane_default_width));

    lane_width_bothways_1: eval(prop(lane_default_width));    lane_width_bothways_2: eval(prop(lane_default_width));
    lane_width_bothways_3: eval(prop(lane_default_width));    lane_width_bothways_4: eval(prop(lane_default_width));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Forward lanes                                                                                                                                   */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["width:lanes:forward"],
way|z17-[is_prop_set(ok)]["width:lanes"][prop(oneway_type)=1]
{
    temp: eval(cond(has_tag_key("width:lanes:forward"),tag("width:lanes:forward"),tag("width:lanes")));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));

    lane_width_forward_1: eval(((prop(temp_length)>0) && (get(prop(temp_list),0)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),0)))):prop(lane_default_width));
    lane_width_forward_2: eval(((prop(temp_length)>1) && (get(prop(temp_list),1)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),1)))):prop(lane_default_width));
    lane_width_forward_3: eval(((prop(temp_length)>2) && (get(prop(temp_list),2)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),2)))):prop(lane_default_width));
    lane_width_forward_4: eval(((prop(temp_length)>3) && (get(prop(temp_list),3)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),3)))):prop(lane_default_width));
    lane_width_forward_5: eval(((prop(temp_length)>4) && (get(prop(temp_list),4)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),4)))):prop(lane_default_width));
    lane_width_forward_6: eval(((prop(temp_length)>5) && (get(prop(temp_list),5)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),5)))):prop(lane_default_width));
    lane_width_forward_7: eval(((prop(temp_length)>6) && (get(prop(temp_list),6)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),6)))):prop(lane_default_width));
    lane_width_forward_8: eval(((prop(temp_length)>7) && (get(prop(temp_list),7)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),7)))):prop(lane_default_width));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Backward lanes                                                                                                                                  */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["width:lanes:backward"],
way|z17-[is_prop_set(ok)]["width:lanes"][prop(oneway_type)=(-1)]
{
    temp: eval(cond(has_tag_key("width:lanes:backward"),tag("width:lanes:backward"),tag("width:lanes")));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));

    lane_width_backward_1: eval(((prop(temp_length)>0) && (get(prop(temp_list),0)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),0)))):prop(lane_default_width));
    lane_width_backward_2: eval(((prop(temp_length)>1) && (get(prop(temp_list),1)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),1)))):prop(lane_default_width));
    lane_width_backward_3: eval(((prop(temp_length)>2) && (get(prop(temp_list),2)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),2)))):prop(lane_default_width));
    lane_width_backward_4: eval(((prop(temp_length)>3) && (get(prop(temp_list),3)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),3)))):prop(lane_default_width));
    lane_width_backward_5: eval(((prop(temp_length)>4) && (get(prop(temp_list),4)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),4)))):prop(lane_default_width));
    lane_width_backward_6: eval(((prop(temp_length)>5) && (get(prop(temp_list),5)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),5)))):prop(lane_default_width));
    lane_width_backward_7: eval(((prop(temp_length)>6) && (get(prop(temp_list),6)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),6)))):prop(lane_default_width));
    lane_width_backward_8: eval(((prop(temp_length)>7) && (get(prop(temp_list),7)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),7)))):prop(lane_default_width));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Bothways lanes                                                                                                                                  */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["width:lanes:both_ways"]
{
    temp: eval(tag("width:lanes:both_ways"));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));

    lane_width_bothways_1: eval(((prop(temp_length)>0) && (get(prop(temp_list),0)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),0)))):prop(lane_default_width));
    lane_width_bothways_2: eval(((prop(temp_length)>1) && (get(prop(temp_list),1)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),1)))):prop(lane_default_width));
    lane_width_bothways_3: eval(((prop(temp_length)>2) && (get(prop(temp_list),2)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),2)))):prop(lane_default_width));
    lane_width_bothways_4: eval(((prop(temp_length)>3) && (get(prop(temp_list),3)>0))?(max(prop(lane_min_width),(prop(pixel_per_metre)*get(prop(temp_list),3)))):prop(lane_default_width));
}

way|z17-[is_prop_set(ok)]
{
    lane_width_all_forward: eval(
                                    ((prop(lanes_fwd)>0)?prop(lane_width_forward_1):0)+
                                    ((prop(lanes_fwd)>1)?prop(lane_width_forward_2):0)+
                                    ((prop(lanes_fwd)>2)?prop(lane_width_forward_3):0)+
                                    ((prop(lanes_fwd)>3)?prop(lane_width_forward_4):0)+
                                    ((prop(lanes_fwd)>4)?prop(lane_width_forward_5):0)+
                                    ((prop(lanes_fwd)>5)?prop(lane_width_forward_6):0)+
                                    ((prop(lanes_fwd)>6)?prop(lane_width_forward_7):0)+
                                    ((prop(lanes_fwd)>7)?prop(lane_width_forward_8):0)
                                );

    lane_width_all_backward: eval(
                                    ((prop(lanes_bwd)>0)?prop(lane_width_backward_1):0)+
                                    ((prop(lanes_bwd)>1)?prop(lane_width_backward_2):0)+
                                    ((prop(lanes_bwd)>2)?prop(lane_width_backward_3):0)+
                                    ((prop(lanes_bwd)>3)?prop(lane_width_backward_4):0)+
                                    ((prop(lanes_bwd)>4)?prop(lane_width_backward_5):0)+
                                    ((prop(lanes_bwd)>5)?prop(lane_width_backward_6):0)+
                                    ((prop(lanes_bwd)>6)?prop(lane_width_backward_7):0)+
                                    ((prop(lanes_bwd)>7)?prop(lane_width_backward_8):0)
                                );

    lane_width_all_bothways: eval(
                                    ((prop(lanes_both)>0)?prop(lane_width_bothways_1):0)+
                                    ((prop(lanes_both)>1)?prop(lane_width_bothways_2):0)+
                                    ((prop(lanes_both)>2)?prop(lane_width_bothways_3):0)+
                                    ((prop(lanes_both)>3)?prop(lane_width_bothways_4):0)
                                );

    lane_width_all: eval((prop(lane_width_all_forward)+prop(lane_width_all_backward))+prop(lane_width_all_bothways));
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Offset of the road given by the placement tag                                                                                                   */
/* It is assumed that only one of the placement tags is set, otherwise the result will most certainly be incorrect                                 */
/* TODO: placement:both_ways is currently not supported, verify support for left-hand-traffic                                                      */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Error checking                                                                                                                                  */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way["placement"] 
{
    data_error: eval(regexp_test("^(transition|middle_of:[0-9]+|right_of:[0-9]+|left_of:[0-9]+)$",tag("placement"))?prop(data_error):"invalid placement value");
}
way["placement:forward"] 
{
    data_error: eval(regexp_test("^(transition|middle_of:[0-9]+|right_of:[0-9]+|left_of:[0-9]+)$",tag("placement:forward"))?prop(data_error):"invalid placement:forward value");
}
way["placement:backward"] 
{
    data_error: eval(regexp_test("^(transition|middle_of:[0-9]+|right_of:[0-9]+|left_of:[0-9]+)$",tag("placement:backward"))?prop(data_error):"invalid placement:backward value");
}
way["placement"]["placement:forward"], way["placement"]["placement:backward"], way["placement:forward"]["placement:backward"]
{
    data_error: eval("multiple placement tags");
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 1. Calculate the borders without consideration of placement                                                                                     */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way[is_prop_set(ok)] 
{
    /* Determine the borders of the parts of the carriageway assuming no placement was specified */
    placement_offset: 0; 
    placement_transition: eval(has_tag_key("placement") && (tag("placement")="transition"));
    left_carriageway_border: eval(prop(lane_width_all)/2.0);
    left_forward_border: eval(cond(prop(style_right_hand_traffic),
                                   (prop(left_carriageway_border) - (prop(lane_width_all_backward)+prop(lane_width_all_bothways))),
                                   prop(left_carriageway_border) 
                                  )
                             ); 
    right_backward_border: eval(cond(prop(style_right_hand_traffic),
                                     (prop(left_carriageway_border) - prop(lane_width_all_backward)),
                                     (prop(left_carriageway_border) - prop(lane_width_all))
                                    )
                               ); 
    left_bothways_border: eval(cond(prop(style_right_hand_traffic),
                                    (prop(left_carriageway_border) - prop(lane_width_all_backward)),
                                    (prop(left_carriageway_border) - prop(lane_width_all_forward))
                                   )
                              ); 
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 2.a. Offset of the forward lanes                                                                                                                */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]
{
    lane_offset_forward_1: eval(prop(left_forward_border)-
                                (prop(lane_width_forward_1)/2));
    lane_offset_forward_2: eval(prop(lane_offset_forward_1)-
                               ((prop(lane_width_forward_1)+
                                 prop(lane_width_forward_2))/2));
    lane_offset_forward_3: eval(prop(lane_offset_forward_2)-
                               ((prop(lane_width_forward_2)+
                                 prop(lane_width_forward_3))/2));
    lane_offset_forward_4: eval(prop(lane_offset_forward_3)-
                               ((prop(lane_width_forward_3)+
                                 prop(lane_width_forward_4))/2));
    lane_offset_forward_5: eval(prop(lane_offset_forward_4)-
                               ((prop(lane_width_forward_4)+
                                 prop(lane_width_forward_5))/2));
    lane_offset_forward_6: eval(prop(lane_offset_forward_5)-
                               ((prop(lane_width_forward_5)+
                                 prop(lane_width_forward_6))/2));
    lane_offset_forward_7: eval(prop(lane_offset_forward_6)-
                               ((prop(lane_width_forward_6)+
                                 prop(lane_width_forward_7))/2));
    lane_offset_forward_8: eval(prop(lane_offset_forward_7)-
                               ((prop(lane_width_forward_7)+
                                 prop(lane_width_forward_8))/2));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 2.b. Offset of the backward lanes                                                                                                               */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]
{
    lane_offset_backward_1: eval(prop(right_backward_border)+
                                 (prop(lane_width_backward_1)/2));
    lane_offset_backward_2: eval(prop(lane_offset_backward_1)+
                                ((prop(lane_width_backward_1)+
                                  prop(lane_width_backward_2))/2));
    lane_offset_backward_3: eval(prop(lane_offset_backward_2)+
                                ((prop(lane_width_backward_2)+
                                  prop(lane_width_backward_3))/2));
    lane_offset_backward_4: eval(prop(lane_offset_backward_3)+
                                ((prop(lane_width_backward_3)+
                                  prop(lane_width_backward_4))/2));
    lane_offset_backward_5: eval(prop(lane_offset_backward_4)+
                                ((prop(lane_width_backward_4)+
                                  prop(lane_width_backward_5))/2));
    lane_offset_backward_6: eval(prop(lane_offset_backward_5)+
                                ((prop(lane_width_backward_5)+
                                  prop(lane_width_backward_6))/2));
    lane_offset_backward_7: eval(prop(lane_offset_backward_6)+
                                ((prop(lane_width_backward_6)+
                                  prop(lane_width_backward_7))/2));
    lane_offset_backward_8: eval(prop(lane_offset_backward_7)+
                                ((prop(lane_width_backward_7)+
                                  prop(lane_width_backward_8))/2));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 2.c. Offset of the both_ways lanes                                                                                                                */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]
{
    lane_offset_bothways_1: eval(prop(left_bothways_border)-
                                 (prop(lane_width_bothways_1)/2));
    lane_offset_bothways_2: eval(prop(lane_offset_bothways_1)-
                                ((prop(lane_width_bothways_1)+
                                  prop(lane_width_bothways_2))/2));
    lane_offset_bothways_3: eval(prop(lane_offset_bothways_2)-
                                ((prop(lane_width_bothways_2)+
                                  prop(lane_width_bothways_3))/2));
    lane_offset_bothways_4: eval(prop(lane_offset_bothways_3)-
                                ((prop(lane_width_bothways_3)+
                                  prop(lane_width_bothways_4))/2));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 3. Now determine the offset given by the placement tag                                                                                          */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way[is_prop_set(ok)]["placement:forward"]["placement:forward"!=transition],
way[is_prop_set(ok)][prop(oneway_type)=1][placement][placement!=transition]
{
    placement_value: eval(has_tag_key("placement")?tag("placement"):tag("placement:forward"));
    placement_offset: eval(
                cond(prop("placement_value")="right_of:1",eval((prop(lane_width_forward_1)/2)-prop(lane_offset_forward_1)),
                cond(prop("placement_value")="right_of:2",eval((prop(lane_width_forward_2)/2)-prop(lane_offset_forward_2)),
                cond(prop("placement_value")="right_of:3",eval((prop(lane_width_forward_3)/2)-prop(lane_offset_forward_3)),
                cond(prop("placement_value")="right_of:4",eval((prop(lane_width_forward_4)/2)-prop(lane_offset_forward_4)),
                cond(prop("placement_value")="right_of:5",eval((prop(lane_width_forward_5)/2)-prop(lane_offset_forward_5)),
                cond(prop("placement_value")="right_of:6",eval((prop(lane_width_forward_6)/2)-prop(lane_offset_forward_6)),
                cond(prop("placement_value")="right_of:7",eval((prop(lane_width_forward_7)/2)-prop(lane_offset_forward_7)),
                cond(prop("placement_value")="right_of:8",eval((prop(lane_width_forward_8)/2)-prop(lane_offset_forward_8)),
                cond(prop("placement_value")="left_of:1",eval(-(prop(lane_offset_forward_1)+(prop(lane_width_forward_1)/2))),
                cond(prop("placement_value")="left_of:2",eval(-(prop(lane_offset_forward_2)+(prop(lane_width_forward_2)/2))),
                cond(prop("placement_value")="left_of:3",eval(-(prop(lane_offset_forward_3)+(prop(lane_width_forward_3)/2))),
                cond(prop("placement_value")="left_of:4",eval(-(prop(lane_offset_forward_4)+(prop(lane_width_forward_4)/2))),
                cond(prop("placement_value")="left_of:5",eval(-(prop(lane_offset_forward_5)+(prop(lane_width_forward_5)/2))),
                cond(prop("placement_value")="left_of:6",eval(-(prop(lane_offset_forward_6)+(prop(lane_width_forward_6)/2))),
                cond(prop("placement_value")="left_of:7",eval(-(prop(lane_offset_forward_7)+(prop(lane_width_forward_7)/2))),
                cond(prop("placement_value")="left_of:8",eval(-(prop(lane_offset_forward_8)+(prop(lane_width_forward_8)/2))),
                cond(prop("placement_value")="middle_of:1",eval(-prop(lane_offset_forward_1)),
                cond(prop("placement_value")="middle_of:2",eval(-prop(lane_offset_forward_2)),
                cond(prop("placement_value")="middle_of:3",eval(-prop(lane_offset_forward_3)),
                cond(prop("placement_value")="middle_of:4",eval(-prop(lane_offset_forward_4)),
                cond(prop("placement_value")="middle_of:5",eval(-prop(lane_offset_forward_5)),
                cond(prop("placement_value")="middle_of:6",eval(-prop(lane_offset_forward_6)),
                cond(prop("placement_value")="middle_of:7",eval(-prop(lane_offset_forward_7)),
                cond(prop("placement_value")="middle_of:8",eval(-prop(lane_offset_forward_8)),
                0
                ))))))))))))))))))))))))
               );
}
way[is_prop_set(ok)]["placement:backward"]["placement:backward"!=transition],
way[is_prop_set(ok)][prop(oneway_type)=(-1)][placement][placement!=transition]
{
    placement_value: eval(has_tag_key("placement")?tag("placement"):tag("placement:backward"));
    placement_offset: eval(
                cond(prop("placement_value")="right_of:1",eval(-(prop(lane_offset_backward_1)+(prop(lane_width_backward_1)/2))),
                cond(prop("placement_value")="right_of:2",eval(-(prop(lane_offset_backward_2)+(prop(lane_width_backward_2)/2))),
                cond(prop("placement_value")="right_of:3",eval(-(prop(lane_offset_backward_3)+(prop(lane_width_backward_3)/2))),
                cond(prop("placement_value")="right_of:4",eval(-(prop(lane_offset_backward_4)+(prop(lane_width_backward_4)/2))),
                cond(prop("placement_value")="right_of:5",eval(-(prop(lane_offset_backward_5)+(prop(lane_width_backward_5)/2))),
                cond(prop("placement_value")="right_of:6",eval(-(prop(lane_offset_backward_6)+(prop(lane_width_backward_6)/2))),
                cond(prop("placement_value")="right_of:7",eval(-(prop(lane_offset_backward_7)+(prop(lane_width_backward_7)/2))),
                cond(prop("placement_value")="right_of:8",eval(-(prop(lane_offset_backward_8)+(prop(lane_width_backward_8)/2))),
                cond(prop("placement_value")="left_of:1",eval((prop(lane_width_backward_1)/2)-prop(lane_offset_backward_1)),
                cond(prop("placement_value")="left_of:2",eval((prop(lane_width_backward_2)/2)-prop(lane_offset_backward_2)),
                cond(prop("placement_value")="left_of:3",eval((prop(lane_width_backward_3)/2)-prop(lane_offset_backward_3)),
                cond(prop("placement_value")="left_of:4",eval((prop(lane_width_backward_4)/2)-prop(lane_offset_backward_4)),
                cond(prop("placement_value")="left_of:5",eval((prop(lane_width_backward_5)/2)-prop(lane_offset_backward_5)),
                cond(prop("placement_value")="left_of:6",eval((prop(lane_width_backward_6)/2)-prop(lane_offset_backward_6)),
                cond(prop("placement_value")="left_of:7",eval((prop(lane_width_backward_7)/2)-prop(lane_offset_backward_7)),
                cond(prop("placement_value")="left_of:8",eval((prop(lane_width_backward_8)/2)-prop(lane_offset_backward_8)),
                cond(prop("placement_value")="middle_of:1",eval(-prop(lane_offset_backward_1)),
                cond(prop("placement_value")="middle_of:2",eval(-prop(lane_offset_backward_2)),
                cond(prop("placement_value")="middle_of:3",eval(-prop(lane_offset_backward_3)),
                cond(prop("placement_value")="middle_of:4",eval(-prop(lane_offset_backward_4)),
                cond(prop("placement_value")="middle_of:5",eval(-prop(lane_offset_backward_5)),
                cond(prop("placement_value")="middle_of:6",eval(-prop(lane_offset_backward_6)),
                cond(prop("placement_value")="middle_of:7",eval(-prop(lane_offset_backward_7)),
                cond(prop("placement_value")="middle_of:8",eval(-prop(lane_offset_backward_8)),
                0
                ))))))))))))))))))))))))
               );
}
way[is_prop_set(ok)]["placement:both_ways"]["placement:both_ways"!=transition]
{
    placement_value: eval(tag("placement:both_ways"));
    placement_offset: eval(
                cond(prop("placement_value")="right_of:1",eval((prop(lane_width_bothways_1)/2)-prop(lane_offset_bothways_1)),
                cond(prop("placement_value")="right_of:2",eval((prop(lane_width_bothways_2)/2)-prop(lane_offset_bothways_2)),
                cond(prop("placement_value")="right_of:3",eval((prop(lane_width_bothways_3)/2)-prop(lane_offset_bothways_3)),
                cond(prop("placement_value")="right_of:4",eval((prop(lane_width_bothways_4)/2)-prop(lane_offset_bothways_4)),
                cond(prop("placement_value")="left_of:1",eval(-(prop(lane_offset_bothways_1)+(prop(lane_width_bothways_1)/2))),
                cond(prop("placement_value")="left_of:2",eval(-(prop(lane_offset_bothways_2)+(prop(lane_width_bothways_2)/2))),
                cond(prop("placement_value")="left_of:3",eval(-(prop(lane_offset_bothways_3)+(prop(lane_width_bothways_3)/2))),
                cond(prop("placement_value")="left_of:4",eval(-(prop(lane_offset_bothways_4)+(prop(lane_width_bothways_4)/2))),
                cond(prop("placement_value")="middle_of:1",eval(-prop(lane_offset_bothways_1)),
                cond(prop("placement_value")="middle_of:2",eval(-prop(lane_offset_bothways_2)),
                cond(prop("placement_value")="middle_of:3",eval(-prop(lane_offset_bothways_3)),
                cond(prop("placement_value")="middle_of:4",eval(-prop(lane_offset_bothways_4)),
                0
                ))))))))))))
               );
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 4. Move the carriageway and the lanes                                                                                                           */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way[is_prop_set(ok)]
{
    /* Move the carriageway borders */
    left_carriageway_border: eval((prop(left_carriageway_border) + prop(placement_offset))); 
    left_forward_border: eval((prop(left_forward_border) + prop(placement_offset))); 
    right_backward_border: eval((prop(right_backward_border) + prop(placement_offset))); 
    left_bothways_border: eval((prop(left_bothways_border) + prop(placement_offset)));  

    /* Move the lanes */
    lane_offset_forward_1: eval((prop(lane_offset_forward_1) + prop(placement_offset))); 
    lane_offset_forward_2: eval((prop(lane_offset_forward_2) + prop(placement_offset))); 
    lane_offset_forward_3: eval((prop(lane_offset_forward_3) + prop(placement_offset))); 
    lane_offset_forward_4: eval((prop(lane_offset_forward_4) + prop(placement_offset))); 
    lane_offset_forward_5: eval((prop(lane_offset_forward_5) + prop(placement_offset))); 
    lane_offset_forward_6: eval((prop(lane_offset_forward_6) + prop(placement_offset))); 
    lane_offset_forward_7: eval((prop(lane_offset_forward_7) + prop(placement_offset))); 
    lane_offset_forward_8: eval((prop(lane_offset_forward_8) + prop(placement_offset))); 
    lane_offset_backward_1: eval((prop(lane_offset_backward_1) + prop(placement_offset))); 
    lane_offset_backward_2: eval((prop(lane_offset_backward_2) + prop(placement_offset))); 
    lane_offset_backward_3: eval((prop(lane_offset_backward_3) + prop(placement_offset))); 
    lane_offset_backward_4: eval((prop(lane_offset_backward_4) + prop(placement_offset))); 
    lane_offset_backward_5: eval((prop(lane_offset_backward_5) + prop(placement_offset))); 
    lane_offset_backward_6: eval((prop(lane_offset_backward_6) + prop(placement_offset))); 
    lane_offset_backward_7: eval((prop(lane_offset_backward_7) + prop(placement_offset))); 
    lane_offset_backward_8: eval((prop(lane_offset_backward_8) + prop(placement_offset))); 
    lane_offset_bothways_1: eval((prop(lane_offset_bothways_1) + prop(placement_offset))); 
    lane_offset_bothways_2: eval((prop(lane_offset_bothways_2) + prop(placement_offset))); 
    lane_offset_bothways_3: eval((prop(lane_offset_bothways_3) + prop(placement_offset))); 
    lane_offset_bothways_4: eval((prop(lane_offset_bothways_4) + prop(placement_offset))); 
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Render the carriageway                                                                                                                          */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
way[is_prop_set(ok, "default")][is_prop_set(lanes_all, "default")]::Ground
{
    linecap: none;
    /* The "ground" will be drawn by each lane, so that we can use different colors per lane */
    opacity: 0.0;
    width:   eval(prop(lane_width_all,"default"));
    offset:  prop(placement_offset,"default");
    major-z-index: -1.0;
}

/* Sidewalk and cycletrack */
way|z17- {} /* ATTENTION: For whatever reason this is needed, otherwise the following won't be interpreted correctly */
way|z17-[is_prop_set(ok, "default")][is_prop_set(lanes_all, "default")]::Ground
{
    /* Cycletrack in an one-way on the left side? */
    temp_allow_cycleway_left: eval(!(
                                      ((prop(oneway_type,"default")=1) && prop(style_right_hand_traffic,"default")) ||
                                      ((prop(oneway_type,"default")=(-1)) && (!prop(style_right_hand_traffic,"default")))
                                    ));

    temp_allow_cycleway_left: eval(prop(temp_allow_cycleway_left) || (has_tag_key("oneway:bicycle") && (tag("oneway:bicycle")="no")));
    /* Explicitely no cycletrack on the left side? */
    temp_allow_cycleway_left: eval((has_tag_key("cycleway:left") && (tag("cycleway:left")="no"))?false:prop(temp_allow_cycleway_left));
    /* Cycletrack on the left side */
    temp_cycleway_left: eval(((has_tag_key(cycleway) && ((tag(cycleway)="track") && prop(temp_allow_cycleway_left))) ||
                                (has_tag_key("cycleway:left") && (tag("cycleway:left")="track"))) ||
                                (has_tag_key("cycleway:both") && (tag("cycleway:both")="track"))
                            );

    /* Sidewalk on the left side? */
    templ:  eval((has_tag_key(sidewalk) && ((tag(sidewalk)="both") || (tag(sidewalk)="left")))?1:0);

    /* Combine  sidewalk and cycletrack: 0=none; 1=sidewalk; 2=cycletrack; 3=sidewalk and cycletrack */
    templ: eval(prop(templ)+(prop(temp_cycleway_left)?2:0));


    /* Cycletrack in an one-way on the right side? */
    temp_allow_cycleway_right: eval(!(
                                      ((prop(oneway_type,"default")=(-1)) && prop(style_right_hand_traffic,"default")) ||
                                      ((prop(oneway_type,"default")=1) && (!prop(style_right_hand_traffic,"default")))
                                    ));

    temp_allow_cycleway_right: eval(prop(temp_allow_cycleway_right) || (has_tag_key("oneway:bicycle") && (tag("oneway:bicycle")="no")));
    /* Explicitely no cycletrack on the right side? */
    temp_allow_cycleway_right: eval((has_tag_key("cycleway:right") && (tag("cycleway:right")="no"))?false:prop(temp_allow_cycleway_right));
    /* Cycletrack on the right side */
    temp_cycleway_right: eval(((has_tag_key(cycleway) && ((tag(cycleway)="track") && prop(temp_allow_cycleway_right))) ||
                                (has_tag_key("cycleway:right") && (tag("cycleway:right")="track"))) ||
                                (has_tag_key("cycleway:both") && (tag("cycleway:both")="track"))
                            );

    /* Sidewalk on the right side? */
    tempr:  eval((has_tag_key(sidewalk) && ((tag(sidewalk)="both") || (tag(sidewalk)="right")))?1:0);

    /* Combine  sidewalk and cycletrack: 0=none; 1=sidewalk; 2=cycletrack; 3=sidewalk and cycletrack */
    tempr: eval(prop(tempr)+(prop(temp_cycleway_right)?2:0));


    left-casing-linecap: none;
    left-casing-width: eval((prop(templ)>0)?(prop(lane_default_width,"default")/2):0);
    left-casing-color:  eval(get(prop(style_sidewalk_color,"default"),prop(templ)));
    left-casing-opacity: prop(style_sidewalk_opacity,"default");

    right-casing-linecap: none;
    right-casing-width: eval((prop(tempr)>0)?(prop(lane_default_width,"default")/2):0);
    right-casing-color:  eval(get(prop(style_sidewalk_color,"default"),prop(tempr)));
    right-casing-opacity: prop(style_sidewalk_opacity,"default");
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Render the lanes                                                                                                                                */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Forward lanes                                                                                                                                   */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 0]::Lane_Forward_1
{
    offset:                                          eval(prop(lane_offset_forward_1,"default"));
    width:                                           eval((prop(lane_width_forward_1,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                                  eval(prop(change_forward_1_right,"default"));
    left-casing-dashes:                                   eval(prop(change_forward_1_left,"default"));
    repeat-image:                                     eval(prop(turn_image_forward_1,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 0]::Lane_Forward_1_Color
{
    offset:                                          eval(prop(lane_offset_forward_1,"default"));
    width:                                            eval(prop(lane_width_forward_1,"default"));
    color:                                                      prop(color_forward_1,"default");
    dashes:                              eval(is_prop_set(restriction_color_forward_1,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_forward_1,"default")?
                                                     prop(restriction_color_forward_1,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_forward_1,     "default")]::Lane_Forward_1_Sign_1
{
    repeat-image:                           eval(prop(sign_1_forward_1,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_1,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_1"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_forward_1,     "default")]::Lane_Forward_1_Sign_2
{
    repeat-image:                           eval(prop(sign_2_forward_1,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_1,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_1"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_forward_1,     "default")]::Lane_Forward_1_Sign_3
{
    repeat-image:                           eval(prop(sign_3_forward_1,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_1,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_1"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 1]::Lane_Forward_2
{
    offset:                                          eval(prop(lane_offset_forward_2,"default"));
    width:                                           eval((prop(lane_width_forward_2,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                                  eval(prop(change_forward_2_right,"default"));
    left-casing-dashes:                                   eval(prop(change_forward_2_left,"default"));
    repeat-image:                                     eval(prop(turn_image_forward_2,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 1]::Lane_Forward_2_Color
{
    offset:                                          eval(prop(lane_offset_forward_2,"default"));
    width:                                            eval(prop(lane_width_forward_2,"default"));
    color:                                                      prop(color_forward_2,"default");
    dashes:                              eval(is_prop_set(restriction_color_forward_2,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_forward_2,"default")?
                                                     prop(restriction_color_forward_2,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_forward_2,     "default")]::Lane_Forward_2_Sign_1
{
    repeat-image:                           eval(prop(sign_1_forward_2,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_2,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_2"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_forward_2,     "default")]::Lane_Forward_2_Sign_2
{
    repeat-image:                           eval(prop(sign_2_forward_2,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_2,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_2"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_forward_2,     "default")]::Lane_Forward_2_Sign_3
{
    repeat-image:                           eval(prop(sign_3_forward_2,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_2,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_2"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 2]::Lane_Forward_3
{
    offset:                                          eval(prop(lane_offset_forward_3,"default"));
    width:                                           eval((prop(lane_width_forward_3,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                                  eval(prop(change_forward_3_right,"default"));
    left-casing-dashes:                                   eval(prop(change_forward_3_left,"default"));
    repeat-image:                                     eval(prop(turn_image_forward_3,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 2]::Lane_Forward_3_Color
{
    offset:                                          eval(prop(lane_offset_forward_3,"default"));
    width:                                            eval(prop(lane_width_forward_3,"default"));
    color:                                                      prop(color_forward_3,"default");
    dashes:                              eval(is_prop_set(restriction_color_forward_3,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_forward_3,"default")?
                                                     prop(restriction_color_forward_3,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_forward_3,     "default")]::Lane_Forward_3_Sign_1
{
    repeat-image:                           eval(prop(sign_1_forward_3,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_3,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_3"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_forward_3,     "default")]::Lane_Forward_3_Sign_2
{
    repeat-image:                           eval(prop(sign_2_forward_3,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_3,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_3"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_forward_3,     "default")]::Lane_Forward_3_Sign_3
{
    repeat-image:                           eval(prop(sign_3_forward_3,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_3,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_3"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 3]::Lane_Forward_4
{
    offset:                                          eval(prop(lane_offset_forward_4,"default"));
    width:                                           eval((prop(lane_width_forward_4,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                                  eval(prop(change_forward_4_right,"default"));
    left-casing-dashes:                                   eval(prop(change_forward_4_left,"default"));
    repeat-image:                                     eval(prop(turn_image_forward_4,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 3]::Lane_Forward_4_Color
{
    offset:                                          eval(prop(lane_offset_forward_4,"default"));
    width:                                            eval(prop(lane_width_forward_4,"default"));
    color:                                                      prop(color_forward_4,"default");
    dashes:                              eval(is_prop_set(restriction_color_forward_4,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_forward_4,"default")?
                                                     prop(restriction_color_forward_4,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_forward_4,     "default")]::Lane_Forward_4_Sign_1
{
    repeat-image:                           eval(prop(sign_1_forward_4,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_4,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_4"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_forward_4,     "default")]::Lane_Forward_4_Sign_2
{
    repeat-image:                           eval(prop(sign_2_forward_4,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_4,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_4"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_forward_4,     "default")]::Lane_Forward_4_Sign_3
{
    repeat-image:                           eval(prop(sign_3_forward_4,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_4,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_4"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 4]::Lane_Forward_5
{
    offset:                                          eval(prop(lane_offset_forward_5,"default"));
    width:                                           eval((prop(lane_width_forward_5,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                                  eval(prop(change_forward_5_right,"default"));
    left-casing-dashes:                                   eval(prop(change_forward_5_left,"default"));
    repeat-image:                                     eval(prop(turn_image_forward_5,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 4]::Lane_Forward_5_Color
{
    offset:                                          eval(prop(lane_offset_forward_5,"default"));
    width:                                            eval(prop(lane_width_forward_5,"default"));
    color:                                                      prop(color_forward_5,"default");
    dashes:                              eval(is_prop_set(restriction_color_forward_5,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_forward_5,"default")?
                                                     prop(restriction_color_forward_5,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_forward_5,     "default")]::Lane_Forward_5_Sign_1
{
    repeat-image:                           eval(prop(sign_1_forward_5,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_5,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_5"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_forward_5,     "default")]::Lane_Forward_5_Sign_2
{
    repeat-image:                           eval(prop(sign_2_forward_5,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_5,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_5"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_forward_5,     "default")]::Lane_Forward_5_Sign_3
{
    repeat-image:                           eval(prop(sign_3_forward_5,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_5,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_5"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 5]::Lane_Forward_6
{
    offset:                                          eval(prop(lane_offset_forward_6,"default"));
    width:                                           eval((prop(lane_width_forward_6,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                                  eval(prop(change_forward_6_right,"default"));
    left-casing-dashes:                                   eval(prop(change_forward_6_left,"default"));
    repeat-image:                                     eval(prop(turn_image_forward_6,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 5]::Lane_Forward_6_Color
{
    offset:                                          eval(prop(lane_offset_forward_6,"default"));
    width:                                            eval(prop(lane_width_forward_6,"default"));
    color:                                                      prop(color_forward_6,"default");
    dashes:                              eval(is_prop_set(restriction_color_forward_6,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_forward_6,"default")?
                                                     prop(restriction_color_forward_6,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_forward_6,     "default")]::Lane_Forward_6_Sign_1
{
    repeat-image:                           eval(prop(sign_1_forward_6,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_6,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_6"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_forward_6,     "default")]::Lane_Forward_6_Sign_2
{
    repeat-image:                           eval(prop(sign_2_forward_6,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_6,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_6"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_forward_6,     "default")]::Lane_Forward_6_Sign_3
{
    repeat-image:                           eval(prop(sign_3_forward_6,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_6,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_6"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 6]::Lane_Forward_7
{
    offset:                                          eval(prop(lane_offset_forward_7,"default"));
    width:                                           eval((prop(lane_width_forward_7,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                                  eval(prop(change_forward_7_right,"default"));
    left-casing-dashes:                                   eval(prop(change_forward_7_left,"default"));
    repeat-image:                                     eval(prop(turn_image_forward_7,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 6]::Lane_Forward_7_Color
{
    offset:                                          eval(prop(lane_offset_forward_7,"default"));
    width:                                            eval(prop(lane_width_forward_7,"default"));
    color:                                                      prop(color_forward_7,"default");
    dashes:                              eval(is_prop_set(restriction_color_forward_7,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_forward_7,"default")?
                                                     prop(restriction_color_forward_7,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_forward_7,     "default")]::Lane_Forward_7_Sign_1
{
    repeat-image:                           eval(prop(sign_1_forward_7,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_7,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_7"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_forward_7,     "default")]::Lane_Forward_7_Sign_2
{
    repeat-image:                           eval(prop(sign_2_forward_7,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_7,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_7"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_forward_7,     "default")]::Lane_Forward_7_Sign_3
{
    repeat-image:                           eval(prop(sign_3_forward_7,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_7,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_7"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 7]::Lane_Forward_8
{
    offset:                                          eval(prop(lane_offset_forward_8,"default"));
    width:                                           eval((prop(lane_width_forward_8,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                                  eval(prop(change_forward_8_right,"default"));
    left-casing-dashes:                                   eval(prop(change_forward_8_left,"default"));
    repeat-image:                                     eval(prop(turn_image_forward_8,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_fwd, "default") > 7]::Lane_Forward_8_Color
{
    offset:                                          eval(prop(lane_offset_forward_8,"default"));
    width:                                            eval(prop(lane_width_forward_8,"default"));
    color:                                                      prop(color_forward_8,"default");
    dashes:                              eval(is_prop_set(restriction_color_forward_8,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_forward_8,"default")?
                                                     prop(restriction_color_forward_8,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_forward_8,     "default")]::Lane_Forward_8_Sign_1
{
    repeat-image:                           eval(prop(sign_1_forward_8,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_8,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_8"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_forward_8,     "default")]::Lane_Forward_8_Sign_2
{
    repeat-image:                           eval(prop(sign_2_forward_8,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_8,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_8"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_forward_8,     "default")]::Lane_Forward_8_Sign_3
{
    repeat-image:                           eval(prop(sign_3_forward_8,"default"));
    repeat-image-offset:               eval(prop(lane_offset_forward_8,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Forward_8"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Backward lanes                                                                                                                                  */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 0]::Lane_Backward_1
{
    offset:                                          eval(prop(lane_offset_backward_1,"default"));
    width:                                           eval((prop(lane_width_backward_1,"default")-prop(lane_casing,"default")));
    left-casing-dashes:                                   eval(prop(change_backward_1_right,"default"));
    right-casing-dashes:                                  eval(prop(change_backward_1_left,"default"));
    repeat-image:                                     eval(prop(turn_image_backward_1,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 0]::Lane_Backward_1_Color
{
    offset:                                          eval(prop(lane_offset_backward_1,"default"));
    width:                                            eval(prop(lane_width_backward_1,"default"));
    color:                                                      prop(color_backward_1,"default");
    dashes:                              eval(is_prop_set(restriction_color_backward_1,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_backward_1,"default")?
                                                     prop(restriction_color_backward_1,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_backward_1,     "default")]::Lane_Backward_1_Sign_1
{
    repeat-image:                           eval(prop(sign_1_backward_1,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_1,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_1"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_backward_1,     "default")]::Lane_Backward_1_Sign_2
{
    repeat-image:                           eval(prop(sign_2_backward_1,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_1,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_1"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_backward_1,     "default")]::Lane_Backward_1_Sign_3
{
    repeat-image:                           eval(prop(sign_3_backward_1,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_1,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_1"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 1]::Lane_Backward_2
{
    offset:                                          eval(prop(lane_offset_backward_2,"default"));
    width:                                           eval((prop(lane_width_backward_2,"default")-prop(lane_casing,"default")));
    left-casing-dashes:                                   eval(prop(change_backward_2_right,"default"));
    right-casing-dashes:                                  eval(prop(change_backward_2_left,"default"));
    repeat-image:                                     eval(prop(turn_image_backward_2,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 1]::Lane_Backward_2_Color
{
    offset:                                          eval(prop(lane_offset_backward_2,"default"));
    width:                                            eval(prop(lane_width_backward_2,"default"));
    color:                                                      prop(color_backward_2,"default");
    dashes:                              eval(is_prop_set(restriction_color_backward_2,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_backward_2,"default")?
                                                     prop(restriction_color_backward_2,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_backward_2,     "default")]::Lane_Backward_2_Sign_1
{
    repeat-image:                           eval(prop(sign_1_backward_2,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_2,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_2"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_backward_2,     "default")]::Lane_Backward_2_Sign_2
{
    repeat-image:                           eval(prop(sign_2_backward_2,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_2,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_2"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_backward_2,     "default")]::Lane_Backward_2_Sign_3
{
    repeat-image:                           eval(prop(sign_3_backward_2,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_2,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_2"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 2]::Lane_Backward_3
{
    offset:                                          eval(prop(lane_offset_backward_3,"default"));
    width:                                           eval((prop(lane_width_backward_3,"default")-prop(lane_casing,"default")));
    left-casing-dashes:                                   eval(prop(change_backward_3_right,"default"));
    right-casing-dashes:                                  eval(prop(change_backward_3_left,"default"));
    repeat-image:                                     eval(prop(turn_image_backward_3,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 2]::Lane_Backward_3_Color
{
    offset:                                          eval(prop(lane_offset_backward_3,"default"));
    width:                                            eval(prop(lane_width_backward_3,"default"));
    color:                                                      prop(color_backward_3,"default");
    dashes:                              eval(is_prop_set(restriction_color_backward_3,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_backward_3,"default")?
                                                     prop(restriction_color_backward_3,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_backward_3,     "default")]::Lane_Backward_3_Sign_1
{
    repeat-image:                           eval(prop(sign_1_backward_3,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_3,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_3"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_backward_3,     "default")]::Lane_Backward_3_Sign_2
{
    repeat-image:                           eval(prop(sign_2_backward_3,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_3,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_3"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_backward_3,     "default")]::Lane_Backward_3_Sign_3
{
    repeat-image:                           eval(prop(sign_3_backward_3,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_3,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_3"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 3]::Lane_Backward_4
{
    offset:                                          eval(prop(lane_offset_backward_4,"default"));
    width:                                           eval((prop(lane_width_backward_4,"default")-prop(lane_casing,"default")));
    left-casing-dashes:                                   eval(prop(change_backward_4_right,"default"));
    right-casing-dashes:                                  eval(prop(change_backward_4_left,"default"));
    repeat-image:                                     eval(prop(turn_image_backward_4,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 3]::Lane_Backward_4_Color
{
    offset:                                          eval(prop(lane_offset_backward_4,"default"));
    width:                                            eval(prop(lane_width_backward_4,"default"));
    color:                                                      prop(color_backward_4,"default");
    dashes:                              eval(is_prop_set(restriction_color_backward_4,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_backward_4,"default")?
                                                     prop(restriction_color_backward_4,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_backward_4,     "default")]::Lane_Backward_4_Sign_1
{
    repeat-image:                           eval(prop(sign_1_backward_4,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_4,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_4"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_backward_4,     "default")]::Lane_Backward_4_Sign_2
{
    repeat-image:                           eval(prop(sign_2_backward_4,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_4,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_4"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_backward_4,     "default")]::Lane_Backward_4_Sign_3
{
    repeat-image:                           eval(prop(sign_3_backward_4,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_4,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_4"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 4]::Lane_Backward_5
{
    offset:                                          eval(prop(lane_offset_backward_5,"default"));
    width:                                           eval((prop(lane_width_backward_5,"default")-prop(lane_casing,"default")));
    left-casing-dashes:                                   eval(prop(change_backward_5_right,"default"));
    right-casing-dashes:                                  eval(prop(change_backward_5_left,"default"));
    repeat-image:                                     eval(prop(turn_image_backward_5,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 4]::Lane_Backward_5_Color
{
    offset:                                          eval(prop(lane_offset_backward_5,"default"));
    width:                                            eval(prop(lane_width_backward_5,"default"));
    color:                                                      prop(color_backward_5,"default");
    dashes:                              eval(is_prop_set(restriction_color_backward_5,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_backward_5,"default")?
                                                     prop(restriction_color_backward_5,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_backward_5,     "default")]::Lane_Backward_5_Sign_1
{
    repeat-image:                           eval(prop(sign_1_backward_5,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_5,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_5"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_backward_5,     "default")]::Lane_Backward_5_Sign_2
{
    repeat-image:                           eval(prop(sign_2_backward_5,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_5,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_5"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_backward_5,     "default")]::Lane_Backward_5_Sign_3
{
    repeat-image:                           eval(prop(sign_3_backward_5,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_5,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_5"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 5]::Lane_Backward_6
{
    offset:                                          eval(prop(lane_offset_backward_6,"default"));
    width:                                           eval((prop(lane_width_backward_6,"default")-prop(lane_casing,"default")));
    left-casing-dashes:                                   eval(prop(change_backward_6_right,"default"));
    right-casing-dashes:                                  eval(prop(change_backward_6_left,"default"));
    repeat-image:                                     eval(prop(turn_image_backward_6,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 5]::Lane_Backward_6_Color
{
    offset:                                          eval(prop(lane_offset_backward_6,"default"));
    width:                                            eval(prop(lane_width_backward_6,"default"));
    color:                                                      prop(color_backward_6,"default");
    dashes:                              eval(is_prop_set(restriction_color_backward_6,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_backward_6,"default")?
                                                     prop(restriction_color_backward_6,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_backward_6,     "default")]::Lane_Backward_6_Sign_1
{
    repeat-image:                           eval(prop(sign_1_backward_6,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_6,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_6"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_backward_6,     "default")]::Lane_Backward_6_Sign_2
{
    repeat-image:                           eval(prop(sign_2_backward_6,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_6,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_6"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_backward_6,     "default")]::Lane_Backward_6_Sign_3
{
    repeat-image:                           eval(prop(sign_3_backward_6,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_6,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_6"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 6]::Lane_Backward_7
{
    offset:                                          eval(prop(lane_offset_backward_7,"default"));
    width:                                           eval((prop(lane_width_backward_7,"default")-prop(lane_casing,"default")));
    left-casing-dashes:                                   eval(prop(change_backward_7_right,"default"));
    right-casing-dashes:                                  eval(prop(change_backward_7_left,"default"));
    repeat-image:                                     eval(prop(turn_image_backward_7,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 6]::Lane_Backward_7_Color
{
    offset:                                          eval(prop(lane_offset_backward_7,"default"));
    width:                                            eval(prop(lane_width_backward_7,"default"));
    color:                                                      prop(color_backward_7,"default");
    dashes:                              eval(is_prop_set(restriction_color_backward_7,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_backward_7,"default")?
                                                     prop(restriction_color_backward_7,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_backward_7,     "default")]::Lane_Backward_7_Sign_1
{
    repeat-image:                           eval(prop(sign_1_backward_7,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_7,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_7"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_backward_7,     "default")]::Lane_Backward_7_Sign_2
{
    repeat-image:                           eval(prop(sign_2_backward_7,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_7,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_7"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_backward_7,     "default")]::Lane_Backward_7_Sign_3
{
    repeat-image:                           eval(prop(sign_3_backward_7,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_7,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_7"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 7]::Lane_Backward_8
{
    offset:                                          eval(prop(lane_offset_backward_8,"default"));
    width:                                           eval((prop(lane_width_backward_8,"default")-prop(lane_casing,"default")));
    left-casing-dashes:                                   eval(prop(change_backward_8_right,"default"));
    right-casing-dashes:                                  eval(prop(change_backward_8_left,"default"));
    repeat-image:                                     eval(prop(turn_image_backward_8,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_bwd, "default") > 7]::Lane_Backward_8_Color
{
    offset:                                          eval(prop(lane_offset_backward_8,"default"));
    width:                                            eval(prop(lane_width_backward_8,"default"));
    color:                                                      prop(color_backward_8,"default");
    dashes:                              eval(is_prop_set(restriction_color_backward_8,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_backward_8,"default")?
                                                     prop(restriction_color_backward_8,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}
way|z17-[is_prop_set(sign_1_backward_8,     "default")]::Lane_Backward_8_Sign_1
{
    repeat-image:                           eval(prop(sign_1_backward_8,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_8,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_8"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 3);
}
way|z17-[is_prop_set(sign_2_backward_8,     "default")]::Lane_Backward_8_Sign_2
{
    repeat-image:                           eval(prop(sign_2_backward_8,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_8,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_8"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 2);
}
way|z17-[is_prop_set(sign_3_backward_8,     "default")]::Lane_Backward_8_Sign_3
{
    repeat-image:                           eval(prop(sign_3_backward_8,"default"));
    repeat-image-offset:               eval(prop(lane_offset_backward_8,"default"));
    repeat-image-height: eval(prop(repeat-image-height,"Lane_Backward_8"));
    repeat-image-spacing: eval(prop(repeat-image-height) * 4);    repeat-image-phase: eval(prop(repeat-image-height) * 4);
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Bothways lanes                                                                                                                                   */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok, "default")][prop(lanes_both, "default") > 0]::Lane_Bothways_1
{
    offset:                                          eval(prop(lane_offset_bothways_1,"default"));
    width:                                           eval((prop(lane_width_bothways_1,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                                  eval(prop(change_bothways_1_right,"default"));
    left-casing-dashes:                                   eval(prop(change_bothways_1_left,"default"));
    repeat-image:                                     eval(prop(turn_image_bothways_1,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_both, "default") > 0]::Lane_Bothways_1_Color
{
    offset:                                          eval(prop(lane_offset_bothways_1,"default"));
    width:                                            eval(prop(lane_width_bothways_1,"default"));
    color:                                                      prop(color_bothways_1,"default");
    dashes:                              eval(is_prop_set(restriction_color_bothways_1,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_bothways_1,"default")?
                                                     prop(restriction_color_bothways_1,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_both, "default") > 1]::Lane_Bothways_2
{
    offset:                                          eval(prop(lane_offset_bothways_2,"default"));
    width:                                           eval((prop(lane_width_bothways_2,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                                  eval(prop(change_bothways_2_right,"default"));
    left-casing-dashes:                                   eval(prop(change_bothways_2_left,"default"));
    repeat-image:                                     eval(prop(turn_image_bothways_2,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_both, "default") > 1]::Lane_Bothways_2_Color
{
    offset:                                          eval(prop(lane_offset_bothways_2,"default"));
    width:                                            eval(prop(lane_width_bothways_2,"default"));
    color:                                                      prop(color_bothways_2,"default");
    dashes:                              eval(is_prop_set(restriction_color_bothways_2,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_bothways_2,"default")?
                                                     prop(restriction_color_bothways_2,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_both, "default") > 2]::Lane_Bothways_3
{
    offset:                                          eval(prop(lane_offset_bothways_3,"default"));
    width:                                           eval((prop(lane_width_bothways_3,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                                  eval(prop(change_bothways_3_right,"default"));
    left-casing-dashes:                                   eval(prop(change_bothways_3_left,"default"));
    repeat-image:                                     eval(prop(turn_image_bothways_3,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_both, "default") > 2]::Lane_Bothways_3_Color
{
    offset:                                          eval(prop(lane_offset_bothways_3,"default"));
    width:                                            eval(prop(lane_width_bothways_3,"default"));
    color:                                                      prop(color_bothways_3,"default");
    dashes:                              eval(is_prop_set(restriction_color_bothways_3,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_bothways_3,"default")?
                                                     prop(restriction_color_bothways_3,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}

way|z17-[is_prop_set(ok, "default")][prop(lanes_both, "default") > 3]::Lane_Bothways_4
{
    offset:                                          eval(prop(lane_offset_bothways_4,"default"));
    width:                                           eval((prop(lane_width_bothways_4,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                                  eval(prop(change_bothways_4_right,"default"));
    left-casing-dashes:                                   eval(prop(change_bothways_4_left,"default"));
    repeat-image:                                     eval(prop(turn_image_bothways_4,"default"));

    opacity: 0.0; linecap: none;
    repeat-image-offset: eval(prop(offset));
    repeat-image-height: eval(min(prop(lane_default_width,"default"),prop(width)));
    repeat-image-spacing: eval(prop(repeat-image-height) * 3);
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white; right-casing-opacity: eval(prop(style_markings_opacity,"default"));
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white; left-casing-opacity: eval(prop(style_markings_opacity,"default"));
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}
way|z17-[is_prop_set(ok, "default")][prop(lanes_both, "default") > 3]::Lane_Bothways_4_Color
{
    offset:                                          eval(prop(lane_offset_bothways_4,"default"));
    width:                                            eval(prop(lane_width_bothways_4,"default"));
    color:                                                      prop(color_bothways_4,"default");
    dashes:                              eval(is_prop_set(restriction_color_bothways_4,"default")?list(20,20):prop(unset_property));
    dashes-background-color:             eval(is_prop_set(restriction_color_bothways_4,"default")?
                                                     prop(restriction_color_bothways_4,"default"):prop(unset_property));
    opacity: prop(style_lane_opacity,"default"); linecap: none;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0)); object-z-index: -0.1;
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Railway rendering                                                                                                                               */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
way|z18-[railway=rail]::Railway_Way,
way|z18-[railway=light_rail]::Railway_Way,
way|z18-[railway=subway]::Railway_Way,
way|z18-[railway=miniature]::Railway_Way,
way|z18-[railway=tram]::Railway_Way
{
    /* Determine gauge (safety limits: 1 - 10000 mm) */
    rail_gauge_list: eval(has_tag_key("gauge")?split(";",tag("gauge")):list(1435));
    rail_gauge: eval(get(prop(rail_gauge_list),length(prop(rail_gauge_list))-1));
    rail_gauge: eval(min(10000,cond(prop(rail_gauge)<1,1435,prop(rail_gauge))));
 
    /* Ties should be rendered in case standard and miniature railways; this might be override by the key embedded */
    rail_show_ties: eval(cond(((tag("railway")=="rail") || (tag("railway")=="miniature")),yes,no));
    rail_show_ties: eval(cond(has_tag_key("embedded"),cond(tag("embedded")=="no",yes,no),prop(rail_show_ties)));

    /* Type of electrification:  */
    /*    * rail -> show a yellow border on one rail */
    /*    * contact_line -> show a contact line near the middle of the track */
    rail_show_contact_line: eval(cond(has_tag_key("electrified"),cond(tag("electrified")="contact_line",yes,no),no));
    rail_electrified_rail: eval(cond(has_tag_key("electrified"),cond(tag("electrified")="rail",yes,no),no));
    
    /* Make rails transparent within tunnels */
    rail_image_opacity: eval(cond(((has_tag_key("tunnel")) && (tag("tunnel")=="yes")),0.2,0.8));
    
    /* Create image */
    rail_image: eval(concat(
                cond(prop(rail_show_ties),"<rect x='0' y='0' width='8' height='80' style='stroke:#301004; fill:#90300C;'/>",""),
                "<line x1='0' y1= '8' x2='32' y2= '8' style='stroke:",cond(prop(rail_electrified_rail),"#FFFF00","#301004"),";'/>",
                "<line x1='0' y1='10' x2='32' y2='10' style='stroke:#602008;stroke-width:3px'/>",
                "<line x1='0' y1='12' x2='32' y2='12' style='stroke:#301004;'/>",
                "<line x1='0' y1='67' x2='32' y2='67' style='stroke:#301004;'/>",
                "<line x1='0' y1='69' x2='32' y2='69' style='stroke:#602008;stroke-width:3px'/>",
                "<line x1='0' y1='71' x2='32' y2='71' style='stroke:#301004;'/>",
                cond(prop(rail_show_contact_line),"<line x1='0' y1='35' x2='32' y2='35' style='stroke:#060200;'/>","")
                ));   
    repeat-image: concat("data:image/svg+xml,<svg width='32px' height='80px'><g fill-opacity='",prop(rail_image_opacity),"' opacity='",prop(rail_image_opacity),"'>",prop(rail_image),"</g></svg>");
    repeat-image-height: eval(max(2,ceil((prop(rail_gauge)*prop(pixel_per_metre,"default"))*0.0012)));
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Extra rendering for footways/cycleways if not already rendered                                                                                  */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
way|z17-[!is_prop_set(ok, "default")][highway=footway],
way|z17-[!is_prop_set(ok, "default")][highway=cycleway]
{
    width: eval(2*prop(pixel_per_metre,"default"));
    linecap: none;
    opacity: eval(prop("style_lane_opacity","default"));
    right-casing-width: eval(max(1,0.15*prop(pixel_per_metre,"default")));   right-casing-color: gray;
    left-casing-width:  eval(max(1,0.15*prop(pixel_per_metre,"default")));   left-casing-color:  gray;   
    casing-linecap: none;
    temp: 0;
    temp: eval(prop(temp)+(((tag("highway")="footway")  || ((has_tag_key("foot"))    && (tag("foot")   ="designated")))?1:0));
    temp: eval(prop(temp)+(((tag("highway")="cycleway") || ((has_tag_key("bicycle")) && (tag("bicycle")="designated")))?2:0));
    color: eval(get(prop(style_sidewalk_color,"default"),prop(temp)));
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Additional attributes/features                                                                                                                  */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Proposed man_made=bridge                                                                                                                        */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
area[man_made=bridge]
{
    fill-color: #808080;
    fill-opacity: 0.5;
    color: #404DA0;
    width: 5;
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Proposed highway=junction                                                                                                                       */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
area[highway=junction]
{
    fill-color: #808080;
    fill-opacity: 0.5;
    width: 2;
    color: #505050;
    opacity: 0.5;
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Street lamp                                                                                                                                     */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
node|z17-[highway="street_lamp"]::Lighting_1
{
    symbol-shape: circle;
    symbol-size: eval(12 * prop(pixel_per_metre,"default"));
    symbol-fill-color: white;
    symbol-fill-opacity: 0.07;
}
node|z17-[highway="street_lamp"]::Lighting_2
{
    symbol-shape: circle;
    symbol-size: eval(18 * prop(pixel_per_metre,"default"));
    symbol-fill-color: white;
    symbol-fill-opacity: 0.05;
}
node|z17-[highway="street_lamp"]::Lighting_3
{
    symbol-shape: circle;
    symbol-size: eval(25 * prop(pixel_per_metre,"default"));
    symbol-fill-color: white;
    symbol-fill-opacity: 0.05;
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Lighting                                                                                                                                        */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[lit?][is_prop_set(width,"Ground")]::Lighting_1
{
        width: eval(prop(width,"Ground"));
        width: eval(prop(width)+(is_prop_set(left-casing-width,"Ground")?prop(left-casing-width,"Ground"):0));
        width: eval(prop(width)+(is_prop_set(right-casing-width,"Ground")?prop(right-casing-width,"Ground"):0));
        opacity: 0.1;   color: white;   linecap: none;
        major-z-index: eval(prop(major-z-index,"Ground")-0.1);
        offset: eval(prop(offset,"Ground"));
}
way|z17-[lit?][is_prop_set(width,"Ground")]::Lighting_2
{
        width: eval(prop(width,"Lighting_1")+(3 * prop(pixel_per_metre,"default")));
        opacity: 0.1;   color: white;   linecap: none;
        major-z-index: eval(prop(major-z-index,"Lighting_1")); offset: eval(prop(offset,"Lighting_1"));
}
way|z17-[lit?][is_prop_set(width,"Ground")]::Lighting_3
{
        width: eval(prop(width,"Lighting_2")+(3 * prop(pixel_per_metre,"default")));
        opacity: 0.1;   color: white;   linecap: none;
        major-z-index: eval(prop(major-z-index,"Lighting_1")); offset: eval(prop(offset,"Lighting_1"));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Destination                                                                                                                                     */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok, "default")][destination][!prop(style_use_svg_destination, "default")]::Destination
{
    text-offset: eval(prop("placement_offset","default"));
    text: eval(get(split(";",tag(destination)),0));
    text: eval(has_tag_key("destination:ref")?concat(prop(text)," (",get(split(";",tag("destination:ref")),0),")"):prop(text));
    text: eval(has_tag_key("destination:country")?concat(prop(text)," [",get(split(";",tag("destination:country")),0),"]"):prop(text));
    font-size: eval(prop(lane_default_width,"default"));          text-color: white;        text-opacity: 0.3;    
    text-halo-radius: 2;    text-halo-color: blue;    text-halo-opacity: 0.3;
}
way|z17-[is_prop_set(ok, "default")]["destination:forward"][!prop(style_use_svg_destination, "default")]::Destination_Forward
{
    text-offset: eval(prop("placement_offset","default")+(eval(prop(lane_width_all,"default"))/4));
    text: eval(get(split(";",tag("destination:forward")),0));
    text: eval(has_tag_key("destination:ref:forward")?concat(prop(text)," (",get(split(";",tag("destination:ref:forward")),0),")"):prop(text));
    text: eval(has_tag_key("destination:country:forward")?concat(prop(text)," [",get(split(";",tag("destination:country:forward")),0),"]"):prop(text));
    font-size: eval(prop(lane_default_width,"default"));          text-color: white;        text-opacity: 0.3;    
    text-halo-radius: 2;    text-halo-color: blue;    text-halo-opacity: 0.3;
}
way|z17-[is_prop_set(ok, "default")]["destination:backward"][!prop(style_use_svg_destination, "default")]::Destination_Backward
{
    text-offset: eval(prop("placement_offset","default")-(eval(prop(lane_width_all,"default"))/4));
    text: eval(get(split(";",tag("destination:backward")),0));
    text: eval(has_tag_key("destination:ref:backward")?concat(prop(text)," (",get(split(";",tag("destination:ref:backward")),0),")"):prop(text));
    text: eval(has_tag_key("destination:country:backward")?concat(prop(text)," [",get(split(";",tag("destination:country:backward")),0),"]"):prop(text));
    font-size: eval(prop(lane_default_width,"default"));          text-color: white;        text-opacity: 0.3;    
    text-halo-radius: 2;    text-halo-color: blue;    text-halo-opacity: 0.3;
}

/* TODO: make opacity configurable */
way{} /* If this is removed the following won't be interpreted */
way|z17-[is_prop_set(ok, "default")][destination][prop(style_use_svg_destination, "default")]::Destination
{
    complete_destination: eval(get(split(";",tag(destination)),0));
    complete_destination: eval(has_tag_key("destination:ref")?concat(prop(complete_destination)," (",get(split(";",tag("destination:ref")),0),")"):prop(complete_destination));
    complete_destination: eval(has_tag_key("destination:int_ref")?concat(prop(complete_destination)," <",get(split(";",tag("destination:int_ref")),0),">"):prop(complete_destination));
    complete_destination: eval(has_tag_key("destination:country")?concat(prop(complete_destination)," [",get(split(";",tag("destination:country")),0),"]"):prop(complete_destination));
    /* complete_destination: eval(replace(replace(replace(replace(replace(prop(complete_destination),"&","&amp;"),"[","&#91;"),"]","&#93;"),"<","&lt;"),">","&gt;")); */ 
    complete_destination: eval(XML_encode(replace(prop(complete_destination),"%","prc"))); /* CDATA blocks are not working, XML_encode is not sufficient, currently no idea how to escape % */

    repeat-image: eval(concat("data:image/svg+xml,<svg height='70px'><g fill-opacity='0.3' stroke-opacity='0.3'><text x='0' y='50' font-size='50' fill='white' stroke='blue'>",prop(complete_destination),"</text></g></svg>"));
    repeat-image-height: eval(prop(lane_default_width,"default")*prop(lanes_fwd,"default"));
    repeat-image-offset: eval(prop("placement_offset","default"));
    repeat-image-spacing: eval(prop(repeat-image-height));
    repeat-image-phase: eval(prop(repeat-image-height));
}
way{} /* If this is removed the following won't be interpreted */
way|z17-[is_prop_set(ok, "default")]["destination:forward"][prop(style_use_svg_destination, "default")]::Destination_Forward
{
    complete_destination: eval(get(split(";",tag("destination:forward")),0));
    complete_destination: eval(has_tag_key("destination:ref:forward")?concat(prop(complete_destination)," (",get(split(";",tag("destination:ref:forward")),0),")"):prop(complete_destination));
    complete_destination: eval(has_tag_key("destination:int_ref:forward")?concat(prop(complete_destination)," <",get(split(";",tag("destination:int_ref:forward")),0),">"):prop(complete_destination));
    complete_destination: eval(has_tag_key("destination:country:forward")?concat(prop(complete_destination)," [",get(split(";",tag("destination:country:forward")),0),"]"):prop(complete_destination));
    complete_destination: eval(XML_encode(replace(prop(complete_destination),"%","prc"))); /* CDATA blocks are not working, XML_encode is not sufficient, currently no idea how to escape % */

    repeat-image: eval(concat("data:image/svg+xml,<svg height='70px'><g fill-opacity='0.3' stroke-opacity='0.3'><text x='0' y='50' font-size='50' fill='white' stroke='blue'>",prop(complete_destination),"</text></g></svg>"));
    repeat-image-height: eval(prop(lane_default_width,"default")*prop(lanes_fwd,"default"));
    repeat-image-offset: eval(prop("left_forward_border","default")-(prop("lane_width_all_forward","default")/2));
    repeat-image-spacing: eval(prop(repeat-image-height));
    repeat-image-phase: eval(prop(repeat-image-height));
}
way{} /* If this is removed the following won't be interpreted */
way|z17-[is_prop_set(ok, "default")]["destination:backward"][prop(style_use_svg_destination, "default")]::Destination_Backward
{
    complete_destination: eval(get(split(";",tag("destination:backward")),0));
    complete_destination: eval(has_tag_key("destination:ref:backward")?concat(prop(complete_destination)," (",get(split(";",tag("destination:ref:backward")),0),")"):prop(complete_destination));
    complete_destination: eval(has_tag_key("destination:int_ref:backward")?concat(prop(complete_destination)," <",get(split(";",tag("destination:int_ref:backward")),0),">"):prop(complete_destination));
    complete_destination: eval(has_tag_key("destination:country:backward")?concat(prop(complete_destination)," [",get(split(";",tag("destination:country:backward")),0),"]"):prop(complete_destination));
    complete_destination: eval(XML_encode(replace(prop(complete_destination),"%","prc"))); /* CDATA blocks are not working, XML_encode is not sufficient, currently no idea how to escape % */
    
    repeat-image: eval(concat("data:image/svg+xml,<svg height='70px'><g fill-opacity='0.3' stroke-opacity='0.3'><text x='0' y='50' font-size='50' fill='white' stroke='blue'>",prop(complete_destination),"</text></g></svg>"));
    repeat-image-height: eval(prop(lane_default_width,"default")*prop(lanes_bwd,"default"));
    repeat-image-offset: eval(prop("right_backward_border","default")+(prop("lane_width_all_backward","default")/2));
    repeat-image-spacing: eval(prop(repeat-image-height));
    repeat-image-phase: eval(prop(repeat-image-height));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* destination_sign relation (experimental support - only one sign per way is supported)                                                           */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
relation[is_prop_set(ok, "default")][type="destination_sign"] >[role="to"] way|z17-::Destination_Sign
{   
    sign_font_size: 50;
    sign_border: 5;
    sign_height: 70;
    sign_opacity: 0.5;
    sign_text: eval(parent_tag(destination));
    sign_temp: eval(parent_tag("distance"));
    sign_text: eval(is_prop_set(sign_temp)?concat(prop(sign_text),"  ",replace(replace(prop(sign_temp)," km","")," mi","")):prop(sign_text));
    sign_ref: eval(parent_tag("destination:ref"));
    sign_int_ref: eval(parent_tag("destination:int_ref"));

    sign_text_width: eval(length(prop(sign_text))*prop(sign_font_size)); /* As font-family=monospace is not working, this value is just a guess*/
    sign_text_x: eval((prop(sign_text_width)/2)+(2*prop(sign_border)));
    sign_text_y: eval(prop(sign_font_size));
    
    sign_ref_width: eval(is_prop_set(sign_ref)?(length(prop(sign_ref))*prop(sign_font_size)*1.2):0);
    sign_ref_x: eval(prop(sign_text_width)+(3*prop(sign_border)));
    sign_ref_y: eval(prop(sign_border));
    sign_ref_height: eval(prop(sign_height)-(2*prop(sign_border)));
    sign_ref_text_x: eval(prop(sign_ref_x)+(prop(sign_ref_width)/2));
    sign_ref_text_y: eval(prop(sign_font_size));

    sign_int_ref_width: eval(is_prop_set(sign_int_ref)?(length(prop(sign_int_ref))*prop(sign_font_size)*1.2):0);
    sign_int_ref_x: eval(prop(sign_ref_x)+prop(sign_ref_width));
    sign_int_ref_y: eval(prop(sign_border));
    sign_int_ref_height: eval(prop(sign_height)-(2*prop(sign_border)));
    sign_int_ref_text_x: eval(prop(sign_int_ref_x)+(prop(sign_int_ref_width)/2));
    sign_int_ref_text_y: eval(prop(sign_font_size));
     
    sign_width: eval(((prop(sign_text_width)+(4*prop(sign_border)))+prop(sign_ref_width))+prop(sign_int_ref_width));
    sign_border_width: eval(prop(sign_width)-(prop(sign_border)*2));
    sign_border_height: eval(prop(sign_height)-(prop(sign_border)*2));

    sign_colour_back: eval(parent_tag("colour:back"));
    sign_colour_back: eval(is_prop_set(sign_colour_back)?prop(sign_colour_back):"white");
    
    sign_colour_text: eval(parent_tag("colour:text"));
    sign_colour_text: eval(is_prop_set(sign_colour_text)?prop(sign_colour_text):"blue");

    sign_colour_arrow: eval(parent_tag("colour:arrow"));
    sign_colour_arrow: eval(is_prop_set(sign_colour_arrow)?prop(sign_colour_arrow):"blue");

    sign_colour_ref_text: eval(parent_tag("colour:text:ref"));
    sign_colour_ref_text: eval(is_prop_set(sign_colour_ref)?prop(sign_colour_ref):"white");

    sign_colour_ref_back: eval(parent_tag("colour:back:ref"));
    sign_colour_ref_back: eval(is_prop_set(sign_colour_ref)?prop(sign_colour_ref):"blue");

    sign_colour_int_ref_text: eval(parent_tag("colour:text:int_ref"));
    sign_colour_int_ref_text: eval(is_prop_set(sign_colour_int_ref)?prop(sign_colour_int_ref):"white");

    sign_colour_int_ref_back: eval(parent_tag("colour:back:int_ref"));
    sign_colour_int_ref_back: eval(is_prop_set(sign_colour_int_ref)?prop(sign_colour_int_ref):"green");

    
    repeat-image: eval(concat("data:image/svg+xml,<svg height='",prop(sign_height),"px'><rect fill-opacity='",prop(sign_opacity),"' fill='",prop(sign_colour_back),"' stroke-opacity='",prop(sign_opacity),"' stroke='",prop(sign_colour_arrow),"' stroke-width='",prop(sign_border),"' x='",prop(sign_border),"' y='",prop(sign_border),"' width='",prop(sign_border_width),"' height='",prop(sign_border_height),"'/>",
                              "<g fill-opacity='",prop(sign_opacity),"'><text text-anchor='middle' x='",prop(sign_text_x),"' y='",prop(sign_text_y),"' font-size='",prop(sign_font_size),"' fill='",prop(sign_colour_text),"'>",prop(sign_text),"</text></g>",
                              "<rect fill-opacity='",prop(sign_opacity),"' fill='",prop(sign_colour_ref_back),"' x='",prop(sign_ref_x),"' y='",prop(sign_ref_y),"' width='",prop(sign_ref_width),"' height='",prop(sign_ref_height),"' />",
                              "<g fill-opacity='",prop(sign_opacity),"'><text text-anchor='middle' x='",prop(sign_ref_text_x),"' y='",prop(sign_ref_text_y),"' font-size='",prop(sign_font_size),"' fill='",prop(sign_colour_ref_text),"'>",prop(sign_ref),"</text></g>",
                              "<rect fill-opacity='",prop(sign_opacity),"' fill='",prop(sign_colour_int_ref_back),"' x='",prop(sign_int_ref_x),"' y='",prop(sign_int_ref_y),"' width='",prop(sign_int_ref_width),"' height='",prop(sign_int_ref_height),"' />",
                              "<g fill-opacity='",prop(sign_opacity),"'><text text-anchor='middle' x='",prop(sign_int_ref_text_x),"' y='",prop(sign_int_ref_text_y),"' font-size='",prop(sign_font_size),"' fill='",prop(sign_colour_int_ref_text),"'>",prop(sign_int_ref),"</text></g>",
                              "</svg>"));
    repeat-image-spacing: 100000; /* It means: do not repeat! */
    repeat-image-offset: eval((is_prop_set(left_carriageway_border,"default")?(prop(left_carriageway_border,"default")):0)+(prop(pixel_per_metre,"default")*3));
    repeat-image-height: eval(prop(pixel_per_metre,"default")*3);
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Traffic signs                                                                                                                                   */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/

/* Disable rendering of traffic signs on low zoom levels */
node|z-15[traffic_sign=~/^(.*;)*maxspeed(;.*)*$/],
node|z-15[traffic_sign=~/^(.*;)*overtaking(;.*)*$/]
{       icon-image: prop(unset_property);               }

node|z16-[traffic_sign]
{
  traffic_sign_svg: "";
  traffic_sign_top: 0;
}

/* Speed limit in km/h */
node|z16-[traffic_sign~=maxspeed][maxspeed>0]
{
    t: eval((tag(maxspeed)<10)?1.0:((tag(maxspeed)<100)?0.8:((tag(maxspeed)<1000)?0.6:0.4)));
    t_x: eval((tag(maxspeed)<10)?45:((tag(maxspeed)<100)?60:((tag(maxspeed)<1000)?80:120)));
    t_z: eval((has_tag_key("source:maxspeed") && regexp_test(".*zone.*",tag("source:maxspeed")))?concat("<rect x='0' y='",(prop(traffic_sign_top)+0),"' width='100' height='140' fill='white' /><text style='font-size:40px; font-weight:bold;' x='60' y='",(prop(traffic_sign_top)+135),"' text-anchor='middle' transform='scale(0.8 1.0)'>ZONE</text>"):"");
    traffic_sign_svg: eval(concat(prop(traffic_sign_svg),prop(t_z),"<circle cx='50' cy='",(prop(traffic_sign_top)+50),"' r='45' stroke='red' stroke-width='10' fill='white' /><text style='font-size:60px; font-weight:bold;' x='",prop(t_x),"' y='",(prop(traffic_sign_top)+70),"' text-anchor='middle' transform='scale(",prop(t)," 1.0)'>",tag(maxspeed),"</text>"));
    traffic_sign_top: eval(prop(traffic_sign_top)+((prop(t_z)="")?100:140));
}

/* Speed limit in mph */
node|z16-[traffic_sign~=maxspeed][maxspeed=~/[0-9]+ mph/]
{
    t_speed: eval(get(split(" ",tag(maxspeed)),0));
    t: eval((prop(t_speed)<10)?1.0:((prop(t_speed)<100)?0.8:((prop(t_speed)<1000)?0.6:0.4)));
    t_x: eval((prop(t_speed)<10)?45:((prop(t_speed)<100)?60:((prop(t_speed)<1000)?80:120)));
    t_z: eval((has_tag_key("source:maxspeed") && regexp_test(".*zone.*",tag("source:maxspeed")))?concat("<rect x='0' y='",(prop(traffic_sign_top)+0),"' width='100' height='140' fill='white' /><text style='font-size:40px; font-weight:bold;' x='60' y='",(prop(traffic_sign_top)+135),"' text-anchor='middle' transform='scale(0.8 1.0)'>ZONE</text>"):"");
    traffic_sign_svg: eval(concat(prop(traffic_sign_svg),prop(t_z),"<circle cx='50' cy='",(prop(traffic_sign_top)+50),"' r='45' stroke='red' stroke-width='10' fill='yellow' /><text style='font-size:60px; font-weight:bold;' x='",prop(t_x),"' y='",(prop(traffic_sign_top)+70),"' text-anchor='middle' transform='scale(",prop(t)," 1.0)'>",prop(t_speed),"</text>"));
    traffic_sign_top: eval(prop(traffic_sign_top)+((prop(t_z)="")?100:140));
}

/* End of speed limit but not overtaking allowed (otherwise single traffic sign -> see below) */
node|z16-[traffic_sign~=maxspeed][maxspeed=implicit][overtaking!=yes],
node|z16-[traffic_sign~=maxspeed][maxspeed=implicit][overtaking=yes]["source:maxspeed"=~/.*zone.*/]
{
    t_z: eval((has_tag_key("source:maxspeed") && regexp_test(".*zone.*",tag("source:maxspeed")))?"<rect x='0' y='0' width='100' height='140' fill='white' /><text style='font-size:40px; font-weight:bold;' x='60' y='135' text-anchor='middle' transform='scale(0.8 1.0)'>ZONE</text>":"");
    traffic_sign_svg: eval(concat(prop(traffic_sign_svg),prop(t_z),"<circle cx='50' cy='",(prop(traffic_sign_top)+50),"' r='50' fill='white' /><circle cx='50' cy='",(prop(traffic_sign_top)+50),"' r='46' stroke='black' stroke-width='3' fill='white' /><text style='fill:#DDD; font-size:60px; font-weight:bold;' x='47' y='",(prop(traffic_sign_top)+70),"' text-anchor='middle'>XX</text><line x1='17' y1='",(prop(traffic_sign_top)+83),"' x2='83' y2='",(prop(traffic_sign_top)+17),"' stroke='black' stroke-width='15' />"));
    traffic_sign_top: eval(prop(traffic_sign_top)+((prop(t_z)="")?100:140));
}

/* No overtaking */
node|z16-[traffic_sign~=overtaking][overtaking=no]
{
    traffic_sign_svg: eval(concat(prop(traffic_sign_svg),"<g transform='translate(0,",prop(traffic_sign_top),")'><g transform='scale(0.137931)'><circle cx='362.5' cy='362.5' r='350' style='fill:white;stroke:black;stroke-width:2.5px' /><circle cx='362.5' cy='362.5' r='290' style='fill:white;stroke:#c00;stroke-width:93.75'/><path d='M 151.8,375.1 C 151.4,338.9 149.4,370.0 171.2,316.4 C 187.0,279.9 171.0,289.7 252.7,288.4 C 325.3,289.9 310.7,279.3 327.4,318.1 C 348.3,367.6 346.7,341.7 346.5,374.0 C 345.7,409.5 358.9,400.4 248.9,401.6 C 139.7,400.1 152.7,409.4 151.9,375.1 z M 174.0,340.1 L 188.9,305.6 C 191.7,299.5 190.8,300.4 197.3,300.4 L 301.8,300.4 C 307.4,300.4 306.6,300.0 308.9,305.4 L 323.8,339.7 L 174.0,340.1 z M 163.3,405.5 L 191.2,405.5 C 191.1,440.6 194.0,438.6 178.8,438.8 C 160.7,438.8 163.5,440.6 163.3,405.6 z M 307.2,405.8 L 335.2,405.8 C 335.0,440.9 337.5,438.5 321.7,438.6 C 305.3,438.4 307.4,441.0 307.2,405.8 z ' style='fill:#c00;fill-rule:evenodd' />",
                                  "<path d='M 377.4,375.1 C 376.9,338.9 375.0,370.0 396.8,316.4 C 412.6,279.9 396.6,289.7 478.2,288.4 C 550.9,289.9 536.2,279.3 552.9,318.1 C 573.8,367.6 572.2,341.7 572.1,374.0 C 571.3,409.5 584.4,400.4 474.4,401.6 C 365.3,400.1 378.2,409.4 377.4,375.1 z M 399.5,340.1 L 414.5,305.6 C 417.2,299.5 416.4,300.4 422.9,300.4 L 527.3,300.4 C 533.0,300.4 532.2,300.0 534.5,305.4 L 549.3,339.7 L 399.5,340.1 z M 388.8,405.6 L 416.8,405.5 C 416.7,440.6 419.6,438.6 404.4,438.8 C 386.2,438.8 389.1,440.6 388.8,405.6 z M 532.7,405.8 L 560.7,405.8 C 560.5,440.9 563.1,438.5 547.2,438.6 C 530.9,438.4 532.9,441.0 532.7,405.8 z ' style='fill:black;fill-rule:evenodd' /></g></g>"));
    traffic_sign_top: eval(prop(traffic_sign_top)+100);
}

/* Overtaking allowed and also not implicit speed limit (or implicit speed zone)*/
node|z16-[traffic_sign~=overtaking][overtaking=yes][maxspeed!=implicit],
node|z16-[traffic_sign~=overtaking][overtaking=yes][maxspeed=implicit]["source:maxspeed"=~/.*zone.*/]
{
    traffic_sign_svg: eval(concat(prop(traffic_sign_svg),"<g transform='translate(0,",prop(traffic_sign_top),")'><g transform='scale(0.137931)'><circle cx='362.5' cy='362.5' r='350' style='fill:white;stroke:black;stroke-width:2.5px' /><circle cx='362.5' cy='362.5' r='330' style='fill:white;stroke:black;stroke-width:20'/><path d='M 151.8,375.1 C 151.4,338.9 149.4,370.0 171.2,316.4 C 187.0,279.9 171.0,289.7 252.7,288.4 C 325.3,289.9 310.7,279.3 327.4,318.1 C 348.3,367.6 346.7,341.7 346.5,374.0 C 345.7,409.5 358.9,400.4 248.9,401.6 C 139.7,400.1 152.7,409.4 151.9,375.1 z M 174.0,340.1 L 188.9,305.6 C 191.7,299.5 190.8,300.4 197.3,300.4 L 301.8,300.4 C 307.4,300.4 306.6,300.0 308.9,305.4 L 323.8,339.7 L 174.0,340.1 z M 163.3,405.5 L 191.2,405.5 C 191.1,440.6 194.0,438.6 178.8,438.8 C 160.7,438.8 163.5,440.6 163.3,405.6 z M 307.2,405.8 L 335.2,405.8 C 335.0,440.9 337.5,438.5 321.7,438.6 C 305.3,438.4 307.4,441.0 307.2,405.8 z ' style='fill:gray;fill-rule:evenodd' />",
                                  "<path d='M 377.4,375.1 C 376.9,338.9 375.0,370.0 396.8,316.4 C 412.6,279.9 396.6,289.7 478.2,288.4 C 550.9,289.9 536.2,279.3 552.9,318.1 C 573.8,367.6 572.2,341.7 572.1,374.0 C 571.3,409.5 584.4,400.4 474.4,401.6 C 365.3,400.1 378.2,409.4 377.4,375.1 z M 399.5,340.1 L 414.5,305.6 C 417.2,299.5 416.4,300.4 422.9,300.4 L 527.3,300.4 C 533.0,300.4 532.2,300.0 534.5,305.4 L 549.3,339.7 L 399.5,340.1 z M 388.8,405.6 L 416.8,405.5 C 416.7,440.6 419.6,438.6 404.4,438.8 C 386.2,438.8 389.1,440.6 388.8,405.6 z M 532.7,405.8 L 560.7,405.8 C 560.5,440.9 563.1,438.5 547.2,438.6 C 530.9,438.4 532.9,441.0 532.7,405.8 z ' style='fill:gray;fill-rule:evenodd' /></g><line x1='18' y1='82' x2='82' y2='18' stroke='black' stroke-width='15' /></g>"));
    traffic_sign_top: eval(prop(traffic_sign_top)+100);
}

/* End of speed limit (not zone!) and also overtaking allowed -> single traffic sign*/
node|z16-[traffic_sign~=maxspeed][maxspeed=implicit][overtaking=yes][!"source:maxspeed"],
node|z16-[traffic_sign~=maxspeed][maxspeed=implicit][overtaking=yes]["source:maxspeed"=~/^((?!zone).)*$/]
{
    traffic_sign_svg: eval(concat(prop(traffic_sign_svg),"<circle cx='50' cy='",(prop(traffic_sign_top)+50),"' r='50' fill='white' /><circle cx='50' cy='",(prop(traffic_sign_top)+50),"' r='46' stroke='black' stroke-width='3' fill='white' /><line x1='17' y1='",(prop(traffic_sign_top)+83),"' x2='83' y2='",(prop(traffic_sign_top)+17),"' stroke='black' stroke-width='15' />"));
    traffic_sign_top: eval(prop(traffic_sign_top)+100);
}

/* Now render the traffic sign */
node|z16-[!(prop(traffic_sign_svg,"default")="")]
{
    major-z-index: 5; /* JOSM added some default rendering, which interferes with this */
    icon-image: eval(concat("data:image/svg+xml,<svg width='100px' height='",prop(traffic_sign_top),"'>",prop(traffic_sign_svg),"</svg>"));
    icon-width: eval(max(12,prop(pixel_per_metre)));
}

/* Disable JOSMs default rendering (this is a hack and may fail at any time) */
/* Make sure, that the selector is identical to the one that actually renders the traffic sign */
node|z16-[!(prop(traffic_sign_svg,"default")="")]::core_maxnodebg 
{
    symbol-shape: none;
}
node|z16-[!(prop(traffic_sign_svg,"default")="")]::core_maxnodefg 
{
    text: none;
    symbol-shape: none;
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Member nodes of enforcement relations                                                                                                           */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
relation[type="enforcement"] >[role="from"] node
{   
    symbol-stroke-color: #00FF00; symbol-shape: square; symbol-size: 5; symbol-stroke-width: 2;
}
relation[type="enforcement"] >[role="to"] node
{   
    symbol-stroke-color: #FF0000; symbol-shape: square; symbol-size: 5; symbol-stroke-width: 2;
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Check for some common errors                                                                                                                    */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
way{} /* Why-oh-why do I need this.... */

/* Discouraged alternative values for oneway */
way[oneway=true], way[oneway=1]                 { data_error:   "use oneway=yes"; }

/* Rejected turn lanes proposal */
way["lanes:turnright"], way["lanes:turnleft"],
way["lanes:through"], way["lanes:merge"],
way["lanes:turnright:forward"], way["lanes:turnleft:forward"],
way["lanes:through:forward"], way["lanes:merge:forward"],       
way["lanes:turnright:backward"], way["lanes:turnleft:backward"],
way["lanes:through:backward"], way["lanes:merge:backward"]      
                                                { data_error:   "lanes:<turn> rejected"; }

/* Common typos in destination tags */
way["destination:forward:ref"]                  { data_error:   "use destination:ref:forward"; }
way["destination:backward:ref"]                 { data_error:   "use destination:ref:backward"; }
way["destination:forward:int_ref"]              { data_error:   "use destination:int_ref:forward"; }
way["destination:backward:int_ref"]             { data_error:   "use destination:int_ref:backward"; }
way["destination:forward:symbol"]               { data_error:   "use destination:symbol:forward"; }
way["destination:backward:symbol"]              { data_error:   "use destination:symbol:backward"; }
way["destination:forward:country"]              { data_error:   "use destination:country:forward"; }
way["destination:backward:country"]             { data_error:   "use destination:country:backward"; }

way["destination:sign"]                         { data_error:   "use destination:symbol"; }
way["destination:sign:forward"]                 { data_error:   "use destination:symbol"; }
way["destination:sign:backward"]                { data_error:   "use destination:symbol"; }
way["destination:sign:lanes"]                   { data_error:   "use destination:symbol"; }
way["destination:sign:lanes:forward"]           { data_error:   "use destination:symbol"; }
way["destination:sign:lanes:backward"]          { data_error:   "use destination:symbol"; }

way[destination=~/:\S/]                         { data_error:   "use ; instead of : to separate values"; }
way[destination:lanes=~/:\S/]                   { data_error:   "use ; instead of : to separate values"; }
way[destination:lanes:forward=~/:\S/]           { data_error:   "use ; instead of : to separate values"; }
way[destination:lanes:backward=~/:\S/]          { data_error:   "use ; instead of : to separate values"; }

way[destination=~/,/]                           { data_error:   "use ; instead of , to separate values"; }
way[destination:lanes=~/,/]                     { data_error:   "use ; instead of , to separate values"; }
way[destination:lanes:forward=~/,/]             { data_error:   "use ; instead of , to separate values"; }
way[destination:lanes:backward=~/,/]            { data_error:   "use ; instead of , to separate values"; }

way["transit"] { data_error: eval(regexp_test("^(continue|fork|fork:[3-9]|new_on_left|new_on_left:[2-9]|new_on_right|new_on_right:[2-9]|join_with_left|join_with_right|end|leave|;)*$",tag("transit"))?prop(data_error):"invalid transit value"); }
way["transit:forward"] { data_error: eval(regexp_test("^(continue|fork|fork:[3-9]|new_on_left|new_on_left:[2-9]|new_on_right|new_on_right:[2-9]|join_with_left|join_with_right|end|leave|;)*$",tag("transit:forward"))?prop(data_error):"invalid transit:forward value"); }
way["transit:backward"] { data_error: eval(regexp_test("^(continue|fork|fork:[3-9]|new_on_left|new_on_left:[2-9]|new_on_right|new_on_right:[2-9]|join_with_left|join_with_right|end|leave|;)*$",tag("transit:backward"))?prop(data_error):"invalid transit:backward value"); }
way["transit:lanes"] { data_error: eval(regexp_test("^(continue|fork|fork:[3-9]|new_on_left|new_on_left:[2-9]|new_on_right|new_on_right:[2-9]|join_with_left|join_with_right|end|leave|;|\\|)*$",tag("transit:lanes"))?prop(data_error):"invalid transit:lanes value"); }
way["transit:lanes:forward"] { data_error: eval(regexp_test("^(continue|fork|fork:[3-9]|new_on_left|new_on_left:[2-9]|new_on_right|new_on_right:[2-9]|join_with_left|join_with_right|end|leave|;|\\|)*$",tag("transit:lanes:forward"))?prop(data_error):"invalid transit:lanes:forward value"); }
way["transit:lanes:backward"] { data_error: eval(regexp_test("^(continue|fork|fork:[3-9]|new_on_left|new_on_left:[2-9]|new_on_right|new_on_right:[2-9]|join_with_left|join_with_right|end|leave|;|\\|)*$",tag("transit:lanes:backward"))?prop(data_error):"invalid transit:lanes:backward value"); }
way["transit:both_ways"]                        { data_error:   "use the relation instead of transit:both_ways"; }
way["transit:lanes:both_ways"]                  { data_error:   "use the relation instead of transit:lanes:both_ways"; }

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Disputed checks: disabled by default                                                                                                            */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* maxspeed should be numerical (yes, this is disputed, I know, that's why this is disabled by default) */
way[prop(style_show_disputed)][maxspeed] { data_error: eval(regexp_test("^[0-9]+(| mph| km/h)$",tag(maxspeed))?prop(data_error):"maxspeed not numerical"); }
way[prop(style_show_disputed)]["maxspeed:forward"] { data_error: eval(regexp_test("^[0-9]+(| mph| km/h)$",tag("maxspeed:forward"))?prop(data_error):"maxspeed:forward not numerical"); }
way[prop(style_show_disputed)]["maxspeed:backward"] { data_error: eval(regexp_test("^[0-9]+(| mph| km/h)$",tag("maxspeed:backward"))?prop(data_error):"maxspeed:backward not numerical"); }
/* A source should be given for maxspeed */
way[prop(style_show_disputed)][maxspeed][!"source:maxspeed"]            { data_warning: "source:maxspeed missing"; }
/* Value of source:maxspeed should be <country code>:<context> */
way[prop(style_show_disputed)]["source:maxspeed"] { data_warning: eval(regexp_test("^([A-Z][A-Z]:.+|zone|sign)$",tag("source:maxspeed"))?prop(data_warning):"verify source:maxspeed"); }

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Display warnings/errors                                                                                                                         */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way[is_prop_set(data_warning)][prop(style_show_warnings)=yes]
{
    casing-width: 4;
    casing-color: yellow;
    text: eval(prop(data_warning));
    font-size: 12;
    text-halo-radius: 1;
}
way[is_prop_set(data_error)][prop(style_show_errors)=yes]
{
    casing-width: 5;
    casing-color: red;
    text: eval(prop(data_error));
    font-size: 14;
    text-halo-radius: 1;
}
               

Styles_Enhanced_Lane_and_Road_Attributes-style.mapcss, Styles_Enhanced_Lane_and_Road_Attributes.zip

Note: See TracWiki for help on using the wiki.