wiki:Styles/Lane_and_Road_Attributes

Version 1 (modified by imagic, 9 years ago) (diff)

--

This style visualizes common variants of the following tags:

  • lanes (Number of lanes for motorized traffic)
  • width (Width of the carriageway. The tag width:lanes for lane-dependent width is also supported)
  • change (Allowed lane changes)
  • turn (Turning lanes)
  • cycleway (Only cycle tracks are supported if specified with cycleway. Cycle lanes need bicycle:lanes to be displayed.)
  • bicycle:lanes (Dedicated bicycle lanes)
  • bus:lanes (Dedicated bus lanes)
  • psv:lanes (Dedicated PSV lanes)
  • placement (Placement of the road relative to the OSM-way. The valuation transition is not supported.)
  • man_made=bridge (Outline of a bridge)
  • lit and highway=street_lamp (Street lightning)

Some common tagging errors are detected and displayed. The style also supports left-hand traffic if the parameter style_right_hand_traffic is set to no.

meta {
    title: "Lane and road attributes";
    description: "Visualization of lanes, width, turn lanes, changing the lane, lightning and street lamps, sidewalk, cycletracks, bicycle lanes, bus lanes, psv lanes.";
    author: "Martin Vonwald";
    version: "0.99-beta.66_2021-03-23";
    license: "CC-BY-SA";
    min-josm-version: "5714";
}

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


/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Global settings and initialization                                                                                                             */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
way
{
  /* Settings: change if necessary */
  style_right_hand_traffic: yes;
  style_lane_opacity: 0.5;
  style_ground_opacity: 0.5;
  style_show_warnings: yes;
  style_show_errors: yes;
  style_show_disputed: no;

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

  /* Color of the lane if bicycle=designated */
  style_bicycle_color: #8080C0;

  /* Color of the dashes if lanes is psv=designated */
  style_psv_color: red;

  /* Color of the dashes if lanes is bus=designated */
  style_bus_color: red;
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 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],
way[cycleway=track],way[cycleway:left],way[cycleway:right],way[cycleway:both]
{ 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; }

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Pixel per metre (on average)                                                                                                                    */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
*|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; }

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Colors                                                                                                                                          */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
way[is_prop_set(ok)]
{
    /* Base color of the carriage way */
    ground-color:   eval((has_tag_key(lit)&&(tag(lit)=yes))?#707070:#404040);

    /* Individual colors for each direction */
    color_forward:  eval(rgb(red(prop(ground-color))    ,green(prop(ground-color))+0.1,blue(prop(ground-color))    ));
    color_backward: eval(rgb(red(prop(ground-color))+0.1,green(prop(ground-color))    ,blue(prop(ground-color))    ));
    color_bothways: eval(rgb(red(prop(ground-color))    ,green(prop(ground-color))    ,blue(prop(ground-color))+0.1));
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 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);

    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                                                                          */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 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"][oneway?],
way|z17-[is_prop_set(ok)]["change"][oneway?]
{
    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")))));
    data_error: eval(regexp_test("^(yes|no|only_left|only_right|not_left|not_right|\\|)*$",prop(temp))?prop(data_error):"invalid forward change lanes");
    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"][oneway=-1],
way|z17-[is_prop_set(ok)]["change"][oneway=-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")))));
    data_error: eval(regexp_test("^(yes|no|only_left|only_right|not_left|not_right|\\|)*$",prop(temp))?prop(data_error):"invalid backward change lanes");
    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")));
    data_error: eval(regexp_test("^(yes|no|only_left|only_right|not_left|not_right|\\|)*$",prop(temp))?prop(data_error):"invalid both_ways change lanes");
    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));
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Determine turning lanes                                                                                                                         */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Forward lanes                                                                                                                                   */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]
{
        /* Pixel matrix 9x24; numbers are off/on/off/on/off; 0.01 is - more or less - ignored */
        turn_matrix: 
                list(
                        "",
                        list(list(24,0.01,0.01,0.01,0.01),list(24,0.01,0.01,0.01,0.01),list(15,1,8,0.01,0.01),list(15,2,7,0.01,0.01),list(6,12,6,0.01,0.01),list(15,2,7,0.01,0.01),list(15,1,8,0.01,0.01),list(24,0.01,0.01,0.01,0.01),list(24,0.01,0.01,0.01,0.01)),
                        list(list(11,1,12,0.01,0.01),list(10,3,11,0.01,0.01),list(9,5,10,0.01,0.01),list(11,1,12,0.01,0.01),list(6,6,12,0.01,0.01),list(24,0.01,0.01,0.01,0.01),list(24,0.01,0.01,0.01,0.01),list(24,0.01,0.01,0.01,0.01),list(24,0.01,0.01,0.01,0.01)),
                        list(list(11,1,12,0.01,0.01),list(10,3,11,0.01,0.01),list(9,5,1,1,8),list(11,1,3,2,7),list(6,12,6,0.01,0.01),list(15,2,7,0.01,0.01),list(15,1,8,0.01,0.01),list(24,0.01,0.01,0.01,0.01),list(24,0.01,0.01,0.01,0.01)),
                        list(list(24,0.01,0.01,0.01,0.01),list(24,0.01,0.01,0.01,0.01),list(24,0.01,0.01,0.01,0.01),list(24,0.01,0.01,0.01,0.01),list(6,6,12,0.01,0.01),list(11,1,12,0.01,0.01),list(9,5,10,0.01,0.01),list(10,3,11,0.01,0.01),list(11,1,12,0.01,0.01)),
                        list(list(24,0.01,0.01,0.01,0.01),list(24,0.01,0.01,0.01,0.01),list(15,1,8,0.01,0.01),list(15,2,7,0.01,0.01),list(6,12,6,0.01,0.01),list(11,1,3,2,7),list(9,5,1,1,8),list(10,3,11,0.01,0.01),list(11,1,12,0.01,0.01)),
                        list(list(11,1,12,0.01,0.01),list(10,3,11,0.01,0.01),list(9,5,10,0.01,0.01),list(11,1,12,0.01,0.01),list(6,6,12,0.01,0.01),list(11,1,12,0.01,0.01),list(9,5,10,0.01,0.01),list(10,3,11,0.01,0.01),list(11,1,12,0.01,0.01)),
                        list(list(11,1,12,0.01,0.01),list(10,3,11,0.01,0.01),list(9,5,1,1,8),list(11,1,3,2,7),list(6,12,6,0.01,0.01),list(11,1,3,2,7),list(9,5,1,1,8),list(10,3,11,0.01,0.01),list(11,1,12,0.01,0.01))
                    );
}


