{ "type": "overpass", "name": { "en": "Lanes" }, "query": { "17": [ "(", "way[lanes];", "way['lanes:forward'];", "way['lanes:backward'];", "way['parking:lane:left'];", "way['parking:lane:right'];", "way['parking:lane:both'];", ")" ] }, "feature": { "pre": [ "{% set oneway = tags.oneway in ['yes','1'] %}", "{% set parking_left_type = attribute(tags, 'parking:lane:left')|default(attribute(tags, 'parking:lane:both')) %}", "{% set parking_left = parking_left_type ? const.parking[parking_left_type]|default(const.parking.other) : const.parking.no %}", "{% set parking_right_type = attribute(tags, 'parking:lane:right')|default(attribute(tags, 'parking:lane:both')) %}", "{% set parking_right = parking_right_type ? const.parking[parking_right_type]|default(const.parking.other) : const.parking.no %}", "{% set cyclelane_left = attribute(tags, 'cycleway:left') == 'lane' ? 2 : ('opposite_lane' in tags.cycleway|split(';') ? 2 : (('lane' in tags.cycleway|split(';')) and not oneway ? 2 : 0)) %}", "{% set cyclelane_right = attribute(tags, 'cycleway:right') == 'lane' ? 2 : ('lane' in tags.cycleway|split(';') ? 2 : 0) %}", "{% set cycletrack_left = attribute(tags, 'cycleway:left') == 'track' ? 2 : ('opposite_track' in tags.cycleway|split(';') ? 2 : (('track' in tags.cycleway|split(';')) and not oneway ? 2 : 0)) %}", "{% set cycletrack_right = attribute(tags, 'cycleway:right') == 'track' ? 2 : ('track' in tags.cycleway|split(';') ? 2 : 0) %}", "{% set sidewalk_left = tags.sidewalk in ['both', 'left'] ? 2 : 0 %}", "{% set sidewalk_right = tags.sidewalk in ['both', 'right'] ? 2 : 0 %}", "{% set lanes = tags.lanes|default(attribute(tags, 'lanes:forward')|default(0) + attribute(tags, 'lanes:backward')|default(0))|default(tags.oneway ? 1 : 2) %}", "{% set lanes_width = lanes * 3 %}", "{% set forward_lanes = attribute(tags, 'lanes:forward')|default(oneway ? lanes : lanes // 2) %}", "{% set backward_lanes = attribute(tags, 'lanes:backward')|default(oneway ? 0 : lanes // 2) %}", "{% if attribute(tags, 'turn:lanes:backward') %}", " {% set turn_lanes_backward = attribute(tags, 'turn:lanes:backward')|split('|')|reverse %}", "{% else %}", " {% set turn_lanes_backward = ['through','through','through','through','through','through','through','through','through','through','through','through']|slice(0, backward_lanes) %}", "{% endif %}", "{% if attribute(tags, 'turn:lanes:forward') or attribute(tags, 'turn:lanes') %}", " {% set turn_lanes_forward = attribute(tags, 'turn:lanes:forward')|default(attribute(tags, 'turn:lanes'))|split('|') %}", "{% else %}", " {% set turn_lanes_forward = ['through','through','through','through','through','through','through','through','through','through','through','through']|slice(0, forward_lanes) %}", "{% endif %}", "{% set turn_lanes = turn_lanes_backward|merge(turn_lanes_forward) %}" ], "description": "{{ keyTrans('lanes') }}: {% if tags.lanes %}{{ tags.lanes }}{% else %}{{ lanes }}?{% endif %} {% if attribute(tags, 'lanes:forward') or attribute(tags, 'lanes:backward') %}(↑{{ forward_lanes }} ↓{{ backward_lanes }}){% endif %}", "body": [ "
{{ markerLine({'styles':'left,right,mark', 'style:left': { 'width': 3, 'color': 'grey', 'offset': -1.5 },'style:right': { 'width': 3, 'color': 'grey', 'offset': 1.5 },'style:mark': { 'width': 1, 'color': 'white'} })|raw }} | ", "{{ keyTrans('lanes') }} | ", "
{{ markerLine({'styles':'left,right,mark', 'style:left': { 'width': 3, 'color': 'grey', 'offset': -1.5 },'style:right': { 'width': 3, 'color': 'grey', 'offset': 1.5 },'style:mark': { 'width': 1, 'color': 'white', 'dashArray': '5,5'} })|raw }} | ", "{{ keyTrans('lanes') }} | ", "
{{ markerLine({ 'width': 5, 'color': 'orange' })|raw }} | ", "{{ keyTrans('parking:lane') }} | ", "
{{ markerLine({ 'styles':'lane,mark', 'style:lane': { 'width': 5, 'color': 'orange' }, 'style:mark': { 'width': 5, 'color': const.parking.parallel.dashColor, 'dashArray': '1,10' } })|raw }} | ", "{{ keyTrans('parking:lane') }}: {{ tagTrans('parking:lane', 'parallel') }} | ", "
{{ markerLine({ 'styles':'lane,mark1,mark2', 'style:lane': { 'width': 5, 'color': 'orange' }, 'style:mark1': { 'width': 2.5, 'color': const.parking.diagonal.dashColor, 'dashArray': '1,7', 'offset': 1.25 }, 'style:mark2': { 'width': 2.5, 'color': const.parking.diagonal.dashColor, 'dashArray': '1,7', 'dashOffset': '2', 'offset': -1.25 } })|raw }} | ", "{{ keyTrans('parking:lane') }}: {{ tagTrans('parking:lane', 'diagonal') }} | ", "
{{ markerLine({ 'styles':'lane,mark', 'style:lane': { 'width': 5, 'color': 'orange' }, 'style:mark': { 'width': 5, 'color': const.parking.perpendicular.dashColor, 'dashArray': '1,6' } })|raw }} | ", "{{ keyTrans('parking:lane') }}: {{ tagTrans('parking:lane', 'perpendicular') }} | ", "
{{ markerLine({ 'width': 5, 'color': '#af3f3f' })|raw }} | ", "{{ tagTrans('cycleway', 'lane') }} | ", "
{{ markerLine({ 'width': 5, 'color': '#bf5f3f' })|raw }} | ", "{{ tagTrans('cycleway', 'track') }} | ", "
{{ markerLine({ 'width': 5, 'color': '#4f4fbf' })|raw }} | ", "{{ keyTrans('sidewalk') }} | ", "