[[TranslatedPages]] = [[Image(maxspeed_icon.svg,36,middle,inline)]] Maxspeed style = [[PageOutline(2-9)]] == Description == This style adds display of driving speed related information to the map. Therefore the keys [[osmwiki:Key:maxspeed|maxspeed]], maxspeed:forward, maxspeed:backward, [[osmwiki:Conditional_restrictions|maxspeed:conditional]], maxspeed:forward:conditional and maxspeed:backward:conditional are evaluated. [[left-right-hand-traffic|Left-hand and right-hand traffic]] are always taken into account. Example: [[Image(maxspeed_example.png)]] You can change the colors in the preferences of JOSM. The default colors and some examples are shown below. [[Image(maxspeed_legend.png)]] For ideas/questions/bugs/suggestions or similar please write a message to [osmwww:user/Klumbumbus Klumbumbus]. Feel free to translate this wiki page into more languages. Already translated languages see top right. [attachment:Testcenter.osm Testcenter] for quality assurance of this style. == Changelog == === Version 2.1.xx to 2.5.xx === * Add support of maxspeed:conditional, maxspeed:forward:conditional and maxspeed:backward:conditional (known issue: maxspeed=* + maxspeed:direction:conditional=* not yet working correct, works only together with maxspeed:direction) * Add error message for wrong value of conditional maxspeed * Add error message for conditional maxspeed without default maxspeed * Add in file table of contents and numbered headings for better understandability of the code structure === Version 2.0.xx to 2.1.xx === * Add support of alternitive tagging scheme `maxspeed=RU:living_street`, `maxspeed=RU:urban`, `maxspeed=RU:rural`, `maxspeed=RU:motorway`. This can be disabled in the [wiki:Help/Dialog/MapPaint#Stylesettings style settings] of this mappaint style. * Add style for `maxspeed=5` * Change color of `maxspeed=none` for better visibility on aerial imagery === Version 1.5 to 2.0.xx === * change from xml to mapcss * support of maxspeed:forward and maxspeed:backward (considering left and right hand traffic) * support of maxspeed:variable, maxspeed:variable:forward and maxspeed:variable:backward (dashed line) * highlight color is now below the highway line, to see the highway type (residential, secondary, motorway,...) * removed support of values without space between number and unit (e.g. ''35mph'') * added error message for wrong maxspeed values (like ''35mph'' or ''35 m/h'') * added error message if maxspeed direction is opposed to oneway direction * adjusted to most used values according to [http://taginfo.openstreetmap.org/keys/maxspeed#values taginfo] * added ''20'', ''45'', ''none'' * removed unused values like ''32.19'' * adjusted opacities, widths and some colors for better display and distinction between the colors * widths depends on zoom level == Code == {{{ #!style type="mapcss" /* table of contents 1 - meta data 2 - general settings 2.1 - create user settings 2.2 - disable tiger layer from default internal mappaint style 2.3 - disable street names from default internal mappaint style 2.4 - read conditional maxspeed values 3 - display maxspeed=* 3.1 - kmh 3.2 - mph 3.3 - general rules 3.4 - conditional maxspeed 3.4.1 - kmh 3.4.2 - mph 4 - display maxspeed:forward=* for righthandtraffic and maxspeed:backward=* for lefthandtraffic 4.1 - kmh 4.2 - mph 4.3 - general rules 4.4 - conditional righthand-forward and lefthand-backward maxspeed 4.4.1 - kmh 4.4.2 - mph 5 - display maxspeed:forward=* for lefthandtraffic and maxspeed:backward=* for righthandtraffic 5.1 - kmh 5.2 - mph 5.3 - general rules 5.4 - conditional lefthand-forward and righthand-backward maxspeed 5.4.1 - kmh 5.4.2 - mph 6 - error reporting 6.1 - report wrong value of maxspeed 6.2 - report wrong value of maxspeed:conditional 6.3 - report conditional maxspeed without default maxspeed 6.4 - report if maxspeed direction is opposed to oneway direction */ /*************************************/ /* 1 - meta data */ meta { title: "Maxspeed"; version: "2.5.[[revision]]_[[date]]"; description: "Display maxspeed values in JOSM map display."; icon: "maxspeed_icon.svg"; author: "Rubke, Dirk Stöcker, Vclaw, Klumbumbus"; link: "http://josm.openstreetmap.de/wiki/Styles/Maxspeed"; watch-modified: true; min-josm-version: "7450"; /* because of user settings */ } meta[lang=de] { title: "Höchstgeschwindigkeit"; description: "Anzeige der Höchstgeschwindigkeiten in der JOSM-Kartenanzeige."; link: "http://josm.openstreetmap.de/wiki/De:Styles/Maxspeed"; } /*************************************/ /* 2 - general settings */ /* 2.1 - create user settings */ setting::RU { type: boolean; label: tr("Support maxspeed=RU:* tagging scheme"); default: true; } /* 2.2 - disable tiger layer from default internal mappaint style */ way["tiger:reviewed"=no]::core_tiger { opacity: 0; } /* 2.3 - disable street names from default internal mappaint style */ way[highway] { text: none; } /* 2.4 - read conditional maxspeed values */ way["maxspeed:conditional"=~/^(none|[1-9][0-9]*) @ /]::maxspeedlayer { maxsp_cond: get(split(" ", tag("maxspeed:conditional")), 0); set cond_kmh; } way["maxspeed:forward:conditional"=~/^(none|[1-9][0-9]*) @ /]::maxspeedlayer { maxsp_forward_cond: get(split(" ", tag("maxspeed:forward:conditional")), 0); set cond_forward_kmh; } way["maxspeed:backward:conditional"=~/^(none|[1-9][0-9]*) @ /]::maxspeedlayer { maxsp_backward_cond: get(split(" ", tag("maxspeed:backward:conditional")), 0); set cond_backward_kmh; } way["maxspeed:conditional"=~/^[1-9][0-9]* mph @ /]::maxspeedlayer { maxsp_cond: get(split(" ", tag("maxspeed:conditional")), 0); set cond_mph; } way["maxspeed:forward:conditional"=~/^[1-9][0-9]* mph @ /]::maxspeedlayer { maxsp_forward_cond: get(split(" ", tag("maxspeed:forward:conditional")), 0); set cond_forward_mph; } way["maxspeed:backward:conditional"=~/^[1-9][0-9]* mph @ /]::maxspeedlayer { maxsp_backward_cond: get(split(" ", tag("maxspeed:backward:conditional")), 0); set cond_backward_mph; } /*************************************/ /* 3 - display maxspeed=* */ /* 3.1 - kmh */ way["maxspeed"="none"]::maxspeedlayer { set maxspeed; color: speed_none#febede; } way["maxspeed"="5"]::maxspeedlayer { set maxspeed; color: speed_5#ff5656; } way["maxspeed"="10"]::maxspeedlayer { set maxspeed; color: speed_10#b80022; } way["maxspeed"="15"]::maxspeedlayer { set maxspeed; color: speed_15#00da8b; } way["maxspeed"="20"]::maxspeedlayer, way["maxspeed"="RU:living_street"][setting("RU")]::maxspeedlayer { set maxspeed; color: speed_20#e3cc82; } way["maxspeed"="30"]::maxspeedlayer { set maxspeed; color: speed_30#4d4dff; } way["maxspeed"="40"]::maxspeedlayer { set maxspeed; color: speed_40#4d4d00; } way["maxspeed"="45"]::maxspeedlayer { set maxspeed; color: speed_45#ff529a; } way["maxspeed"="50"]::maxspeedlayer { set maxspeed; color: speed_50#07f807; } way["maxspeed"="60"]::maxspeedlayer, way["maxspeed"="RU:urban"][setting("RU")]::maxspeedlayer { set maxspeed; color: speed_60#9f9fff; } way["maxspeed"="70"]::maxspeedlayer { set maxspeed; color: speed_70#ee8b00; } way["maxspeed"="80"]::maxspeedlayer { set maxspeed; color: speed_80#f90808; } way["maxspeed"="90"]::maxspeedlayer, way["maxspeed"="RU:rural"][setting("RU")]::maxspeedlayer { set maxspeed; color: speed_90#07f8f8; } way["maxspeed"="100"]::maxspeedlayer { set maxspeed; color: speed_100#f807f8; } way["maxspeed"="110"]::maxspeedlayer, way["maxspeed"="RU:motorway"][setting("RU")]::maxspeedlayer { set maxspeed; color: speed_110#7807f8; } way["maxspeed"="120"]::maxspeedlayer { set maxspeed; color: speed_120#ccad24; } way["maxspeed"="130"]::maxspeedlayer { set maxspeed; color: speed_130#c0f100; } /* 3.2 - mph */ way["maxspeed"="5 mph"]::maxspeedlayer { set maxspeed; color: speed_5_mph#b80022; } way["maxspeed"="10 mph"]::maxspeedlayer { set maxspeed; color: speed_10_mph#00da8b; } way["maxspeed"="15 mph"]::maxspeedlayer { set maxspeed; color: speed_15_mph#e3cc82; } way["maxspeed"="20 mph"]::maxspeedlayer { set maxspeed; color: speed_20_mph#4d4dff; } way["maxspeed"="25 mph"]::maxspeedlayer { set maxspeed; color: speed_25_mph#4d4d00; } way["maxspeed"="30 mph"]::maxspeedlayer { set maxspeed; color: speed_30_mph#ff529a; } way["maxspeed"="35 mph"]::maxspeedlayer { set maxspeed; color: speed_35_mph#07f807; } way["maxspeed"="40 mph"]::maxspeedlayer { set maxspeed; color: speed_40_mph#9f9fff; } way["maxspeed"="45 mph"]::maxspeedlayer { set maxspeed; color: speed_45_mph#ee8b00; } way["maxspeed"="50 mph"]::maxspeedlayer { set maxspeed; color: speed_50_mph#f90808; } way["maxspeed"="55 mph"]::maxspeedlayer { set maxspeed; color: speed_55_mph#07f8f8; } way["maxspeed"="60 mph"]::maxspeedlayer { set maxspeed; color: speed_60_mph#f807f8; } way["maxspeed"="65 mph"]::maxspeedlayer { set maxspeed; color: speed_65_mph#7807f8; } way["maxspeed"="70 mph"]::maxspeedlayer { set maxspeed; color: speed_70_mph#ccad24; } way["maxspeed"="75 mph"]::maxspeedlayer { set maxspeed; color: speed_75_mph#c0f100; } /* 3.3 - general rules */ way.maxspeed::maxspeedlayer { opacity: 0.75; width: 14; z-index: -1; } way|z16.maxspeed::maxspeedlayer { width: 12; } way|z-15.maxspeed::maxspeedlayer { width:10; } way.maxspeed[maxspeed:variable]::maxspeedlayer { dashes: 34,6; } /* 3.4 - conditional maxspeed */ way.cond_kmh::maxspeedlayer, way.cond_mph::maxspeedlayer { dashes: 55,25; /* dashes-background-opacity is automatic adopted from opacity. */ } /* 3.4.1 - kmh */ way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="none"]::maxspeedlayer { dashes-background-color: speed_none#febede; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="5"]::maxspeedlayer { dashes-background-color: speed_5#ff5656; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="10"]::maxspeedlayer { dashes-background-color: speed_10#b80022; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="15"]::maxspeedlayer { dashes-background-color: speed_15#00da8b; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="20"]::maxspeedlayer /* A selector for RU scheme is not needed here because "maxspeed:conditional=RU:living_street @ (...)" is nonsense, better use the actual maxspeed value in this case. The same is true for the others (rural, urban, motorway). */ { dashes-background-color: speed_20#e3cc82; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="30"]::maxspeedlayer { dashes-background-color: speed_30#4d4dff; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="40"]::maxspeedlayer { dashes-background-color: speed_40#4d4d00; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="45"]::maxspeedlayer { dashes-background-color: speed_45#ff529a; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="50"]::maxspeedlayer { dashes-background-color: speed_50#07f807; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="60"]::maxspeedlayer { dashes-background-color: speed_60#9f9fff; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="70"]::maxspeedlayer { dashes-background-color: speed_70#ee8b00; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="80"]::maxspeedlayer { dashes-background-color: speed_80#f90808; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="90"]::maxspeedlayer { dashes-background-color: speed_90#07f8f8; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="100"]::maxspeedlayer { dashes-background-color: speed_100#f807f8; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="110"]::maxspeedlayer { dashes-background-color: speed_110#7807f8; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="120"]::maxspeedlayer { dashes-background-color: speed_120#ccad24; } way.cond_kmh[prop(maxsp_cond, maxspeedlayer)="130"]::maxspeedlayer { dashes-background-color: speed_130#c0f100; } /* 3.4.2 - mph */ way.cond_mph[prop(maxsp_cond, maxspeedlayer)="5"]::maxspeedlayer { dashes-background-color: speed_5_mph#b80022; } way.cond_mph[prop(maxsp_cond, maxspeedlayer)="10"]::maxspeedlayer { dashes-background-color: speed_10_mph#00da8b; } way.cond_mph[prop(maxsp_cond, maxspeedlayer)="15"]::maxspeedlayer { dashes-background-color: speed_15_mph#e3cc82; } way.cond_mph[prop(maxsp_cond, maxspeedlayer)="20"]::maxspeedlayer { dashes-background-color: speed_20_mph#4d4dff; } way.cond_mph[prop(maxsp_cond, maxspeedlayer)="25"]::maxspeedlayer { dashes-background-color: speed_25_mph#4d4d00; } way.cond_mph[prop(maxsp_cond, maxspeedlayer)="30"]::maxspeedlayer { dashes-background-color: speed_30_mph#ff529a; } way.cond_mph[prop(maxsp_cond, maxspeedlayer)="35"]::maxspeedlayer { dashes-background-color: speed_35_mph#07f807; } way.cond_mph[prop(maxsp_cond, maxspeedlayer)="40"]::maxspeedlayer { dashes-background-color: speed_40_mph#9f9fff; } way.cond_mph[prop(maxsp_cond, maxspeedlayer)="45"]::maxspeedlayer { dashes-background-color: speed_45_mph#ee8b00; } way.cond_mph[prop(maxsp_cond, maxspeedlayer)="50"]::maxspeedlayer { dashes-background-color: speed_50_mph#f90808; } way.cond_mph[prop(maxsp_cond, maxspeedlayer)="55"]::maxspeedlayer { dashes-background-color: speed_55_mph#07f8f8; } way.cond_mph[prop(maxsp_cond, maxspeedlayer)="60"]::maxspeedlayer { dashes-background-color: speed_60_mph#f807f8; } way.cond_mph[prop(maxsp_cond, maxspeedlayer)="65"]::maxspeedlayer { dashes-background-color: speed_65_mph#7807f8; } way.cond_mph[prop(maxsp_cond, maxspeedlayer)="70"]::maxspeedlayer { dashes-background-color: speed_70_mph#ccad24; } way.cond_mph[prop(maxsp_cond, maxspeedlayer)="75"]::maxspeedlayer { dashes-background-color: speed_75_mph#c0f100; } /*************************************/ /* 4 - display maxspeed:forward=* for righthandtraffic and maxspeed:backward=* for lefthandtraffic */ /* 4.1 - kmh */ way["maxspeed:forward"="none"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="none"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_none#febede; } way["maxspeed:forward"="5"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="5"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_5#ff5656; } way["maxspeed:forward"="10"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="10"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_10#b80022; } way["maxspeed:forward"="15"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="15"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_15#00da8b; } way["maxspeed:forward"="20"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="20"]!:righthandtraffic::maxspeedlayer, way["maxspeed:forward"="RU:living_street"][setting("RU")]:righthandtraffic::maxspeedlayer /* no left hand traffic in RU, so a selector is not needed */ { set maxspeed_right; right-casing-color: speed_20#e3cc82; } way["maxspeed:forward"="30"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="30"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_30#4d4dff; } way["maxspeed:forward"="40"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="40"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_40#4d4d00; } way["maxspeed:forward"="45"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="45"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_45#ff529a; } way["maxspeed:forward"="50"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="50"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_50#07f807; } way["maxspeed:forward"="60"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="60"]!:righthandtraffic::maxspeedlayer, way["maxspeed:forward"="RU:urban"][setting("RU")]:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_60#9f9fff; } way["maxspeed:forward"="70"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="70"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_70#ee8b00; } way["maxspeed:forward"="80"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="80"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_80#f90808; } way["maxspeed:forward"="90"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="90"]!:righthandtraffic::maxspeedlayer, way["maxspeed:forward"="RU:rural"][setting("RU")]:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_90#07f8f8; } way["maxspeed:forward"="100"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="100"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_100#f807f8; } way["maxspeed:forward"="110"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="110"]!:righthandtraffic::maxspeedlayer, way["maxspeed:forward"="RU:motorway"][setting("RU")]:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_110#7807f8; } way["maxspeed:forward"="120"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="120"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_120#ccad24; } way["maxspeed:forward"="130"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="130"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_130#c0f100; } /* 4.2 - mph */ way["maxspeed:forward"="5 mph"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="5 mph"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_5_mph#b80022; } way["maxspeed:forward"="10 mph"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="10 mph"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_10_mph#00da8b; } way["maxspeed:forward"="15 mph"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="15 mph"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_15_mph#e3cc82; } way["maxspeed:forward"="20 mph"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="20 mph"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_20_mph#4d4dff; } way["maxspeed:forward"="25 mph"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="25 mph"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_25_mph#4d4d00; } way["maxspeed:forward"="30 mph"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="30 mph"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_30_mph#ff529a; } way["maxspeed:forward"="35 mph"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="35 mph"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_35_mph#07f807; } way["maxspeed:forward"="40 mph"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="40 mph"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_40_mph#9f9fff; } way["maxspeed:forward"="45 mph"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="45 mph"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_45_mph#ee8b00; } way["maxspeed:forward"="50 mph"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="50 mph"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_50_mph#f90808; } way["maxspeed:forward"="55 mph"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="55 mph"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_55_mph#07f8f8; } way["maxspeed:forward"="60 mph"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="60 mph"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_60_mph#f807f8; } way["maxspeed:forward"="65 mph"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="65 mph"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_65_mph#7807f8; } way["maxspeed:forward"="70 mph"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="70 mph"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_70_mph#ccad24; } way["maxspeed:forward"="75 mph"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="75 mph"]!:righthandtraffic::maxspeedlayer { set maxspeed_right; right-casing-color: speed_75_mph#c0f100; } /* 4.3 - general rules */ way.maxspeed_right::maxspeedlayer { right-casing-opacity: 0.75; right-casing-width: 6; right-casing-offset: 0; } way|z16.maxspeed_right::maxspeedlayer { right-casing-width: 5; } way|z-15.maxspeed_right::maxspeedlayer { right-casing-width: 4; } way.maxspeed_right[maxspeed:variable:forward]:righthandtraffic::maxspeedlayer, way.maxspeed_right[maxspeed:variable:backward]!:righthandtraffic::maxspeedlayer { right-casing-dashes: 34,6; } /* 4.4 - conditional righthand-forward and lefthand-backward maxspeed */ way.cond_forward_kmh:righthandtraffic::maxspeedlayer, way.cond_backward_kmh!:righthandtraffic::maxspeedlayer, way.cond_forward_mph:righthandtraffic::maxspeedlayer, way.cond_backward_mph!:righthandtraffic::maxspeedlayer { right-casing-dashes: 55,25; } /* 4.4.1 - kmh */ way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="none"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="none"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_none#febede; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="5"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="5"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_5#ff5656; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="10"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="10"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_10#b80022; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="15"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="15"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_15#00da8b; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="20"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="20"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_20#e3cc82; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="30"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="30"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_30#4d4dff; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="40"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="40"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_40#4d4d00; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="45"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="45"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_45#ff529a; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="50"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="50"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_50#07f807; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="60"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="60"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_60#9f9fff; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="70"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="70"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_70#ee8b00; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="80"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="80"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_80#f90808; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="90"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="90"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_90#07f8f8; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="100"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="100"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_100#f807f8; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="110"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="110"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_110#7807f8; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="120"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="120"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_120#ccad24; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="130"]:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="130"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_130#c0f100; } /* 4.4.2 - mph */ way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="5"]:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="5"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_5_mph#b80022; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="10"]:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="10"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_10_mph#00da8b; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="15"]:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="15"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_15_mph#e3cc82; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="20"]:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="20"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_20_mph#4d4dff; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="25"]:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="25"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_25_mph#4d4d00; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="30"]:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="30"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_30_mph#ff529a; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="35"]:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="35"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_35_mph#07f807; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="40"]:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="40"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_40_mph#9f9fff; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="45"]:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="45"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_45_mph#ee8b00; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="50"]:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="50"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_50_mph#f90808; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="55"]:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="55"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_55_mph#07f8f8; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="60"]:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="60"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_60_mph#f807f8; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="65"]:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="65"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_65_mph#7807f8; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="70"]:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="70"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_70_mph#ccad24; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="75"]:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="75"]!:righthandtraffic::maxspeedlayer { right-casing-dashes-background-color: speed_75_mph#c0f100; } /*************************************/ /* 5 - display maxspeed:forward=* for lefthandtraffic and maxspeed:backward=* for righthandtraffic */ /* 5.1 - kmh */ way["maxspeed:forward"="none"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="none"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_none#febede; } way["maxspeed:forward"="5"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="5"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_5#ff5656; } way["maxspeed:forward"="10"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="10"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_10#b80022; } way["maxspeed:forward"="15"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="15"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_15#00da8b; } way["maxspeed:forward"="20"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="20"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="RU:living_street"][setting("RU")]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_20#e3cc82; } way["maxspeed:forward"="30"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="30"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_30#4d4dff; } way["maxspeed:forward"="40"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="40"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_40#4d4d00; } way["maxspeed:forward"="45"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="45"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_45#ff529a; } way["maxspeed:forward"="50"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="50"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_50#07f807; } way["maxspeed:forward"="60"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="60"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="RU:urban"][setting("RU")]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_60#9f9fff; } way["maxspeed:forward"="70"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="70"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_70#ee8b00; } way["maxspeed:forward"="80"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="80"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_80#f90808; } way["maxspeed:forward"="90"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="90"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="RU:rural"][setting("RU")]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_90#07f8f8; } way["maxspeed:forward"="100"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="100"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_100#f807f8; } way["maxspeed:forward"="110"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="110"]:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="RU:motorway"][setting("RU")]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_110#7807f8; } way["maxspeed:forward"="120"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="120"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_120#ccad24; } way["maxspeed:forward"="130"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="130"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_130#c0f100; } /* 5.2 - mph */ way["maxspeed:forward"="5 mph"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="5 mph"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_5_mph#b80022; } way["maxspeed:forward"="10 mph"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="10 mph"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_10_mph#00da8b; } way["maxspeed:forward"="15 mph"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="15 mph"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_15_mph#e3cc82; } way["maxspeed:forward"="20 mph"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="20 mph"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_20_mph#4d4dff; } way["maxspeed:forward"="25 mph"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="25 mph"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_25_mph#4d4d00; } way["maxspeed:forward"="30 mph"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="30 mph"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_30_mph#ff529a; } way["maxspeed:forward"="35 mph"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="35 mph"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_35_mph#07f807; } way["maxspeed:forward"="40 mph"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="40 mph"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_40_mph#9f9fff; } way["maxspeed:forward"="45 mph"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="45 mph"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_45_mph#ee8b00; } way["maxspeed:forward"="50 mph"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="50 mph"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_50_mph#f90808; } way["maxspeed:forward"="55 mph"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="55 mph"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_55_mph#07f8f8; } way["maxspeed:forward"="60 mph"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="60 mph"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_60_mph#f807f8; } way["maxspeed:forward"="65 mph"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="65 mph"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_65_mph#7807f8; } way["maxspeed:forward"="70 mph"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="70 mph"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_70_mph#ccad24; } way["maxspeed:forward"="75 mph"]!:righthandtraffic::maxspeedlayer, way["maxspeed:backward"="75 mph"]:righthandtraffic::maxspeedlayer { set maxspeed_left; left-casing-color: speed_75_mph#c0f100; } /* 5.3 - general rules */ way.maxspeed_left::maxspeedlayer { left-casing-opacity: 0.75; left-casing-width: 6; left-casing-offset: 0; } way|z16.maxspeed_left::maxspeedlayer { left-casing-width: 5; } way|z-15.maxspeed_left::maxspeedlayer { left-casing-width: 4; } way.maxspeed_left[maxspeed:variable:forward]!:righthandtraffic::maxspeedlayer, way.maxspeed_left[maxspeed:variable:backward]:righthandtraffic::maxspeedlayer { left-casing-dashes: 34,6; } /* 5.4 - conditional lefthand-forward and righthand-backward maxspeed */ way.cond_forward_kmh!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh:righthandtraffic::maxspeedlayer, way.cond_forward_mph!:righthandtraffic::maxspeedlayer, way.cond_backward_mph:righthandtraffic::maxspeedlayer { left-casing-dashes: 55,25; } /* 5.4.1 - kmh */ way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="none"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="none"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_none#febede; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="5"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="5"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_5#ff5656; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="10"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="10"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_10#b80022; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="15"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="15"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_15#00da8b; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="20"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="20"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_20#e3cc82; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="30"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="30"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_30#4d4dff; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="40"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="40"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_40#4d4d00; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="45"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="45"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_45#ff529a; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="50"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="50"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_50#07f807; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="60"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="60"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_60#9f9fff; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="70"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="70"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_70#ee8b00; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="80"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="80"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_80#f90808; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="90"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="90"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_90#07f8f8; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="100"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="100"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_100#f807f8; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="110"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="110"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_110#7807f8; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="120"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="120"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_120#ccad24; } way.cond_forward_kmh[prop(maxsp_forward_cond, maxspeedlayer)="130"]!:righthandtraffic::maxspeedlayer, way.cond_backward_kmh[prop(maxsp_backward_cond, maxspeedlayer)="130"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_130#c0f100; } /* 5.4.2 - mph */ way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="5"]!:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="5"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_5_mph#b80022; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="10"]!:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="10"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_10_mph#00da8b; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="15"]!:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="15"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_15_mph#e3cc82; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="20"]!:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="20"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_20_mph#4d4dff; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="25"]!:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="25"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_25_mph#4d4d00; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="30"]!:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="30"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_30_mph#ff529a; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="35"]!:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="35"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_35_mph#07f807; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="40"]!:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="40"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_40_mph#9f9fff; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="45"]!:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="45"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_45_mph#ee8b00; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="50"]!:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="50"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_50_mph#f90808; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="55"]!:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="55"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_55_mph#07f8f8; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="60"]!:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="60"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_60_mph#f807f8; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="65"]!:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="65"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_65_mph#7807f8; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="70"]!:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="70"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_70_mph#ccad24; } way.cond_forward_mph[prop(maxsp_forward_cond, maxspeedlayer)="75"]!:righthandtraffic::maxspeedlayer, way.cond_backward_mph[prop(maxsp_backward_cond, maxspeedlayer)="75"]:righthandtraffic::maxspeedlayer { left-casing-dashes-background-color: speed_75_mph#c0f100; } /*************************************/ /* 6 - error reporting */ /* 6.1 - report wrong value of maxspeed */ way[maxspeed=~/^[0-9]+$/]::maxspeedlayer, way[maxspeed=signals]::maxspeedlayer, way[maxspeed=none]::maxspeedlayer, way[maxspeed=~/^[0-9]+ mph/]::maxspeedlayer, way[maxspeed=~/[0-9]+ km\/h/]::maxspeedlayer, way[maxspeed=~/[0-9]+ knots/]::maxspeedlayer, way[maxspeed="RU:living_street"][setting("RU")]::maxspeedlayer, way[maxspeed="RU:urban"][setting("RU")]::maxspeedlayer, way[maxspeed="RU:rural"][setting("RU")]::maxspeedlayer, way[maxspeed="RU:motorway"][setting("RU")]::maxspeedlayer { set correct_value; } way[maxspeed:forward=~/^[0-9]+$/]::maxspeedlayer, way[maxspeed:forward=signals]::maxspeedlayer, way[maxspeed:forward=none]::maxspeedlayer, way[maxspeed:forward=~/^[0-9]+ mph/]::maxspeedlayer, way[maxspeed:forward=~/[0-9]+ km\/h/]::maxspeedlayer, way[maxspeed:forward=~/[0-9]+ knots/]::maxspeedlayer, way[maxspeed:forward="RU:living_street"][setting("RU")]::maxspeedlayer, way[maxspeed:forward="RU:urban"][setting("RU")]::maxspeedlayer, way[maxspeed:forward="RU:rural"][setting("RU")]::maxspeedlayer, way[maxspeed:forward="RU:motorway"][setting("RU")]::maxspeedlayer { set correct_value_forward; } way[maxspeed:backward=~/^[0-9]+$/]::maxspeedlayer, way[maxspeed:backward=signals]::maxspeedlayer, way[maxspeed:backward=none]::maxspeedlayer, way[maxspeed:backward=~/^[0-9]+ mph/]::maxspeedlayer, way[maxspeed:backward=~/[0-9]+ km\/h/]::maxspeedlayer, way[maxspeed:backward=~/[0-9]+ knots/]::maxspeedlayer, way[maxspeed:backward="RU:living_street"][setting("RU")]::maxspeedlayer, way[maxspeed:backward="RU:urban"][setting("RU")]::maxspeedlayer, way[maxspeed:backward="RU:rural"][setting("RU")]::maxspeedlayer, way[maxspeed:backward="RU:motorway"][setting("RU")]::maxspeedlayer { set correct_value_backward; } way["maxspeed"]!.correct_value::maxspeedlayer, way["maxspeed:forward"]!.correct_value_forward::maxspeedlayer, way["maxspeed:backward"]!.correct_value_backward::maxspeedlayer { color: yellow; dashes-background-color: red; dashes: 4,24; opacity: 1; width: 5; text: tr("no correct value for maxspeed!"); text-color: black; font-size: 11; text-halo-color: red; text-halo-radius: 2; casing-width: 1; casing-color: yellow; } /* 6.2 - report wrong value of maxspeed:conditional */ way["maxspeed:conditional"=~/^[1-9][0-9]* knots @ /]::maxspeedlayer, way["maxspeed:forward:conditional"=~/^[1-9][0-9]* knots @ /]::maxspeedlayer, way["maxspeed:backward:conditional"=~/^[1-9][0-9]* knots @ /]::maxspeedlayer { set cond_knots; } way["maxspeed:conditional"]!.cond_kmh!.cond_mph!.cond_knots::maxspeedlayer, way["maxspeed:forward:conditional"]!.cond_forward_kmh!.cond_forward_mph!.cond_knots::maxspeedlayer, way["maxspeed:backward:conditional"]!.cond_backward_kmh!.cond_backward_mph!.cond_knots::maxspeedlayer { color: yellow; dashes-background-color: red; dashes: 4,24; opacity: 1; width: 5; text: tr("wrong conditional maxspeed value!"); text-color: black; font-size: 11; text-halo-color: red; text-halo-radius: 2; casing-width: 1; casing-color: yellow; } /* 6.3 - report conditional maxspeed without default maxspeed */ way["maxspeed:conditional"][!"maxspeed"]::maxspeedlayer, way["maxspeed:forward:conditional"][!"maxspeed:forward"][!"maxspeed"]::maxspeedlayer, way["maxspeed:backward:conditional"][!"maxspeed:backward"][!"maxspeed"]::maxspeedlayer { color: yellow; dashes-background-color: red; dashes: 4,24; opacity: 1; width: 5; text: tr("conditional maxspeed without default maxspeed!"); text-color: black; font-size: 11; text-halo-color: red; text-halo-radius: 2; casing-width: 1; casing-color: yellow; } /* 6.4 - report if maxspeed direction is opposed to oneway direction */ way["maxspeed:backward"][oneway?], way["maxspeed:forward"][oneway=-1] { color: yellow; dashes-background-color: red; dashes: 4,24; opacity: 1; width: 5; text: tr("maxspeed opposed to oneway direction!"); text-color: black; font-size: 11; text-halo-color: red; text-halo-radius: 2; casing-width: 1; casing-color: yellow; } }}}