Skip to content

Commit

Permalink
Fix #23770: Deprecate cycleway=opposite* family (patch by Famlam)
Browse files Browse the repository at this point in the history
The `cycleway=opposite*` family was deprecated in
osmwiki:Proposal:Deprecate_cycleway=opposite_family on 2024-06-22.

This removes the `opposite*` values from the `cycleway` tags in defaultpresets.xml
and adds a deprecation warning for them.

git-svn-id: https://josm.openstreetmap.de/svn/trunk@19212 0c6e7542-c601-0410-84e7-c038aed88b3b
  • Loading branch information
taylor.smock committed Sep 6, 2024
1 parent 7eabe1d commit 2002127
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion resources/data/defaultpresets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@
<item name="Cycle Lane/Track" icon="presets/transport/way/cycle_lane_track.svg" type="way,closedway" preset_name_label="true">
<link wiki="Bicycle" />
<space />
<combo key="cycleway" text="Cycleway" values_context="cycleway" values="lane,track,opposite_lane,opposite_track,opposite,share_busway,shared_lane,separate" match="key" />
<combo key="cycleway" text="Cycleway" values_context="cycleway" values="lane,track,share_busway,shared_lane,separate" match="key" />
<combo key="cycleway:left" text="Cycleway left" values_context="cycleway" values="lane,track,share_busway,shared_lane,separate" match="key" />
<combo key="cycleway:right" text="Cycleway right" values_context="cycleway" values="lane,track,share_busway,shared_lane,separate" match="key" />
<check key="oneway:bicycle" text="Oneway (bicycle)" />
Expand Down
27 changes: 27 additions & 0 deletions resources/data/validator/deprecated.mapcss
Original file line number Diff line number Diff line change
Expand Up @@ -2551,4 +2551,31 @@ area[parking:orientation][orientation]["parking:orientation"!=*orientation] {
suggestAlternative: "natural=tundra or natural=fell";
}

way[cycleway=opposite],
way[cycleway:left=opposite],
way[cycleway:right=opposite],
way[cycleway:both=opposite] {
throwWarning: tr("{0} is deprecated", "{0.tag}");
group: tr("deprecated tagging");
fixAdd: "oneway:bicycle=no";
fixRemove: "{0.key}";
/* No automated addition of e.g. cycleway:both=no for cycleway=opposite as it may already be tagged with e.g. cycleway:left=lane */
}
way[cycleway:left][cycleway:left^=opposite_],
way[cycleway:right][cycleway:right^=opposite_] {
throwWarning: tr("{0} is deprecated", "{0.tag}");
group: tr("deprecated tagging");
/* No fix: unambiguous definition */
}
way[cycleway][cycleway^=opposite_]:righthandtraffic {
throwWarning: tr("{0} is deprecated", "{0.tag}");
group: tr("deprecated tagging");
suggestAlternative: "oneway:bicycle=no + cycleway:right=* + cycleway:left=* + cycleway:left:oneway=-1";
}
way[cycleway][cycleway^=opposite_]!:righthandtraffic {
throwWarning: tr("{0} is deprecated", "{0.tag}");
group: tr("deprecated tagging");
suggestAlternative: "oneway:bicycle=no + cycleway:right=* + cycleway:left=* + cycleway:right:oneway=-1";
}

/* When tags are deprecated they should be added to ignoretags.cfg too. */
3 changes: 3 additions & 0 deletions resources/data/validator/ignoretags.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ K:site=wind_farm
K:site=mall
K:landform=dune_system
K:noaddress=yes
K:cycleway=opposite
K:cycleway=opposite_lane
K:cycleway=opposite_track
;
; Highway Key/Value Pairs
;
Expand Down

0 comments on commit 2002127

Please sign in to comment.