way|z17-[is_prop_set(ok)]["turn:lanes:forward"],
way|z17-[is_prop_set(ok)]["turn:forward"],
way|z17-[is_prop_set(ok)]["turn:lanes"][oneway?],
way|z17-[is_prop_set(ok)]["turn"][oneway?]
{
    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")
                                    ))));
    /* Work aorund for issue with the lenght() function temp: eval(regexp_test(".*([|])$",prop(temp))?concat(prop(temp),"none"):prop(temp)); */
    data_error: eval(regexp_test("^(none|through|left|slight_left|sharp_left|right|slight_right|sharp_right|merge_to_left|merge_to_right|;|\\|)*$",prop(temp))?prop(data_error):"invalid forward turn lanes");
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));

    /* Binary coded: through=1, left=2, right=4 => result is index in the turn_matrix list*/
    turn_forward_1: eval(length((prop(temp_length)>0)?(concat(regexp_test(".*left.*",get(prop(temp_list),0))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),0))?"t":"",regexp_test(".*right.*",get(prop(temp_list),0))?"rrrr":"")):""));
    turn_forward_2: eval(length((prop(temp_length)>1)?(concat(regexp_test(".*left.*",get(prop(temp_list),1))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),1))?"t":"",regexp_test(".*right.*",get(prop(temp_list),1))?"rrrr":"")):""));
    turn_forward_3: eval(length((prop(temp_length)>2)?(concat(regexp_test(".*left.*",get(prop(temp_list),2))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),2))?"t":"",regexp_test(".*right.*",get(prop(temp_list),2))?"rrrr":"")):""));
    turn_forward_4: eval(length((prop(temp_length)>3)?(concat(regexp_test(".*left.*",get(prop(temp_list),3))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),3))?"t":"",regexp_test(".*right.*",get(prop(temp_list),3))?"rrrr":"")):""));
    turn_forward_5: eval(length((prop(temp_length)>4)?(concat(regexp_test(".*left.*",get(prop(temp_list),4))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),4))?"t":"",regexp_test(".*right.*",get(prop(temp_list),4))?"rrrr":"")):""));
    turn_forward_6: eval(length((prop(temp_length)>5)?(concat(regexp_test(".*left.*",get(prop(temp_list),5))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),5))?"t":"",regexp_test(".*right.*",get(prop(temp_list),5))?"rrrr":"")):""));
    turn_forward_7: eval(length((prop(temp_length)>6)?(concat(regexp_test(".*left.*",get(prop(temp_list),6))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),6))?"t":"",regexp_test(".*right.*",get(prop(temp_list),6))?"rrrr":"")):""));
    turn_forward_8: eval(length((prop(temp_length)>7)?(concat(regexp_test(".*left.*",get(prop(temp_list),7))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),7))?"t":"",regexp_test(".*right.*",get(prop(temp_list),7))?"rrrr":"")):""));

    /* Get the relevant code from the list or unset the property*/
    turn_forward_1: eval((prop(turn_forward_1)>0)?get(prop(turn_matrix),prop(turn_forward_1)):prop(unset_property));
    turn_forward_2: eval((prop(turn_forward_2)>0)?get(prop(turn_matrix),prop(turn_forward_2)):prop(unset_property));
    turn_forward_3: eval((prop(turn_forward_3)>0)?get(prop(turn_matrix),prop(turn_forward_3)):prop(unset_property));
    turn_forward_4: eval((prop(turn_forward_4)>0)?get(prop(turn_matrix),prop(turn_forward_4)):prop(unset_property));
    turn_forward_5: eval((prop(turn_forward_5)>0)?get(prop(turn_matrix),prop(turn_forward_5)):prop(unset_property));
    turn_forward_6: eval((prop(turn_forward_6)>0)?get(prop(turn_matrix),prop(turn_forward_6)):prop(unset_property));
    turn_forward_7: eval((prop(turn_forward_7)>0)?get(prop(turn_matrix),prop(turn_forward_7)):prop(unset_property));
    turn_forward_8: eval((prop(turn_forward_8)>0)?get(prop(turn_matrix),prop(turn_forward_8)):prop(unset_property));

    /* 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                                                                                                                                   */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["turn:lanes:backward"],
way|z17-[is_prop_set(ok)]["turn:backward"],
way|z17-[is_prop_set(ok)]["turn:lanes"][oneway=-1],
way|z17-[is_prop_set(ok)]["turn"][oneway=-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")
                                    ))));
    /* Work aorund for issue with the lenght() function temp: eval(regexp_test(".*([|])$",prop(temp))?concat(prop(temp),"none"):prop(temp)); */
    data_error: eval(regexp_test("^(none|through|left|slight_left|sharp_left|right|slight_right|sharp_right|merge_to_left|merge_to_right|;|\\|)*$",prop(temp))?prop(data_error):"invalid backward turn lanes");
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));

    /* Binary coded: through=1, left=2, right=4 => result is index in the turn_matrix list*/
    turn_backward_1: eval(length((prop(temp_length)>0)?(concat(regexp_test(".*left.*",get(prop(temp_list),0))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),0))?"t":"",regexp_test(".*right.*",get(prop(temp_list),0))?"rrrr":"")):""));
    turn_backward_2: eval(length((prop(temp_length)>1)?(concat(regexp_test(".*left.*",get(prop(temp_list),1))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),1))?"t":"",regexp_test(".*right.*",get(prop(temp_list),1))?"rrrr":"")):""));
    turn_backward_3: eval(length((prop(temp_length)>2)?(concat(regexp_test(".*left.*",get(prop(temp_list),2))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),2))?"t":"",regexp_test(".*right.*",get(prop(temp_list),2))?"rrrr":"")):""));
    turn_backward_4: eval(length((prop(temp_length)>3)?(concat(regexp_test(".*left.*",get(prop(temp_list),3))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),3))?"t":"",regexp_test(".*right.*",get(prop(temp_list),3))?"rrrr":"")):""));
    turn_backward_5: eval(length((prop(temp_length)>4)?(concat(regexp_test(".*left.*",get(prop(temp_list),4))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),4))?"t":"",regexp_test(".*right.*",get(prop(temp_list),4))?"rrrr":"")):""));
    turn_backward_6: eval(length((prop(temp_length)>5)?(concat(regexp_test(".*left.*",get(prop(temp_list),5))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),5))?"t":"",regexp_test(".*right.*",get(prop(temp_list),5))?"rrrr":"")):""));
    turn_backward_7: eval(length((prop(temp_length)>6)?(concat(regexp_test(".*left.*",get(prop(temp_list),6))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),6))?"t":"",regexp_test(".*right.*",get(prop(temp_list),6))?"rrrr":"")):""));
    turn_backward_8: eval(length((prop(temp_length)>7)?(concat(regexp_test(".*left.*",get(prop(temp_list),7))?"ll":"",regexp_test(".*through.*",get(prop(temp_list),7))?"t":"",regexp_test(".*right.*",get(prop(temp_list),7))?"rrrr":"")):""));

    /* Get the relevant code from the list or unset the property*/
    turn_backward_1: eval((prop(turn_backward_1)>0)?get(prop(turn_matrix),prop(turn_backward_1)):prop(unset_property));
    turn_backward_2: eval((prop(turn_backward_2)>0)?get(prop(turn_matrix),prop(turn_backward_2)):prop(unset_property));
    turn_backward_3: eval((prop(turn_backward_3)>0)?get(prop(turn_matrix),prop(turn_backward_3)):prop(unset_property));
    turn_backward_4: eval((prop(turn_backward_4)>0)?get(prop(turn_matrix),prop(turn_backward_4)):prop(unset_property));
    turn_backward_5: eval((prop(turn_backward_5)>0)?get(prop(turn_matrix),prop(turn_backward_5)):prop(unset_property));
    turn_backward_6: eval((prop(turn_backward_6)>0)?get(prop(turn_matrix),prop(turn_backward_6)):prop(unset_property));
    turn_backward_7: eval((prop(turn_backward_7)>0)?get(prop(turn_matrix),prop(turn_backward_7)):prop(unset_property));
    turn_backward_8: eval((prop(turn_backward_8)>0)?get(prop(turn_matrix),prop(turn_backward_8)):prop(unset_property));

    /* 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));
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Designated lanes                                                                                                                                */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 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"][oneway?],
way|z17-[is_prop_set(ok)]["bus"][oneway?]
{
    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)));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_forward_1));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_forward_2));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_forward_3));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_forward_4));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_forward_5));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_forward_6));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_forward_7));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_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"][oneway=-1],
