Changes between Version 28 and Version 29 of Styles/Lane_and_Road_Attributes


Ignore:
Timestamp:
2013-04-11T11:18:10+02:00 (12 years ago)
Author:
imagic
Comment:

Individual traffic sign for overtaking=yes+maxspeed=implicit and updated traffic sign for maxspeed=implicit alone

Legend:

Unmodified
Added
Removed
Modified
  • Styles/Lane_and_Road_Attributes

    v28 v29  
    31843184}
    31853185
    3186 /* Speed limit in kph */
    3187 node|z16-[traffic_sign=~/^(.*;)*maxspeed(;.*)*$/][maxspeed>0]
     3186/* Speed limit in km/h */
     3187node|z16-[traffic_sign~=maxspeed][maxspeed>0]
    31883188{
    31893189    t: eval((tag(maxspeed)<10)?1.0:((tag(maxspeed)<100)?0.8:((tag(maxspeed)<1000)?0.6:0.4)));
     
    31953195
    31963196/* Speed limit in mph */
    3197 node|z16-[traffic_sign=~/^(.*;)*maxspeed(;.*)*$/][maxspeed=~/[0-9]+ mph/]
     3197node|z16-[traffic_sign~=maxspeed][maxspeed=~/[0-9]+ mph/]
    31983198{
    31993199    t_speed: eval(get(split(" ",tag(maxspeed)),0));
     
    32053205}
    32063206
    3207 /* End of speed limit */
    3208 node|z16-[traffic_sign=~/^(.*;)*maxspeed(;.*)*$/][maxspeed=implicit]
     3207/* End of speed limit but not overtaking allowed (otherwise single traffic sign -> see below) */
     3208node|z16-[traffic_sign~=maxspeed][maxspeed=implicit][overtaking!=yes],
     3209node|z16-[traffic_sign~=maxspeed][maxspeed=implicit][overtaking=yes]["source:maxspeed"=~/.*zone.*/]
    32093210{
    32103211    t_z: eval((has_tag_key("source:maxspeed") && regexp_test(".*zone.*",tag("source:maxspeed")))?"<rect x='0' y='0' width='100' height='140' fill='white' /><text style='font-size:40px; font-weight:bold;' x='60' y='135' text-anchor='middle' transform='scale(0.8 1.0)'>ZONE</text>":"");
    3211     traffic_sign_svg: eval(concat(prop(traffic_sign_svg),prop(t_z),"<circle cx='50' cy='",(prop(traffic_sign_top)+50),"' r='50' fill='white' /><circle cx='50' cy='",(prop(traffic_sign_top)+50),"' r='46' stroke='black' stroke-width='3' fill='white' /><line x1='17' y1='",(prop(traffic_sign_top)+83),"' x2='83' y2='",(prop(traffic_sign_top)+17),"' stroke='black' stroke-width='15' />"));
     3212    traffic_sign_svg: eval(concat(prop(traffic_sign_svg),prop(t_z),"<circle cx='50' cy='",(prop(traffic_sign_top)+50),"' r='50' fill='white' /><circle cx='50' cy='",(prop(traffic_sign_top)+50),"' r='46' stroke='black' stroke-width='3' fill='white' /><text style='fill:#DDD; font-size:60px; font-weight:bold;' x='47' y='",(prop(traffic_sign_top)+70),"' text-anchor='middle'>XX</text><line x1='17' y1='",(prop(traffic_sign_top)+83),"' x2='83' y2='",(prop(traffic_sign_top)+17),"' stroke='black' stroke-width='15' />"));
    32123213    traffic_sign_top: eval(prop(traffic_sign_top)+((prop(t_z)="")?100:140));
    32133214}
    32143215
    32153216/* No overtaking */
    3216 node|z16-[traffic_sign=~/^(.*;)*overtaking(;.*)*$/][overtaking=no]
     3217node|z16-[traffic_sign~=overtaking][overtaking=no]
    32173218{
    32183219    traffic_sign_svg: eval(concat(prop(traffic_sign_svg),"<g transform='translate(0,",prop(traffic_sign_top),")'><g transform='scale(0.137931)'><circle cx='362.5' cy='362.5' r='350' style='fill:white;stroke:black;stroke-width:2.5px' /><circle cx='362.5' cy='362.5' r='290' style='fill:white;stroke:#c00;stroke-width:93.75'/><path d='M 151.8,375.1 C 151.4,338.9 149.4,370.0 171.2,316.4 C 187.0,279.9 171.0,289.7 252.7,288.4 C 325.3,289.9 310.7,279.3 327.4,318.1 C 348.3,367.6 346.7,341.7 346.5,374.0 C 345.7,409.5 358.9,400.4 248.9,401.6 C 139.7,400.1 152.7,409.4 151.9,375.1 z M 174.0,340.1 L 188.9,305.6 C 191.7,299.5 190.8,300.4 197.3,300.4 L 301.8,300.4 C 307.4,300.4 306.6,300.0 308.9,305.4 L 323.8,339.7 L 174.0,340.1 z M 163.3,405.5 L 191.2,405.5 C 191.1,440.6 194.0,438.6 178.8,438.8 C 160.7,438.8 163.5,440.6 163.3,405.6 z M 307.2,405.8 L 335.2,405.8 C 335.0,440.9 337.5,438.5 321.7,438.6 C 305.3,438.4 307.4,441.0 307.2,405.8 z ' style='fill:#c00;fill-rule:evenodd' /><path d='M 377.4,375.1 C 376.9,338.9 375.0,370.0 396.8,316.4 C 412.6,279.9 396.6,289.7 478.2,288.4 C 550.9,289.9 536.2,279.3 552.9,318.1 C 573.8,367.6 572.2,341.7 572.1,374.0 C 571.3,409.5 584.4,400.4 474.4,401.6 C 365.3,400.1 378.2,409.4 377.4,375.1 z M 399.5,340.1 L 414.5,305.6 C 417.2,299.5 416.4,300.4 422.9,300.4 L 527.3,300.4 C 533.0,300.4 532.2,300.0 534.5,305.4 L 549.3,339.7 L 399.5,340.1 z M 388.8,405.6 L 416.8,405.5 C 416.7,440.6 419.6,438.6 404.4,438.8 C 386.2,438.8 389.1,440.6 388.8,405.6 z M 532.7,405.8 L 560.7,405.8 C 560.5,440.9 563.1,438.5 547.2,438.6 C 530.9,438.4 532.9,441.0 532.7,405.8 z ' style='fill:black;fill-rule:evenodd' /></g></g>"));
     
    32203221}
    32213222
    3222 /* Overtaking allowed */
    3223 node|z16-[traffic_sign=~/^(.*;)*overtaking(;.*)*$/][overtaking=yes]
     3223/* Overtaking allowed and also not implicit speed limit (or implicit speed zone)*/
     3224node|z16-[traffic_sign~=overtaking][overtaking=yes][maxspeed!=implicit],
     3225node|z16-[traffic_sign~=overtaking][overtaking=yes][maxspeed=implicit]["source:maxspeed"=~/.*zone.*/]
    32243226{
    32253227    traffic_sign_svg: eval(concat(prop(traffic_sign_svg),"<g transform='translate(0,",prop(traffic_sign_top),")'><g transform='scale(0.137931)'><circle cx='362.5' cy='362.5' r='350' style='fill:white;stroke:black;stroke-width:2.5px' /><circle cx='362.5' cy='362.5' r='330' style='fill:white;stroke:black;stroke-width:20'/><path d='M 151.8,375.1 C 151.4,338.9 149.4,370.0 171.2,316.4 C 187.0,279.9 171.0,289.7 252.7,288.4 C 325.3,289.9 310.7,279.3 327.4,318.1 C 348.3,367.6 346.7,341.7 346.5,374.0 C 345.7,409.5 358.9,400.4 248.9,401.6 C 139.7,400.1 152.7,409.4 151.9,375.1 z M 174.0,340.1 L 188.9,305.6 C 191.7,299.5 190.8,300.4 197.3,300.4 L 301.8,300.4 C 307.4,300.4 306.6,300.0 308.9,305.4 L 323.8,339.7 L 174.0,340.1 z M 163.3,405.5 L 191.2,405.5 C 191.1,440.6 194.0,438.6 178.8,438.8 C 160.7,438.8 163.5,440.6 163.3,405.6 z M 307.2,405.8 L 335.2,405.8 C 335.0,440.9 337.5,438.5 321.7,438.6 C 305.3,438.4 307.4,441.0 307.2,405.8 z ' style='fill:gray;fill-rule:evenodd' /><path d='M 377.4,375.1 C 376.9,338.9 375.0,370.0 396.8,316.4 C 412.6,279.9 396.6,289.7 478.2,288.4 C 550.9,289.9 536.2,279.3 552.9,318.1 C 573.8,367.6 572.2,341.7 572.1,374.0 C 571.3,409.5 584.4,400.4 474.4,401.6 C 365.3,400.1 378.2,409.4 377.4,375.1 z M 399.5,340.1 L 414.5,305.6 C 417.2,299.5 416.4,300.4 422.9,300.4 L 527.3,300.4 C 533.0,300.4 532.2,300.0 534.5,305.4 L 549.3,339.7 L 399.5,340.1 z M 388.8,405.6 L 416.8,405.5 C 416.7,440.6 419.6,438.6 404.4,438.8 C 386.2,438.8 389.1,440.6 388.8,405.6 z M 532.7,405.8 L 560.7,405.8 C 560.5,440.9 563.1,438.5 547.2,438.6 C 530.9,438.4 532.9,441.0 532.7,405.8 z ' style='fill:gray;fill-rule:evenodd' /></g><line x1='18' y1='82' x2='82' y2='18' stroke='black' stroke-width='15' /></g>"));
     
    32273229}
    32283230
     3231/* End of speed limit (not zone!) and also overtaking allowed -> single traffic sign*/
     3232node|z16-[traffic_sign~=maxspeed][maxspeed=implicit][overtaking=yes][!"source:maxspeed"],
     3233node|z16-[traffic_sign~=maxspeed][maxspeed=implicit][overtaking=yes]["source:maxspeed"=~/^((?!zone).)*$/]
     3234{
     3235    traffic_sign_svg: eval(concat(prop(traffic_sign_svg),"<circle cx='50' cy='",(prop(traffic_sign_top)+50),"' r='50' fill='white' /><circle cx='50' cy='",(prop(traffic_sign_top)+50),"' r='46' stroke='black' stroke-width='3' fill='white' /><line x1='17' y1='",(prop(traffic_sign_top)+83),"' x2='83' y2='",(prop(traffic_sign_top)+17),"' stroke='black' stroke-width='15' />"));
     3236    traffic_sign_top: eval(prop(traffic_sign_top)+100);
     3237}
    32293238
    32303239/* Now render the traffic sign */