query: 15: | ( way[highway~"^(footway|pedestrian|steps|path|platform)$"]; way[highway=cycleway][foot~"^(yes|designated)$"]; way[footway]; way["area:highway"~"^(footway|pedestrian|steps|path|platform|sidewalk)$"]; relation["area:highway"~"^(footway|pedestrian|steps|path|platform|sidewalk)$"]; way[sidewalk~"^(yes|both|left|right|no|separate|none)$"]; way["sidewalk:left"~"(yes|no|separate)$"]; way["sidewalk:right"~"(yes|no|separate)$"]; way["sidewalk:both"~"(yes|no|separate)$"]; nwr["railway"="platform"]; node[highway=crossing]; ) feature: pre: | {% set sides = ['default'] %} {% set sidewalk_left = null %}{% set sidewalk_right = null %} {% set cycleway = false %} {% set category = tags.highway %} {% if attribute(tags, 'sidewalk:both') == 'yes' or tags.sidewalk in ['yes', 'both', 'left', 'both', 'right'] or tags.footway == 'sidewalk' %} {% set category = 'sidewalk' %} {% endif %} {% if tags.highway in ['pedestrian', 'footway','steps','path','cycleway','platform'] %} {% set sides = sides|merge(['main']) %} {% endif %} {% if tags.highway in ['cycleway'] %} {% set category = 'footway' %} {% set cycleway = true %} {% set sides = sides|merge(['cycleway']) %} {% endif %} {% if tags.highway in ['path'] and tags.bicycle in ['yes', 'designated'] %} {% set cycleway = true %} {% set sides = sides|merge(['cycleway']) %} {% endif %} {% if attribute(tags, 'area:highway') in ['footway'] %} {% set sides = sides|merge(['main']) %} {% set category = attribute(tags, 'area:highway') %} {% endif %} {% if tags.railway in ['platform'] %} {% set sides = sides|merge(['main']) %} {% set category = 'platform' %} {% endif %} {% if tags.footway == 'crossing' %} {% set category = 'crossing' %} {% endif %} {% if tags.sidewalk in ['no', 'none'] %} {% set sidewalk_left = 'no' %} {% set sidewalk_right = 'no' %} {% set sides = sides|merge(['leftr', 'rightr']) %} {% endif %} {% if tags.sidewalk == 'separate' %} {% set sidewalk_left = 'separate' %} {% set sidewalk_right = 'separate' %} {% set sides = sides|merge(['leftr', 'rightr']) %} {% endif %} {% if attribute(tags, 'sidewalk:both') %} {% set sidewalk_left = attribute(tags, 'sidewalk:both') %} {% set sides = sides|merge(['leftr', 'rightr']) %} {% endif %} {% if attribute(tags, 'sidewalk:left') %} {% set sidewalk_left = attribute(tags, 'sidewalk:left') %} {% set sides = sides|merge(['leftr']) %} {% endif %} {% if attribute(tags, 'sidewalk:left') == 'yes' or attribute(tags, 'sidewalk:both') == 'yes' or tags.sidewalk in ['left', 'both'] %} {% set sidewalk_left = 'yes' %} {% set sides = sides|merge(['leftr', 'left']) %} {% endif %} {% if attribute(tags, 'sidewalk:right') %} {% set sidewalk_right = attribute(tags, 'sidewalk:right') %} {% set sides = sides|merge(['rightr']) %} {% endif %} {% if attribute(tags, 'sidewalk:right') == 'yes' or attribute(tags, 'sidewalk:both') == 'yes' or tags.sidewalk in ['right', 'both'] %} {% set sidewalk_right = 'yes' %} {% set sides = sides|merge(['rightr', 'right']) %} {% endif %} {% if type == 'node' %} {% set sides = ['node'] %} {% endif %} description: | {% if tags.footway %} {{ tagTrans('footway', tags.footway) }} {% elseif tags.highway %} {% if tags.highway in ['path', 'cycleway'] and tags.segregated %} {{ tagTrans('highway', 'cycleway segregated=' ~ tags.segregated) }} {% else %} {{ tagTrans('highway', tags.highway) }} {% endif %} {% elseif tags.railway %} {{ tagTrans('railway', tags.railway) }} {% elseif attribute(tags, 'area:highway') %} {{ tagTrans('highway', attribute(tags, 'area:highway')) }} {% endif %} body: | markerSymbol: "" listMarkerSymbol: | {% if tags.area == 'yes' or attribute(tags, 'area:highway') %} polygon {% elseif 'node' in sides %} {{ markerCircle({ width: 0, radius: 5, fillOpacity: 1, fill: true, color: const.categories[category].color }) }} {% else %} {{ markerLine({ 'styles': sides|join(','), 'style:main': { width: cycleway and tags.segregated == 'yes' ? 2 : const.categories[category].width|default(3), color: const.categories[category].color, dashArray: tags.highway == 'steps' ? '3,3' : cycleway and tags.segregated != 'yes' ? '8,8' : '', lineCap: tags.highway == 'steps' or (cycleway and tags.segregated != 'yes') ? 'butt' : 'round', offset: cycleway and tags.segregated == 'yes' ? 1 : 0 }, 'style:cycleway': { fill: false, width: cycleway and tags.segregated == 'yes' ? 2 : 3, color: const.categories.cycleway.color, dashArray: cycleway and tags.segregated != 'yes' ? '8,8' : '', dashOffset: 8, lineCap: cycleway and tags.segregated != 'yes' ? 'butt' : 'round', offset: cycleway and tags.segregated == 'yes' ? -1 : 0 }, 'style:left': { width: 3, offset: -6, color: const.categories.sidewalk.color }, 'style:right': { width: 3, offset: 6, color: const.categories.sidewalk.color }, 'style:leftr': { width: sidewalk_left ? 5 : 0, offset: -2.5, opacity: 0.3, dashArray: '1,10', lineCap: butt, color: sidewalk_left in ['no', 'none'] ? '#000000' : const.categories.sidewalk.color }, 'style:rightr': { width: sidewalk_right ? 5 : 0, offset: 2.5, opacity: 0.3, dashArray: '1,10', lineCap: butt, color: sidewalk_left in ['no', 'none'] ? '#000000' : const.categories.sidewalk.color }, }) }} {% endif %} style: opacity: 0 fillOpacity: 0 width: 5 style:node: width: 0 radius: 5 fillOpacity: 1 fill: true color: | {{ const.categories[category].color }} style:main: fill: | {% if tags.area == 'yes' or attribute(tags, 'area:highway') %}true{% else %}false{% endif %} width: | {% if attribute(tags, 'area:highway') %} 0 {% elseif tags.area == 'yes' %} 1 {% elseif cycleway and tags.segregated == 'yes' %} 3 {% else %} {{ const.categories[category].width|default(3) }} {% endif %} color: | {{ const.categories[category].color }} dashArray: | {% if tags.highway == 'steps' %} 3,3 {% elseif cycleway and tags.segregated != 'yes' %} 8,8 {% endif %} lineCap: | {% if tags.highway == 'steps' or (cycleway and tags.segregated != 'yes') %}butt{% else %}round{% endif %} offset: | {% if cycleway and tags.segregated == 'yes' %}1.5{% else %}0{% endif %} style:cycleway: fill: false width: 3 color: | {{ const.categories.cycleway.color }} dashArray: | {% if cycleway and tags.segregated != 'yes' %} 8,8 {% endif %} dashOffset: 8 lineCap: | {% if cycleway and tags.segregated != 'yes' %}butt{% else %}round{% endif %} offset: | {% if cycleway and tags.segregated == 'yes' %}-1.5{% else %}0{% endif %} style:left: fill: false width: 3 offset: | {{ -5 / map.metersPerPixel }} color: | {{ const.categories.sidewalk.color }} style:right: fill: false width: 3 offset: | {{ 5 / map.metersPerPixel }} color: | {{ const.categories.sidewalk.color }} style:leftr: fill: false width: | {{ sidewalk_left ? 5 / map.metersPerPixel : 0 }} offset: | {{ -2.5 / map.metersPerPixel }} opacity: 0.3 dashArray: '1,10' lineCap: butt color: | {{ sidewalk_left in ['no', 'none'] ? '#000000' : const.categories.sidewalk.color }} style:rightr: fill: false width: | {{ sidewalk_right ? 5 / map.metersPerPixel : 0 }} offset: | {{ 2.5 / map.metersPerPixel }} opacity: 0.3 dashArray: '1,10' lineCap: butt color: | {{ sidewalk_right in ['no', 'none'] ? '#000000' : const.categories.sidewalk.color }} styles: | {{ sides|join(',') }} info: | {% for k, d in const.categories if k != 'cycleway' %} {% endfor %} {% for k, d in const.sidewalks %} {% endfor %}
{{ markerLine({ width: d.width|default(3), color: d.color, dashArray: d.dashArray }) }} {{ tagTrans(d.key|default('highway'), k) }}
{{ markerPolygon({ styles: 'default', style: { width: 1, color: const.categories.footway.color, fillColor: const.categories.footway.color } }) }} {{ tagTrans('highway', 'footway') }} ({{ keyTrans('area') }})
{{ tagTrans('highway', 'footway') }} ({{ keyTrans('area:highway') }})
{{ markerCircle({ width: 0, radius: 5, fillOpacity: 1, fill: true, color: const.categories.crossing.color }) }} {{ tagTrans('highway', 'crossing') }}
{{ markerLine({ styles: 'default,foot', style: { width: 4, color: const.categories.cycleway.color, dashArray: '8,8' }, 'style:foot': { width: 4, color: const.categories.footway.color, dashArray: '8,8', dashOffset: 8 } }) }} {{ tagTrans('highway', 'cycleway segregated=no') }}
{{ markerLine({ styles: 'default,foot', style: { width: 3, color: const.categories.cycleway.color, offset: -1.5 }, 'style:foot': { width: 3, color: const.categories.footway.color, offset: 1.5 } }) }} {{ tagTrans('highway', 'cycleway segregated=yes') }}
{{ markerLine({ styles: d.styles, 'style:leftr': { width: 9, offset: -1, opacity: 0.3, dashArray: '1,10', lineCap: butt, color: d.color }, 'style:left': { width: 3, offset: -7, color: d.color } }) }} {{ tagTrans('sidewalk', k) }}
filter: access: name: '{{ keyTrans("access") }}' type: select placeholder: '<{{ trans("any value") }}>' valueName: '{{ tagTrans("access", value) }}' values: 'yes': {} private: {} permissive: {} customers: {} discouraged: {} '!': name: <{{ trans('empty value') }}> query: nwr[!access] weight: -3 '?': name: <{{ trans("other") }}> query: nwr[access]["access"!~"^(public|private|permissive|customers|discouraged|unknown|yes)$"] weight: -2 unknown: name: '<{{ trans("unknown") }}>' query: nwr["access"="unknown"] weight: -1 surface: name: '{{ keyTrans("surface") }}' type: select placeholder: '<{{ trans("any value") }}>' valueName: '{{ tagTrans("surface", value) }}' query: | {% if value == 'all_paved' %} {% set value = "(paved|asphalt|chipseal|concrete|concrete:lanes|concrete:plates|paving_stones|sett|unhewn_cobblestone|cobblestone|metal|wood|rubber)" %} {% elseif value == 'all_unpaved' %} {% set value = "(unpaved|compacted|fine_gravel|gravel|rock|pebblestone|ground|dirt|earth|grass|grass_paver|mud|sand|woodchips|snow|ice|salt|clay)" %} {% endif %} ( nwr[!sidewalk][!"sidewalk:both"][!"sidewalk:right"][!"sidewalk:left"][surface~"^{{ value }}$"]; nwr[~"sidewalk(:left|:right|:both|):surface"~"^{{ value }}$"]; ) values: all_paved: name: "<{{ tagTrans('surface', 'paved') }}>" weight: -1 all_unpaved: name: "<{{ tagTrans('surface', 'unpaved') }}>" weight: -1 acrylic: {} artificial_turf: {} asphalt: {} carpet: {} chipseal: {} clay: {} cobblestone: {} compacted: {} concrete: {} concrete:lanes: {} concrete:plates: {} dirt: {} earth: {} fine_gravel: {} grass: {} grass_paver: {} gravel: {} ground: {} ice: {} metal: {} metal_grid: {} mud: {} paved: {} paving_stones: {} pebblestone: {} rock: {} rubber: {} salt: {} sand: {} sett: {} snow: {} stepping_stones: {} tartan: {} unhewn_cobblestone: {} unpaved: {} wood: {} woodchips: {} '!': name: <{{ trans('empty value') }}> query: | ( nwr[!sidewalk][!"sidewalk:both"][!"sidewalk:right"][!"sidewalk:left"][!"surface"]; nwr["sidewalk:left"="yes"][!"sidewalk:left:surface"]; nwr["sidewalk:right"="yes"][!"sidewalk:right:surface"]; nwr["sidewalk:both"="yes"][!"sidewalk:both:surface"][!"sidewalk:surface"][!"sidewalk:left:surface"]; nwr["sidewalk:both"="yes"][!"sidewalk:both:surface"][!"sidewalk:surface"][!"sidewalk:right:surface"]; nwr["sidewalk"="left"][!"sidewalk:left:surface"]; nwr["sidewalk"="right"][!"sidewalk:right:surface"]; nwr["sidewalk"="both"][!"sidewalk:both:surface"][!"sidewalk:surface"][!"sidewalk:left:surface"]; nwr["sidewalk"="both"][!"sidewalk:both:surface"][!"sidewalk:surface"][!"sidewalk:right:surface"]; ) weight: -4 '?': name: <{{ trans("other") }}> query: nwr[surface]["surface"!~"^(acrylic|artificial_turf|asphalt|carpet|chipseal|clay|cobblestone|compacted|concrete|concrete:lanes|concrete:plates|dirt|earth|fine_gravel|grass|grass_paver|gravel|ground|ice|metal|metal_grid|mud|paved|paving_stones|pebblestone|rock|rubber|salt|sand|sett|snow|stepping_stones|tartan|unhewn_cobblestone|unpaved|wood|woodchips)$"] weight: -3 unknown: name: '<{{ trans("unknown") }}>' weight: -2 smoothness: name: '{{ keyTrans("smoothness") }}' type: select placeholder: '<{{ trans("any value") }}>' valueName: '{{ tagTrans("smoothness", value) }}' query: '(nwr[smoothness="{{ value }}"];nwr[~"sidewalk:(left|right|both):smoothness"~"{{ value }}"];)' values: bad: {} excellent: {} good: {} horrible: {} impassable: {} intermediate: {} very_bad: {} very_horrible: {} '!': name: <{{ trans('empty value') }}> query: | ( nwr[!"smoothness"]; nwr["sidewalk:left"="yes"][!"sidewalk:left:smoothness"]; nwr["sidewalk:right"="yes"][!"sidewalk:right:smoothness"]; nwr["sidewalk:both"="yes"][!"sidewalk:both:smoothness"][!"sidewalk:smoothness"][!"sidewalk:left:smoothness"]; nwr["sidewalk:both"="yes"][!"sidewalk:both:smoothness"][!"sidewalk:smoothness"][!"sidewalk:right:smoothness"]; nwr["sidewalk"="left"][!"sidewalk:left:smoothness"]; nwr["sidewalk"="right"][!"sidewalk:right:smoothness"]; nwr["sidewalk"="both"][!"sidewalk:both:smoothness"][!"sidewalk:smoothness"][!"sidewalk:left:smoothness"]; nwr["sidewalk"="both"][!"sidewalk:both:smoothness"][!"sidewalk:smoothness"][!"sidewalk:right:smoothness"]; ) weight: -3 '?': name: <{{ trans("other") }}> query: nwr[smoothness]["smoothness"!~"^(bad|excellent|good|horrible|impassable|intermediate|very_bad|very_horrible)$"] weight: -2 unknown: name: '<{{ trans("unknown") }}>' weight: -1 const: categories: sidewalk: color: '#ff007f' key: footway pedestrian: color: '#ff00c8' width: 5 footway: color: '#ab00ff' path: color: '#ee922d' steps: color: '#ab00ff' dashArray: '3,3' crossing: color: '#964e00' cycleway: color: '#002aff' platform: key: railway color: '#00ff00' sidewalks: 'yes': color: '#ff007f' styles: 'leftr,left' 'separate': color: '#ff007f' styles: 'leftr' 'no': color: '#000000' styles: 'leftr'