way|z17-[is_prop_set(ok)]["bus"][oneway=-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)));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_forward_1));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_forward_2));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_forward_3));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_forward_4));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_forward_5));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_forward_6));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_forward_7));
    designated_color_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"))))?prop(style_bus_color):prop(designated_color_forward_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));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 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"][oneway?],
way|z17-[is_prop_set(ok)]["psv"][oneway?]
{
    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)));


    designated_color_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"))))?prop(style_psv_color):prop(designated_color_forward_1));
    designated_color_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"))))?prop(style_psv_color):prop(designated_color_forward_2));
    designated_color_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"))))?prop(style_psv_color):prop(designated_color_forward_3));
    designated_color_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"))))?prop(style_psv_color):prop(designated_color_forward_4));
    designated_color_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"))))?prop(style_psv_color):prop(designated_color_forward_5));
    designated_color_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"))))?prop(style_psv_color):prop(designated_color_forward_6));
    designated_color_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"))))?prop(style_psv_color):prop(designated_color_forward_7));
    designated_color_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"))))?prop(style_psv_color):prop(designated_color_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"][oneway=-1],
way|z17-[is_prop_set(ok)]["psv"][oneway=-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)));
    designated_color_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"))))?prop(style_psv_color):prop(designated_color_backward_1));
    designated_color_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"))))?prop(style_psv_color):prop(designated_color_backward_2));
    designated_color_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"))))?prop(style_psv_color):prop(designated_color_backward_3));
    designated_color_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"))))?prop(style_psv_color):prop(designated_color_backward_4));
    designated_color_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"))))?prop(style_psv_color):prop(designated_color_backward_5));
    designated_color_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"))))?prop(style_psv_color):prop(designated_color_backward_6));
    designated_color_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"))))?prop(style_psv_color):prop(designated_color_backward_7));
    designated_color_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"))))?prop(style_psv_color):prop(designated_color_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));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 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"][oneway?],
way|z17-[is_prop_set(ok)]["bicycle"][oneway?]
{
    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)));
    color_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"))))?prop(style_bicycle_color):prop(color_forward_1));
    color_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"))))?prop(style_bicycle_color):prop(color_forward_2));
    color_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"))))?prop(style_bicycle_color):prop(color_forward_3));
    color_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"))))?prop(style_bicycle_color):prop(color_forward_4));
    color_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"))))?prop(style_bicycle_color):prop(color_forward_5));
    color_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"))))?prop(style_bicycle_color):prop(color_forward_6));
    color_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"))))?prop(style_bicycle_color):prop(color_forward_7));
    color_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"))))?prop(style_bicycle_color):prop(color_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"][oneway=-1],
way|z17-[is_prop_set(ok)]["bicycle"][oneway=-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: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)));
    color_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"))))?prop(style_bicycle_color):prop(color_backward_1));
    color_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"))))?prop(style_bicycle_color):prop(color_backward_2));
    color_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"))))?prop(style_bicycle_color):prop(color_backward_3));
    color_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"))))?prop(style_bicycle_color):prop(color_backward_4));
    color_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"))))?prop(style_bicycle_color):prop(color_backward_5));
    color_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"))))?prop(style_bicycle_color):prop(color_backward_6));
    color_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"))))?prop(style_bicycle_color):prop(color_backward_7));
    color_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"))))?prop(style_bicycle_color):prop(color_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));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Bicycle both_ways lanes                                                                                                                          */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way|z17-[is_prop_set(ok)]["bicycle:lanes:both_ways"],
