Browse Source

Lanes: accept 'lanes:forward' and 'lanes:backward' without 'lanes' tag

name-etym
parent
commit
820a853113
  1. 4
      lanes.json

4
lanes.json

@ -7,6 +7,8 @@
"17": [ "17": [
"(", "(",
"way[lanes];", "way[lanes];",
"way['lanes:forward'];",
"way['lanes:backward'];",
"way['parking:lane:left'];", "way['parking:lane:left'];",
"way['parking:lane:right'];", "way['parking:lane:right'];",
"way['parking:lane:both'];", "way['parking:lane:both'];",
@ -26,7 +28,7 @@
"{% set cycletrack_right = attribute(tags, 'cycleway:right') == 'track' ? 2 : ('track' in tags.cycleway|split(';') ? 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_left = tags.sidewalk in ['both', 'left'] ? 2 : 0 %}",
"{% set sidewalk_right = tags.sidewalk in ['both', 'right'] ? 2 : 0 %}", "{% set sidewalk_right = tags.sidewalk in ['both', 'right'] ? 2 : 0 %}",
"{% set lanes = tags.lanes|default(oneway ? 1 : 2) %}",
"{% 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 lanes_width = lanes * 3 %}",
"{% set forward_lanes = attribute(tags, 'lanes:forward')|default(oneway ? lanes : lanes // 2) %}", "{% set forward_lanes = attribute(tags, 'lanes:forward')|default(oneway ? lanes : lanes // 2) %}",
"{% set backward_lanes = attribute(tags, 'lanes:backward')|default(oneway ? 0 : lanes // 2) %}" "{% set backward_lanes = attribute(tags, 'lanes:backward')|default(oneway ? 0 : lanes // 2) %}"

Loading…
Cancel
Save