meta { title: "Wheelchair Routing Attributes"; /* title shown in the menu */ icon: "https://github.com/species/josm-preset-wheelchair/raw/master/footway-wheelchair.png"; /* small icon shown in the menu next to the title */ version: "1.0.20"; description: "A Style for highlighting wheelchair-relevant Tags"; author: "Michael Maier (species@osm)"; /* link: "http://..."; URL to the web page of the style */ min-josm-version: 6789; /* the minimum JOSM version where this style works */ } /* zoomlevels: icons 21+ great below 20 smaller icons ways: -19 narrow 20+ dick texts 16-20 short , 20- normal */ node|z18-[barrier=kerb] { text: "kerb:height"; text-halo-color: black; text-halo-radius: 2; font-size: 12; text-anchor-vertical:top; text-anchor-horizontal:center; text-offset-y:14; } node|z-20[barrier=kerb] { font-size: 8; text-offset-y:10; text-halo-radius: 1; } node|z21-[barrier=kerb][!kerb:height][kerb!=flush]::error { text: eval("Kerb height?"); text-halo-color: white; text-halo-radius: 2; text-color: red; font-size: 14; } node|z16-20[barrier=kerb][!kerb:height][kerb!=flush]::error { text: eval("?"); text-halo-color: white; text-halo-radius: 2; text-color: red; font-size: 14; } node|z16-[barrier=kerb][kerb:height!~/\.|cm|^0$/][kerb:height]::error { text: eval("unusual Kerb height?"); text-halo-color: white; text-halo-radius: 2; text-color: red; font-size: 14; } node|z21-[kerb] { icon-width: 24; } node|z-20[kerb] { icon-width: 16; } node|z21-[kerb]::rand { symbol-shape: square; symbol-size:28; symbol-fill-color:black; z-index:-1; } node|z21-[kerb=no]::rand { symbol-size:8; } node[barrier=kerb][kerb!~/raised|flush|lowered|rolled/] { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/kerb_unknown.png"; } node[barrier=kerb][kerb=raised] { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/kerb_raised.png"; } node[barrier=kerb][kerb=rolled] { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/kerb_rolled.png"; } node[barrier=kerb][kerb=flush] { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/kerb_flush.png"; } node[barrier=kerb][kerb=lowered] { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/kerb_lowered.png"; } way[barrier=kerb][kerb=lowered]::background { width:2; color:yellow; z-index:-100; offset:2; } way[barrier=kerb][kerb=raised]::background { width:2; color:red; z-index:-10; offset:2; } way[barrier=kerb][kerb=flush]::background { width:2; color:green; z-index:-10; offset:2; } way[barrier=kerb][kerb=rolled]::background { width:2; color:orange; z-index:-10; offset:2; } /* icon for: kerb must be on change sidewalk/crossing, otherwise it's a step! */ way[footway=crossing] > node|z20-[highway!=crossing][!kerb][railway!=crossing]:connection { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/kerb_unknown.png"; icon-width: 24; } way[footway=crossing] > node|z16-19[highway!=crossing][!kerb][railway!=crossing]:connection { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/kerb_unknown.png"; icon-width: 16; } way[footway=crossing] > node|z16-[highway!=crossing][!kerb][railway!=crossing]:connection::rand { symbol-shape: square; symbol-fill-color:orange; symbol-size:20; z-index:-1; } way[footway=crossing] > node|z20-[highway!=crossing][!kerb][railway!=crossing]:connection::rand { symbol-size:28; } way[footway=crossing] { width: 16; color: black; dashes: 1,7; dashes-background-color: white; z-index:-1; } way|z-19[footway=crossing] { width: 8; } way[footway=crossing][surface=~/^paved|asphalt/]{ dashes-background-color:green } way[footway=crossing][surface=unpaved]{ dashes-background-color:#ff00ff } way[footway=crossing][surface=wood] { dashes-background-color:blue } way[footway=crossing][surface=cobblestone] { dashes-background-color:orange } way[footway=crossing][surface=~/unpaved|gravel|sand/] { dashes-background-color:#ff00ff } node[highway=crossing][crossing_ref=zebra] < way[footway=crossing] { width: 16; color: black; dashes: 4,4; z-index:-1; } node[highway=crossing][crossing_ref=zebra] < way|z-19[footway=crossing] { width: 8; } node[highway=crossing][crossing_ref=toucan] < way[footway=crossing] { width: 4; color:white; dashes-background-color: green; dashes: 4,4; offset:6; z-index:-1; } node[highway=crossing][crossing_ref=toucan] < way[footway=crossing]::right { width: 4; color:white; dashes-background-color: green; dashes: 4,4; offset:-6; z-index:-1; } node[highway=crossing][crossing_ref=toucan] < way[footway=crossing][surface=unpaved]{ dashes-background-color:#ff00ff } node[highway=crossing][crossing_ref=toucan] < way[footway=crossing][surface=unpaved]::right { dashes-background-color:#ff00ff } node[highway=crossing][crossing_ref=toucan] < way[footway=crossing][surface=wood] { dashes-background-color:blue } node[highway=crossing][crossing_ref=toucan] < way[footway=crossing][surface=wood]::right { dashes-background-color:blue } node[highway=crossing][crossing_ref=toucan] < way[footway=crossing][surface=cobblestone] { dashes-background-color:orange } node[highway=crossing][crossing_ref=toucan] < way[footway=crossing][surface=cobblestone]::right { dashes-background-color:orange } node[highway=crossing][crossing_ref=toucan] < way[footway=crossing][surface=~/unpaved|gravel|sand/] { dashes-background-color:#ff00ff } node[highway=crossing][crossing_ref=toucan] < way[footway=crossing][surface=~/unpaved|gravel|sand/]::right { dashes-background-color:#ff00ff } node[highway=crossing][crossing_ref=toucan] < way[footway=crossing][!surface] { dashes-background-color:black } node[highway=crossing][crossing_ref=toucan] < way[footway=crossing][!surface]::right { dashes-background-color:black } /* step properties */ way[highway=steps] { color:red; width:24; repeat-image-width: 24; dashes:1,4; } way|z-19[highway=steps] { width:12 } way|z20-[highway=steps][handrail:center=yes]::center { color:red; width:2; } way|z20-[highway=steps][handrail:right=yes]::right { color:red; width:2; offset:-11; } way|z20-[highway=steps][handrail:left=yes]::left { color:red; width:2; offset:11; } way[highway=steps][incline=up] { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_up_steps.png"; } way[highway=steps][incline=down] { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_down_steps.png"; } way|z-19[highway=steps][incline=up], way|z-19[highway=steps][incline=down] { repeat-image-width:12 } /* cycle way signs */ way[segregated]::segregated { repeat-image-spacing: 90; repeat-image-width: 24; repeat-image-phase:60; major-z-index:3.1; } way|z18-19[segregated]::segregated { repeat-image-width: 12; } way|z18-[segregated=no]::segregated { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/foot_and_cycleway_combined_rotated.png"; } way|z18-[segregated=yes]::segregated { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/foot_and_cycleway_segregated_rotated.png"; } /* inclines: 0-2: green 3-6%: yellow 7-10% orange > 10 red */ way[highway][incline]::incline { repeat-image-spacing: 90; repeat-image-width: 24; major-z-index:3.1; } way[highway][incline=~/^[12](?:[.][0-9])?%$/]!:closed::incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_up_green.png";} way[highway][incline=~/^[3-6](?:[.][0-9])?%$/]!:closed::incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_up_yellow.png";} way[highway][incline=~/^[7-9]{1}(?:[.][0-9])?%$|^10(?:[.][0-9])?%$/]!:closed::incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_up_orange.png";} way[highway][incline=~/^1[1-9](?:[.][0-9])?%$|^[2-9][0-9]%$|^1[0-9]{2}%$/]!:closed::incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_up_red.png";} way[highway][incline="up"][highway!=steps]!:closed::incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_up_generic.png";} way[highway][incline=~/^-[12](?:[.][0-9])?%$/]!:closed::incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_down_green.png";} way[highway][incline=~/^-[3-6](?:[.][0-9])?%$/]!:closed::incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_down_yellow.png";} way[highway][incline=~/^-[7-9]{1}(?:[.][0-9])?%$|^-10(?:[.][0-9])?%$/]!:closed::incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_down_orange.png";} way[highway][incline=~/^-1[1-9](?:[.][0-9])?%$|^-[2-9][0-9](?:[.][0-9])?%$|^-1[0-9]{2}(?:[.][0-9])?%$/]!:closed::incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_down_red.png";} way[highway][incline="down"][highway!=steps]!:closed::incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_down_generic.png";} area[highway][incline=~/^[12](?:[.][0-9])?%$/]:closed::incline { fill-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline-area-green.png";} area[highway][incline=~/^[3-6](?:[.][0-9])?%$/]:closed::incline { fill-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline-area-yellow.png";} area[highway][incline=~/^[7-9]{1}(?:[.][0-9])?%$|^10(?:[.][0-9])?%$/]:closed::incline { fill-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline-area-orange.png";} area[highway][incline=~/^1[1-9](?:[.][0-9])?%$|^[2-9][0-9]%$|^1[0-9]{2}%$/]:closed::incline { fill-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline-area-red.png";} way[highway][incline:across]::across_incline { repeat-image-spacing: 90; repeat-image-phase:30; repeat-image-width: 24; major-z-index:3.1; } way[highway][incline:across="0%"]::across_incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_across-even.png";} way[highway][incline:across=~/^[12](?:[.][0-9])?%$/]::across_incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_across-right_green.png";} way[highway][incline:across=~/^[3-6](?:[.][0-9])?%$/]::across_incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_across-right_yellow.png";} way[highway][incline:across=~/^[7-9]{1}(?:[.][0-9])?%$|^10(?:[.][0-9])?%$/]::across_incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_across-right_orange.png";} way[highway][incline:across=~/^1[1-9](?:[.][0-9])?%$|^[2-9][0-9](?:[.][0-9])?%$|^1[0-9]{2}(?:[.][0-9])?%$/]::across_incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_across-right_red.png";} way[highway][incline:across=~/^-[12](?:[.][0-9])?%$/]::across_incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_across-left_green.png";} way[highway][incline:across=~/^-[3-6](?:[.][0-9])?%$/]::across_incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_across-left_yellow.png";} way[highway][incline:across=~/^-[7-9]{1}(?:[.][0-9])?%$|^-10(?:[.][0-9])?%$/]::across_incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_across-left_orange.png";} way[highway][incline:across=~/^-1[1-9](?:[.][0-9])?%$|^[2-9][0-9](?:[.][0-9])?%$|^-1[0-9]{2}(?:[.][0-9])?%$/]::across_incline { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/incline_across-left_red.png";} way|z-17[highway][incline:across]::across_incline, way|z-17[incline]::incline { repeat-image:none; } /* widths */ way|z19-[highway=footway][footway!=crossing]::width, way|z19-[highway=cycleway][foot=~/designated|yes/][footway!=crossing]::width, way|z19-[highway=steps]::width { set display_width; } way[!width].display_width::width { text: eval("missing width"); text-offset:0; text-color: red; font-size: 14; text-halo-color: white; text-halo-radius: 2; } area[!width].display_width::width { text: eval(""); } way[width].display_width::width { repeat-image-spacing: 90; repeat-image-phase:85; repeat-image-width: 24; major-z-index: 3.2; text: width; text-offset:20; text-color: red; font-size: 14; text-halo-color: white; text-halo-radius: 2; } way|z19[width].display_width::width { repeat-image-width: 12; } way[width < 0.8].display_width::width { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/width-bad.png"; } way[width >= 0.8][width < 0.9].display_width::width { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/width-orange.png"; text-color: orange; } way[width >= 0.9][width < 1.8].display_width::width { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/width-yellow.png"; text-color: yellow; text-halo-color: gray; } way[width >= 1.8].display_width::width { repeat-image: "https://github.com/species/josm-preset-wheelchair/raw/master/width-good.png"; text-color: green; } way[width][width !~ /^[0-9.]{1,25}$/ ].display_width::width { text: eval("Fix width"); text-offset:0; text-color: red; font-size: 14; text-halo-color: white; text-halo-radius: 2; } /* surface status */ /* green: all paved */ /* orange: cobblestone */ /* blue: wood */ /* pink: gravel,ground,sand */ /* green with grey crosses: grass_paver */ /* ways for which surface should be rendered */ way[highway=steps]::surface, way[highway=footway][footway!=crossing]::surface, way[highway=cycleway]::surface, way[highway=~/service|residential|track|unclassified|pedestrian/]::surface { set surf; width: 4; major-z-index:1.5; } way|z17-19[highway=steps]::surface, way|z17-19[highway=footway][footway!=crossing]::surface, way|z17-19[highway=cycleway]::surface, way|z17-19[highway=~/service|residential|track|unclassified|pedestrian/]::surface { width: 12; } way|z20-[highway=steps]::surface, way|z20-[highway=footway][footway!=crossing]::surface, way|z20-[highway=cycleway]::surface, way|z20-[highway=~/service|residential|track|unclassified|pedestrian/]::surface { width: 24; } area|z17-[highway=footway][footway!=crossing]:closed::surface, area|z17-[highway=cycleway]:closed::surface, area|z17-[highway=~/service|residential|track|unclassified|pedestrian/]:closed::surface, area|z17-[area:highway=~/service|residential|track|unclassified|pedestrian/]:closed::surface { set asurf; width:7; fill-opacity:0.5; major-z-index:1.1; } way[!surface].surf::surface { color:white; } way[surface=~/paved|asphalt|concrete/].surf::surface { color:green; } way[surface=cobblestone].surf::surface { color:orange; } way[surface=~/unpaved|gravel|sand/].surf::surface { color:#ff00ff; } way[surface=wood].surf::surface { color:blue; } area[!surface].asurf::surface { fill-color:white; } area[surface=~/paved|asphalt|concrete/].asurf::surface { fill-color:green; } area[surface=cobblestone].asurf::surface { fill-color:orange; } area[surface=~/unpaved|gravel|sand/].asurf::surface { fill-color:#ff00ff; } area[surface=wood].asurf::surface { fill-color:blue; } /* smoothness: casing */ /* */ way[highway][smoothness]::smoothness { width: 8; /* 32 */ dashes:4,4; major-z-index:0.4; } way|z17-19[highway][smoothness]::smoothness { width: 16; } way|z20-[highway][smoothness]::smoothness { width: 32; } way[highway][smoothness=~/excellent|good/]::smoothness { color:green; } way[highway][smoothness=~/intermediate/]::smoothness { color:yellow; } way[highway][smoothness=~/^bad$/]::smoothness { color:orange; } way[highway][smoothness][smoothness!~/excellent|good|intermediate|bad/]::smoothness { color:red; } /* entrances * ramp + incline * width * door type (hinged/sliding/revolving/folding) * Automatic Yes/No * step_count * Handrail * exit yes/no * wheelchair yes/no zoom: Attributes from z19 */ node|z19-[entrance][!width]::width { text: eval("width?"); text-halo-color: white; text-halo-radius: 2; text-color: blue; font-size: 14; text-anchor-vertical:top; text-anchor-horizontal:center; text-offset-y:28; text-offset-x:-38; } node|z19-[entrance][width]::width { text: "width"; text-halo-color: white; text-halo-radius: 2; text-color: blue; font-size: 14; text-anchor-vertical:top; text-anchor-horizontal:center; text-offset-y:28; text-offset-x:-26; } node|z19-[entrance][automatic_door]::A { text: "automatic_door"; text-halo-color: white; text-halo-radius: 2; text-color: blue; font-size: 14; text-anchor-vertical:top; text-anchor-horizontal:right; text-offset-y:28; text-offset-x:14; } node|z19-[entrance][automatic_door=yes]::A { text: eval("A"); } node|z19-[entrance][automatic_door=no]::A { text: eval(""); } node|z19-[entrance][door=revolving]::door { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/door_revolving.png"; icon-width: 24; } node|z19-[entrance][door=sliding]::door { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/door_sliding.png"; icon-width: 24; } node|z19-[entrance][door=hinged]::door { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/door_swinging.png"; icon-width: 24; } node|z19-[entrance][door=folding]::door { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/door_folding.png"; icon-width: 24; } node|z19-[entrance][door=trapdoor]::door { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/door_trapdoor.png"; icon-width: 24; } node|z19-[entrance][step_count]::step_count { text: eval(tag("step.height") ? concat(tag("step_count"),", ",tag("step.height")) : tag("step_count")); text-halo-color: white; text-halo-radius: 2; text-color: red; font-size: 14; text-anchor-vertical:top; text-anchor-horizontal:center; text-offset-y:5; text-offset-x:20; } node|z19-[entrance][ramp:stroller=yes]::stroller, node[entrance][stroller=yes]::stroller { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/stroller.png"; icon-width: 64; } node|z19-[entrance][wheelchair=~/yes|designated/]::wheelchair { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/wheelchair-corner.png"; icon-width: 64; } node|z19-[entrance][wheelchair=no]::wheelchair { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/wheelchair-no-corner.png"; icon-width: 64; } node|z19-[entrance][ramp=yes]::ramp { icon-image: "https://github.com/species/josm-preset-wheelchair/raw/master/ramp_red.png"; icon-width: 24; } node|z19-[entrance][ramp:incline]::incline { text: "ramp:incline"; text-halo-color: white; text-halo-radius: 2; text-color: red; font-size: 14; text-anchor-vertical:top; text-anchor-horizontal:center; text-offset-y:-14; text-offset-x:32; } node[highway=crossing]::conn { text: eval("Connected?"); text-halo-color: black; text-halo-radius: 2; font-size: 12; text-anchor-vertical:top; text-anchor-horizontal:center; text-color:red; text-offset-y:-16; } node|z-17[highway=crossing]::conn { text: eval("?"); font-size: 8; text-offset-y:-10; } node[highway=crossing]:connection::conn { text: eval(""); } node|z21-[highway=crossing], node|z21-[traffic_calming=bump] { icon-width: 26; } node[manhole], node[traffic_calming=bump] { text: "height"; text-halo-color: black; text-halo-radius: 2; font-size: 12; text-anchor-vertical:top; text-anchor-horizontal:center; text-offset-y:14; } node[manhole] { icon-image: "presets/landmark/cave_entrance.svg"; } node[entrance] { }