way|z17-[is_prop_set(ok)]["bicycle:both_ways"]
{
    temp: eval(cond(has_tag_key("bicycle:lanes:both_ways"),tag("bicycle:lanes:both_ways"),tag("bicycle:both_ways")));
    temp_list: eval(split("|",prop(temp)));
    temp_length: eval(length(prop(temp_list)));
    tempa: eval(cond(has_tag_key("access:lanes:both_ways"),tag("access:lanes:both_ways"),tag("access:both_ways")));
    tempa_list: eval(split("|",prop(tempa)));
    tempa_length: eval(length(prop(tempa_list)));
    color_bothways_1: eval(((prop(temp_length)>0) && ((get(prop(temp_list),0)="designated") || ((get(prop(temp_list),0)="yes") && (get(prop(tempa_list),0)="no"))))?prop(style_bicycle_color):prop(color_bothways_1));
    color_bothways_2: eval(((prop(temp_length)>1) && ((get(prop(temp_list),1)="designated") || ((get(prop(temp_list),1)="yes") && (get(prop(tempa_list),1)="no"))))?prop(style_bicycle_color):prop(color_bothways_2));
    color_bothways_3: eval(((prop(temp_length)>2) && ((get(prop(temp_list),2)="designated") || ((get(prop(temp_list),2)="yes") && (get(prop(tempa_list),2)="no"))))?prop(style_bicycle_color):prop(color_bothways_3));
    color_bothways_4: eval(((prop(temp_length)>3) && ((get(prop(temp_list),3)="designated") || ((get(prop(temp_list),3)="yes") && (get(prop(tempa_list),3)="no"))))?prop(style_bicycle_color):prop(color_bothways_4));

    /* Lane count based on :lanes values */
    tag_lanes_both_min: eval(has_tag_key("bicycle: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("bicycle:lanes:both_ways")?max(prop(tag_lanes_both_max),prop(temp_length)):prop(tag_lanes_both_max));
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 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)][oneway?][!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)][oneway=-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"][oneway?]
        { lanes_fwd: prop(lanes_all); lanes_bwd: 0; lanes_both: 0; }
way[is_prop_set(ok)][lanes][!"lanes:forward"][!"lanes:backward"][!"lanes:both_ways"][oneway=-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"][oneway?]  
        { lanes_all: prop(lanes_fwd); lanes_bwd: 0; lanes_both: 0; }
way[is_prop_set(ok)][!lanes][!"lanes:forward"]["lanes:backward"][!"lanes:both_ways"][oneway=-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)));

    /* 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|z1-16[is_prop_set(ok)]
{
    lane_width: 1;
}

way|z17[is_prop_set(ok)]
{
    lane_default_width: 4;
    lane_min_width: 4;

    lane_width: eval(max(4,(has_tag_key(width)?((1.25*tag(width))/prop(lanes_all)):4))); 
    change_allowed: 6,9;
    change_forbidden: 0;
    road_marking_width: 1;
    road_marking_space: 0;
}

way|z18[is_prop_set(ok)]
{
    lane_default_width: 8;
    lane_min_width: 8;

    lane_width: eval(max(8,(has_tag_key(width)?((2.5*tag(width))/prop(lanes_all)):8))); 
    change_allowed: 12,18;
    change_forbidden: 0;
    road_marking_width: 2;
    road_marking_space: 1;
}

way|z19[is_prop_set(ok)]
{
    lane_default_width: 16;
    lane_min_width: 8;

    lane_width: eval(max(8,(has_tag_key(width)?((5*tag(width))/prop(lanes_all)):16))); 
    change_allowed: 24,36;
    change_forbidden: 0;
    road_marking_width: 2;
    road_marking_space: 1;
}

way|z20[is_prop_set(ok)]
{
    lane_default_width: 32;
    lane_min_width: 8;

    lane_width: eval(max(8,(has_tag_key(width)?((10*tag(width))/prop(lanes_all)):32))); 
    change_allowed: 48,72;
    change_forbidden: 0;
    road_marking_width: 2;
    road_marking_space: 1;
}

way|z21-[is_prop_set(ok)]
{
    lane_default_width: 64;
    lane_min_width: 12;

    lane_width: eval(max(12,(has_tag_key(width)?((20*tag(width))/prop(lanes_all)):64))); 
    change_allowed: 96,144;
    change_forbidden: 0;
    road_marking_width: 3;
    road_marking_space: 2;
}

way|z22-[is_prop_set(ok)]
{
    lane_default_width: 128;
    lane_min_width: 20;

    lane_width: eval(max(20,(has_tag_key(width)?((40*tag(width))/prop(lanes_all)):128))); 
    change_allowed: 192,288;
    change_forbidden: 0;
    road_marking_width: 6;
    road_marking_space: 4;
}

/* Some helper variables */
way|z17-[is_prop_set(ok)]
{
    lane_casing:  eval((2*prop(road_marking_width))+prop(road_marking_space));
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Cleanup of allowed lane changes                                                                                                                 */
/* This must be done AFTER the determination of the lanes count                                                                                    */
/* TODO: cleanup for bothway lanes is missing                                                                                                 */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
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)));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 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(change_forbidden):prop(change_forward_1_left));
    change_backward_1_left: eval((prop(oneway_type)=(-1))?prop(change_forbidden):prop(change_backward_1_left));
}

way|z17-[is_prop_set(ok)][!prop(style_right_hand_traffic)]
{
    change_forward_1_left:  prop(change_forbidden);
    change_backward_1_left: prop(change_forbidden);
}
way|z17-[is_prop_set(ok)][prop(style_right_hand_traffic)],
way|z17-[is_prop_set(ok)][!prop(style_right_hand_traffic)][oneway?]
{
    change_forward_1_right: eval((prop(lanes_fwd)=1)?prop(change_forbidden):prop(change_forward_1_right));  
    change_forward_2_right: eval((prop(lanes_fwd)=2)?prop(change_forbidden):prop(change_forward_2_right));  
    change_forward_3_right: eval((prop(lanes_fwd)=3)?prop(change_forbidden):prop(change_forward_3_right));  
    change_forward_4_right: eval((prop(lanes_fwd)=4)?prop(change_forbidden):prop(change_forward_4_right));  
    change_forward_5_right: eval((prop(lanes_fwd)=5)?prop(change_forbidden):prop(change_forward_5_right));  
    change_forward_6_right: eval((prop(lanes_fwd)=6)?prop(change_forbidden):prop(change_forward_6_right));  
    change_forward_7_right: eval((prop(lanes_fwd)=7)?prop(change_forbidden):prop(change_forward_7_right));  
    change_forward_8_right: eval((prop(lanes_fwd)=8)?prop(change_forbidden):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)][oneway=-1]
{
    change_backward_1_right: eval((prop(lanes_bwd)=1)?prop(change_forbidden):prop(change_backward_1_right));  
    change_backward_2_right: eval((prop(lanes_bwd)=2)?prop(change_forbidden):prop(change_backward_2_right));  
    change_backward_3_right: eval((prop(lanes_bwd)=3)?prop(change_forbidden):prop(change_backward_3_right));  
    change_backward_4_right: eval((prop(lanes_bwd)=4)?prop(change_forbidden):prop(change_backward_4_right));  
    change_backward_5_right: eval((prop(lanes_bwd)=5)?prop(change_forbidden):prop(change_backward_5_right));  
    change_backward_6_right: eval((prop(lanes_bwd)=6)?prop(change_forbidden):prop(change_backward_6_right));  
    change_backward_7_right: eval((prop(lanes_bwd)=7)?prop(change_forbidden):prop(change_backward_7_right));  
    change_backward_8_right: eval((prop(lanes_bwd)=8)?prop(change_forbidden):prop(change_backward_8_right));  
}


/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Lane-dependent width                                                                                                                            */
/* This must be done AFTER the determination of the lanes count                                                                                    */
/* TODO: the number of values should also be checked and considered for the lanes count, but this must be done BEFORE the determination of the l.c.*/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
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"][oneway?]
{
    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"][oneway=-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                                                      */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 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)][oneway?][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)][oneway=-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)][is_prop_set(lanes_all)]::Ground
{
    linecap: none;
    /* Not necessary: color:   prop(ground_color,"default"); */
    opacity: 0.0; /*prop(style_ground_opacity,"default"); */
    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)][is_prop_set(lanes_all)]::Ground
{
    templ:  eval((has_tag_key(sidewalk) && ((tag(sidewalk)="both") || (tag(sidewalk)="left")))?1:0);
    templ:  eval(prop(templ)+((((has_tag_key(cycleway) && ((tag(cycleway)="track") && (!(has_tag_key("cycleway:left") && (tag("cycleway:left")="no"))))) ||
                                (has_tag_key("cycleway:left") && (tag("cycleway:left")="track"))) ||
                                (has_tag_key("cycleway:both") && (tag("cycleway:both")="track"))
                              )?2:0));
    tempr:  eval((has_tag_key(sidewalk) && ((tag(sidewalk)="both") || (tag(sidewalk)="right")))?1:0);
    tempr:  eval(prop(tempr)+((((has_tag_key(cycleway) && ((tag(cycleway)="track") && (!(has_tag_key("cycleway:right") && (tag("cycleway:right")="no"))))) ||
                                (has_tag_key("cycleway:right") && (tag("cycleway:right")="track"))) ||
                                (has_tag_key("cycleway:both") && (tag("cycleway:both")="track"))
                              )?2:0));

    left-casing-linecap: none;
    left-casing-width: eval((prop(templ)>0)?(prop(lane_width,"default")/2):0);
    templ: eval(get(prop(style_sidewalk_color,"default"),prop(templ)));
    left-casing-color:  eval((has_tag_key(lit)&&(tag(lit)=yes))?(rgb(red(prop(templ))+0.1,green(prop(templ))+0.1,blue(prop(templ))+0.1)):prop(templ));
    left-casing-opacity: prop(style_ground_opacity,"default");

    right-casing-linecap: none;
    right-casing-width: eval((prop(tempr)>0)?(prop(lane_width,"default")/2):0);
    tempr: eval(get(prop(style_sidewalk_color,"default"),prop(tempr)));
    right-casing-color:  eval((has_tag_key(lit)&&(tag(lit)=yes))?(rgb(red(prop(tempr))+0.1,green(prop(tempr))+0.1,blue(prop(tempr))+0.1)):prop(tempr));
    right-casing-opacity: prop(style_ground_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"));
    color:                                          prop(color_forward_1,"default");
    dashes:                  eval(is_prop_set(designated_color_forward_1,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_forward_1,"default")?
                                         prop(designated_color_forward_1,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_forward_1,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_forward_2,"default"));
    width:                               eval((prop(lane_width_forward_2,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                           prop(change_forward_2_right,"default");
    left-casing-dashes:                            prop(change_forward_2_left,"default");
    color:                                          prop(color_forward_2,"default");
    dashes:                  eval(is_prop_set(designated_color_forward_2,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_forward_2,"default")?
                                         prop(designated_color_forward_2,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_forward_2,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_forward_3,"default"));
    width:                               eval((prop(lane_width_forward_3,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                           prop(change_forward_3_right,"default");
    left-casing-dashes:                            prop(change_forward_3_left,"default");
    color:                                          prop(color_forward_3,"default");
    dashes:                  eval(is_prop_set(designated_color_forward_3,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_forward_3,"default")?
                                         prop(designated_color_forward_3,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_forward_3,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_forward_4,"default"));
    width:                               eval((prop(lane_width_forward_4,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                           prop(change_forward_4_right,"default");
    left-casing-dashes:                            prop(change_forward_4_left,"default");
    color:                                          prop(color_forward_4,"default");
    dashes:                  eval(is_prop_set(designated_color_forward_4,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_forward_4,"default")?
                                         prop(designated_color_forward_4,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_forward_4,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_forward_5,"default"));
    width:                               eval((prop(lane_width_forward_5,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                           prop(change_forward_5_right,"default");
    left-casing-dashes:                            prop(change_forward_5_left,"default");
    color:                                          prop(color_forward_5,"default");
    dashes:                  eval(is_prop_set(designated_color_forward_5,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_forward_5,"default")?
                                         prop(designated_color_forward_5,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_forward_5,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_forward_6,"default"));
    width:                               eval((prop(lane_width_forward_6,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                           prop(change_forward_6_right,"default");
    left-casing-dashes:                            prop(change_forward_6_left,"default");
    color:                                          prop(color_forward_6,"default");
    dashes:                  eval(is_prop_set(designated_color_forward_6,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_forward_6,"default")?
                                         prop(designated_color_forward_6,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_forward_6,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_forward_7,"default"));
    width:                               eval((prop(lane_width_forward_7,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                           prop(change_forward_7_right,"default");
    left-casing-dashes:                            prop(change_forward_7_left,"default");
    color:                                          prop(color_forward_7,"default");
    dashes:                  eval(is_prop_set(designated_color_forward_7,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_forward_7,"default")?
                                         prop(designated_color_forward_7,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_forward_7,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_forward_8,"default"));
    width:                               eval((prop(lane_width_forward_8,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                           prop(change_forward_8_right,"default");
    left-casing-dashes:                            prop(change_forward_8_left,"default");
    color:                                          prop(color_forward_8,"default");
    dashes:                  eval(is_prop_set(designated_color_forward_8,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_forward_8,"default")?
                                         prop(designated_color_forward_8,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_forward_8,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 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:                            prop(change_backward_1_right,"default");
    right-casing-dashes:                           prop(change_backward_1_left,"default");
    color:                                          prop(color_backward_1,"default");
    dashes:                  eval(is_prop_set(designated_color_backward_1,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_backward_1,"default")?
                                         prop(designated_color_backward_1,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_backward_1,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_backward_2,"default"));
    width:                               eval((prop(lane_width_backward_2,"default")-prop(lane_casing,"default")));
    left-casing-dashes:                            prop(change_backward_2_right,"default");
    right-casing-dashes:                           prop(change_backward_2_left,"default");
    color:                                          prop(color_backward_2,"default");
    dashes:                  eval(is_prop_set(designated_color_backward_2,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_backward_2,"default")?
                                         prop(designated_color_backward_2,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_backward_2,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_backward_3,"default"));
    width:                               eval((prop(lane_width_backward_3,"default")-prop(lane_casing,"default")));
    left-casing-dashes:                            prop(change_backward_3_right,"default");
    right-casing-dashes:                           prop(change_backward_3_left,"default");
    color:                                          prop(color_backward_3,"default");
    dashes:                  eval(is_prop_set(designated_color_backward_3,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_backward_3,"default")?
                                         prop(designated_color_backward_3,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_backward_3,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_backward_4,"default"));
    width:                               eval((prop(lane_width_backward_4,"default")-prop(lane_casing,"default")));
    left-casing-dashes:                            prop(change_backward_4_right,"default");
    right-casing-dashes:                           prop(change_backward_4_left,"default");
    color:                                          prop(color_backward_4,"default");
    dashes:                  eval(is_prop_set(designated_color_backward_4,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_backward_4,"default")?
                                         prop(designated_color_backward_4,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_backward_4,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_backward_5,"default"));
    width:                               eval((prop(lane_width_backward_5,"default")-prop(lane_casing,"default")));
    left-casing-dashes:                            prop(change_backward_5_right,"default");
    right-casing-dashes:                           prop(change_backward_5_left,"default");
    color:                                          prop(color_backward_5,"default");
    dashes:                  eval(is_prop_set(designated_color_backward_5,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_backward_5,"default")?
                                         prop(designated_color_backward_5,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_backward_5,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_backward_6,"default"));
    width:                               eval((prop(lane_width_backward_6,"default")-prop(lane_casing,"default")));
    left-casing-dashes:                            prop(change_backward_6_right,"default");
    right-casing-dashes:                           prop(change_backward_6_left,"default");
    color:                                          prop(color_backward_6,"default");
    dashes:                  eval(is_prop_set(designated_color_backward_6,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_backward_6,"default")?
                                         prop(designated_color_backward_6,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_backward_6,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_backward_7,"default"));
    width:                               eval((prop(lane_width_backward_7,"default")-prop(lane_casing,"default")));
    left-casing-dashes:                            prop(change_backward_7_right,"default");
    right-casing-dashes:                           prop(change_backward_7_left,"default");
    color:                                          prop(color_backward_7,"default");
    dashes:                  eval(is_prop_set(designated_color_backward_7,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_backward_7,"default")?
                                         prop(designated_color_backward_7,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_backward_7,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_backward_8,"default"));
    width:                               eval((prop(lane_width_backward_8,"default")-prop(lane_casing,"default")));
    left-casing-dashes:                            prop(change_backward_8_right,"default");
    right-casing-dashes:                           prop(change_backward_8_left,"default");
    color:                                          prop(color_backward_8,"default");
    dashes:                  eval(is_prop_set(designated_color_backward_8,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_backward_8,"default")?
                                         prop(designated_color_backward_8,"default"):false);
    turn_matrix_scaling:                 eval(is_prop_set(turn_backward_8,"default")?floor(min(prop(lane_default_width,"default"),prop(width))/9):0);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* 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"));
    color:                                          prop(color_bothways_1,"default");
    dashes:                  eval(is_prop_set(designated_color_bothways_1,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_bothways_1,"default")?
                                         prop(designated_color_bothways_1,"default"):false);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_bothways_2,"default"));
    width:                               eval((prop(lane_width_bothways_2,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                           prop(change_bothways_2_right,"default");
    left-casing-dashes:                            prop(change_bothways_2_left,"default");
    color:                                          prop(color_bothways_2,"default");
    dashes:                  eval(is_prop_set(designated_color_bothways_2,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_bothways_2,"default")?
                                         prop(designated_color_bothways_2,"default"):false);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_bothways_3,"default"));
    width:                               eval((prop(lane_width_bothways_3,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                           prop(change_bothways_3_right,"default");
    left-casing-dashes:                            prop(change_bothways_3_left,"default");
    color:                                          prop(color_bothways_3,"default");
    dashes:                  eval(is_prop_set(designated_color_bothways_3,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_bothways_3,"default")?
                                         prop(designated_color_bothways_3,"default"):false);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    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
{
    offset:                              eval(prop(lane_offset_bothways_4,"default"));
    width:                               eval((prop(lane_width_bothways_4,"default")-prop(lane_casing,"default")));
    right-casing-dashes:                           prop(change_bothways_4_right,"default");
    left-casing-dashes:                            prop(change_bothways_4_left,"default");
    color:                                          prop(color_bothways_4,"default");
    dashes:                  eval(is_prop_set(designated_color_bothways_4,"default")?list(20,20):false);
    dashes-background-color: eval(is_prop_set(designated_color_bothways_4,"default")?
                                         prop(designated_color_bothways_4,"default"):false);

    opacity: prop(style_lane_opacity,"default"); linecap: none;
    right-casing-width: prop(road_marking_width,"default"); right-casing-color: white;
    left-casing-width: prop(road_marking_width,"default"); left-casing-color: white;
    major-z-index: eval(cond(prop(placement_transition,"default"),-0.1,0.0));
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Ugly hack for turn lanes                                                                                                                        */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Forward lanes                                                                                                                                   */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way[prop(turn_matrix_scaling,"Lane_Forward_1")>0]::Lane_Turn_M1_Forward_1
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_1");
        offset:                          eval(prop(offset,"Lane_Forward_1")+(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_1,"default"),0));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_1,"default"),1));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_1,"default"),2)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_1")>0]::Lane_Turn_M2_Forward_1
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_1");
        offset:                          eval(prop(offset,"Lane_Forward_1")+(0*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_1,"default"),3));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_1,"default"),4));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_1,"default"),5)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_1")>0]::Lane_Turn_M3_Forward_1
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_1");
        offset:                          eval(prop(offset,"Lane_Forward_1")-(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_1,"default"),6));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_1,"default"),7));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_1,"default"),8)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

way[prop(turn_matrix_scaling,"Lane_Forward_2")>0]::Lane_Turn_M1_Forward_2
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_2");
        offset:                          eval(prop(offset,"Lane_Forward_2")+(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_2,"default"),0));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_2,"default"),1));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_2,"default"),2)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_2")>0]::Lane_Turn_M2_Forward_2
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_2");
        offset:                          eval(prop(offset,"Lane_Forward_2")+(0*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_2,"default"),3));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_2,"default"),4));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_2,"default"),5)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_2")>0]::Lane_Turn_M3_Forward_2
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_2");
        offset:                          eval(prop(offset,"Lane_Forward_2")-(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_2,"default"),6));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_2,"default"),7));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_2,"default"),8)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

way[prop(turn_matrix_scaling,"Lane_Forward_3")>0]::Lane_Turn_M1_Forward_3
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_3");
        offset:                          eval(prop(offset,"Lane_Forward_3")+(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_3,"default"),0));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_3,"default"),1));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_3,"default"),2)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_3")>0]::Lane_Turn_M2_Forward_3
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_3");
        offset:                          eval(prop(offset,"Lane_Forward_3")+(0*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_3,"default"),3));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_3,"default"),4));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_3,"default"),5)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_3")>0]::Lane_Turn_M3_Forward_3
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_3");
        offset:                          eval(prop(offset,"Lane_Forward_3")-(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_3,"default"),6));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_3,"default"),7));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_3,"default"),8)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

way[prop(turn_matrix_scaling,"Lane_Forward_4")>0]::Lane_Turn_M1_Forward_4
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_4");
        offset:                          eval(prop(offset,"Lane_Forward_4")+(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_4,"default"),0));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_4,"default"),1));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_4,"default"),2)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_4")>0]::Lane_Turn_M2_Forward_4
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_4");
        offset:                          eval(prop(offset,"Lane_Forward_4")+(0*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_4,"default"),3));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_4,"default"),4));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_4,"default"),5)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_4")>0]::Lane_Turn_M3_Forward_4
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_4");
        offset:                          eval(prop(offset,"Lane_Forward_4")-(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_4,"default"),6));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_4,"default"),7));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_4,"default"),8)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

way[prop(turn_matrix_scaling,"Lane_Forward_5")>0]::Lane_Turn_M1_Forward_5
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_5");
        offset:                          eval(prop(offset,"Lane_Forward_5")+(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_5,"default"),0));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_5,"default"),1));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_5,"default"),2)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_5")>0]::Lane_Turn_M2_Forward_5
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_5");
        offset:                          eval(prop(offset,"Lane_Forward_5")+(0*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_5,"default"),3));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_5,"default"),4));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_5,"default"),5)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_5")>0]::Lane_Turn_M3_Forward_5
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_5");
        offset:                          eval(prop(offset,"Lane_Forward_5")-(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_5,"default"),6));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_5,"default"),7));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_5,"default"),8)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

way[prop(turn_matrix_scaling,"Lane_Forward_6")>0]::Lane_Turn_M1_Forward_6
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_6");
        offset:                          eval(prop(offset,"Lane_Forward_6")+(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_6,"default"),0));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_6,"default"),1));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_6,"default"),2)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_6")>0]::Lane_Turn_M2_Forward_6
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_6");
        offset:                          eval(prop(offset,"Lane_Forward_6")+(0*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_6,"default"),3));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_6,"default"),4));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_6,"default"),5)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_6")>0]::Lane_Turn_M3_Forward_6
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_6");
        offset:                          eval(prop(offset,"Lane_Forward_6")-(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_6,"default"),6));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_6,"default"),7));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_6,"default"),8)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

way[prop(turn_matrix_scaling,"Lane_Forward_7")>0]::Lane_Turn_M1_Forward_7
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_7");
        offset:                          eval(prop(offset,"Lane_Forward_7")+(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_7,"default"),0));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_7,"default"),1));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_7,"default"),2)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_7")>0]::Lane_Turn_M2_Forward_7
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_7");
        offset:                          eval(prop(offset,"Lane_Forward_7")+(0*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_7,"default"),3));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_7,"default"),4));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_7,"default"),5)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_7")>0]::Lane_Turn_M3_Forward_7
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_7");
        offset:                          eval(prop(offset,"Lane_Forward_7")-(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_7,"default"),6));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_7,"default"),7));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_7,"default"),8)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

way[prop(turn_matrix_scaling,"Lane_Forward_8")>0]::Lane_Turn_M1_Forward_8
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_8");
        offset:                          eval(prop(offset,"Lane_Forward_8")+(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_8,"default"),0));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_8,"default"),1));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_8,"default"),2)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_8")>0]::Lane_Turn_M2_Forward_8
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_8");
        offset:                          eval(prop(offset,"Lane_Forward_8")+(0*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_8,"default"),3));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_8,"default"),4));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_8,"default"),5)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Forward_8")>0]::Lane_Turn_M3_Forward_8
{
        t_m_s:                   prop(turn_matrix_scaling,"Lane_Forward_8");
        offset:                          eval(prop(offset,"Lane_Forward_8")-(3*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_8,"default"),6));  left-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_8,"default"),7));              dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        temp:                                eval(get(prop(turn_forward_8,"default"),8)); right-casing-dashes:   eval(list(0,get(prop(temp),0)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),4)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Backward lanes                                                                                                                                  */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
way[prop(turn_matrix_scaling,"Lane_Backward_1")>0]::Lane_Turn_M1_Backward_1
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_1");
        offset:                           eval(prop(offset,"Lane_Backward_1")+(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_1,"default"),8));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_1,"default"),7));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_1,"default"),6)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_1")>0]::Lane_Turn_M2_Backward_1
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_1");
        offset:                           eval(prop(offset,"Lane_Backward_1")+(0*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_1,"default"),5));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_1,"default"),4));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_1,"default"),3)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_1")>0]::Lane_Turn_M3_Backward_1
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_1");
        offset:                           eval(prop(offset,"Lane_Backward_1")-(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_1,"default"),2));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_1,"default"),1));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_1,"default"),0)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

way[prop(turn_matrix_scaling,"Lane_Backward_2")>0]::Lane_Turn_M1_Backward_2
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_2");
        offset:                           eval(prop(offset,"Lane_Backward_2")+(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_2,"default"),8));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_2,"default"),7));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_2,"default"),6)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_2")>0]::Lane_Turn_M2_Backward_2
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_2");
        offset:                           eval(prop(offset,"Lane_Backward_2")+(0*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_2,"default"),5));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_2,"default"),4));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_2,"default"),3)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_2")>0]::Lane_Turn_M3_Backward_2
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_2");
        offset:                           eval(prop(offset,"Lane_Backward_2")-(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_2,"default"),2));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_2,"default"),1));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_2,"default"),0)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

way[prop(turn_matrix_scaling,"Lane_Backward_3")>0]::Lane_Turn_M1_Backward_3
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_3");
        offset:                           eval(prop(offset,"Lane_Backward_3")+(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_3,"default"),8));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_3,"default"),7));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_3,"default"),6)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_3")>0]::Lane_Turn_M2_Backward_3
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_3");
        offset:                           eval(prop(offset,"Lane_Backward_3")+(0*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_3,"default"),5));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_3,"default"),4));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_3,"default"),3)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_3")>0]::Lane_Turn_M3_Backward_3
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_3");
        offset:                           eval(prop(offset,"Lane_Backward_3")-(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_3,"default"),2));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_3,"default"),1));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_3,"default"),0)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

way[prop(turn_matrix_scaling,"Lane_Backward_4")>0]::Lane_Turn_M1_Backward_4
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_4");
        offset:                           eval(prop(offset,"Lane_Backward_4")+(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_4,"default"),8));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_4,"default"),7));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_4,"default"),6)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_4")>0]::Lane_Turn_M2_Backward_4
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_4");
        offset:                           eval(prop(offset,"Lane_Backward_4")+(0*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_4,"default"),5));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_4,"default"),4));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_4,"default"),3)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_4")>0]::Lane_Turn_M3_Backward_4
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_4");
        offset:                           eval(prop(offset,"Lane_Backward_4")-(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_4,"default"),2));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_4,"default"),1));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_4,"default"),0)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

way[prop(turn_matrix_scaling,"Lane_Backward_5")>0]::Lane_Turn_M1_Backward_5
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_5");
        offset:                           eval(prop(offset,"Lane_Backward_5")+(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_5,"default"),8));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_5,"default"),7));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_5,"default"),6)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_5")>0]::Lane_Turn_M2_Backward_5
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_5");
        offset:                           eval(prop(offset,"Lane_Backward_5")+(0*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_5,"default"),5));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_5,"default"),4));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_5,"default"),3)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_5")>0]::Lane_Turn_M3_Backward_5
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_5");
        offset:                           eval(prop(offset,"Lane_Backward_5")-(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_5,"default"),2));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_5,"default"),1));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_5,"default"),0)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

way[prop(turn_matrix_scaling,"Lane_Backward_6")>0]::Lane_Turn_M1_Backward_6
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_6");
        offset:                           eval(prop(offset,"Lane_Backward_6")+(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_6,"default"),8));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_6,"default"),7));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_6,"default"),6)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_6")>0]::Lane_Turn_M2_Backward_6
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_6");
        offset:                           eval(prop(offset,"Lane_Backward_6")+(0*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_6,"default"),5));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_6,"default"),4));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_6,"default"),3)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_6")>0]::Lane_Turn_M3_Backward_6
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_6");
        offset:                           eval(prop(offset,"Lane_Backward_6")-(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_6,"default"),2));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_6,"default"),1));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_6,"default"),0)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

way[prop(turn_matrix_scaling,"Lane_Backward_7")>0]::Lane_Turn_M1_Backward_7
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_7");
        offset:                           eval(prop(offset,"Lane_Backward_7")+(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_7,"default"),8));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_7,"default"),7));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_7,"default"),6)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_7")>0]::Lane_Turn_M2_Backward_7
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_7");
        offset:                           eval(prop(offset,"Lane_Backward_7")+(0*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_7,"default"),5));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_7,"default"),4));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_7,"default"),3)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_7")>0]::Lane_Turn_M3_Backward_7
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_7");
        offset:                           eval(prop(offset,"Lane_Backward_7")-(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_7,"default"),2));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_7,"default"),1));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_7,"default"),0)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

way[prop(turn_matrix_scaling,"Lane_Backward_8")>0]::Lane_Turn_M1_Backward_8
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_8");
        offset:                           eval(prop(offset,"Lane_Backward_8")+(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_8,"default"),8));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_8,"default"),7));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_8,"default"),6)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_8")>0]::Lane_Turn_M2_Backward_8
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_8");
        offset:                           eval(prop(offset,"Lane_Backward_8")+(0*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_8,"default"),5));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_8,"default"),4));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_8,"default"),3)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}
way[prop(turn_matrix_scaling,"Lane_Backward_8")>0]::Lane_Turn_M3_Backward_8
{
        t_m_s:                    prop(turn_matrix_scaling,"Lane_Backward_8");
        offset:                           eval(prop(offset,"Lane_Backward_8")-(3*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_8,"default"),2));  left-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_8,"default"),1));              dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        temp:                                 eval(get(prop(turn_backward_8,"default"),0)); right-casing-dashes:   eval(list(0,get(prop(temp),4)*prop(t_m_s),get(prop(temp),3)*prop(t_m_s),get(prop(temp),2)*prop(t_m_s),get(prop(temp),1)*prop(t_m_s),get(prop(temp),0)*prop(t_m_s)));
        color: white; left-casing-color: white; right-casing-color: white; width: prop(t_m_s); left-casing-width: eval(prop(t_m_s)); right-casing-width: eval(prop(t_m_s));
}

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

/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Street lamp                                                                                                                                     */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
node|z17-[highway="street_lamp"]::Street_lamp_1
{
    symbol-shape: circle;
    symbol-size: eval(12 * prop(pixel_per_metre,"default"));
    symbol-fill-color: white;
    symbol-fill-opacity: 0.2;
}
node|z17-[highway="street_lamp"]::Street_lamp_2
{
    symbol-shape: circle;
    symbol-size: eval(18 * prop(pixel_per_metre,"default"));
    symbol-fill-color: white;
    symbol-fill-opacity: 0.15;
}
node|z17-[highway="street_lamp"]::Street_lamp_3
{
    symbol-shape: circle;
    symbol-size: eval(25 * prop(pixel_per_metre,"default"));
    symbol-fill-color: white;
    symbol-fill-opacity: 0.1;
}

/***************************************************************************************************************************************************/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Check for some common errors                                                                                                                    */
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/***************************************************************************************************************************************************/
way{} /* Why-oh-why do I need this.... */
way[prop(style_show_disputed)][maxspeed][!"source:maxspeed"]            { data_warning: "source:maxspeed=?"; }
way[oneway=true], way[oneway=1]                 { data_error:   "use oneway=yes"; }
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"; }
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_Lane_and_Road_Attributes-style.mapcss, Styles_Lane_and_Road_Attributes.zip

Attachments (3)

Download all attachments as: .zip