﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
23770	[Patch] Deprecate `cycleway=opposite*` family	Famlam	team	"==== What steps will reproduce the problem?
1. The [https://wiki.openstreetmap.org/wiki/Proposal:Deprecate_cycleway%3Dopposite_family#Voting proposal to deprecate the `cycleway=opposite` family ] has been accepted unanimously 

==== What is the expected result?
1. Remove `opposite_lane,opposite_track,opposite` from the [https://github.com/JOSM/josm/blob/master/resources/data/defaultpresets.xml#L1301C96-L1301C133 defaultpresets]
2. Add validation rules to convert the existing cycleway tags. For instance:
{{{#!mapcss
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"");
  fixAdd: ""oneway:bicycle=no"";
  fixAdd: concat(""cycleway:right="", any(tag(""cycleway:right""), ""no""));
  fixAdd: concat(""cycleway:left="", replace(""{0.value}"", ""opposite_"", """"));
  fixAdd: ""cycleway:left:oneway=-1"";
  fixRemove: ""{0.key}"";
}
way[cycleway][cycleway^=opposite_]!:righthandtraffic {
  throwWarning: tr(""{0} is deprecated"", ""{0.tag}"");
  group: tr(""deprecated tagging"");
  fixAdd: ""oneway:bicycle=no"";
  fixAdd: concat(""cycleway:left="", any(tag(""cycleway:left""), ""no""));
  fixAdd: concat(""cycleway:right="", replace(""{0.value}"", ""opposite_"", """"));
  fixAdd: ""cycleway:right:oneway=-1"";
  fixRemove: ""{0.key}"";
}
}}}
Note that with the last two rules I have made the assumption that there are no two-way cycleways tagged with `opposite_*`. Also I didn't check for conflicting values like [https://www.openstreetmap.org/way/431981313 this] or [https://www.openstreetmap.org/way/41614806 this]. I hope users of the autofix will check for such cases.

==== Please provide any additional information below. Attach a screenshot if possible.

{{{
Revision:19096
Build-Date:2024-06-04 11:22:39

Identification: JOSM/1.5 (19096 nl) Windows 10 64-Bit
OS Build number: Windows 10 Home 22H2 (19045)
Memory Usage: 424 MB / 2012 MB (169 MB allocated, but free)
Java version: 21.0.3+9-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.10×1.10)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: Cp1252
Locale info: nl_NL
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.19096, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe]
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (36258)
+ imagery_offset_db (36226)
+ measurement (36256)
+ pbf (36176)
+ pt_assistant (637)
+ reverter (36256)
+ tageditor (36258)
+ turnlanes-tagging (0.0.5)
+ undelete (36226)
+ utilsplugin2 (36241)

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/Potlatch2&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1
+ %UserProfile%\Documents\tijdelijke bestanden\josm-eigen.mappaint.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/Sidewalks&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&zip=1

Validator rules:
+ %UserProfile%\Documents\tijdelijke bestanden\josm-eigen.validator.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Rules/SuspiciousSwimming_Pool&zip=1
+ https://raw.githubusercontent.com/osm-fr/osmose-backend/master/plugins/TagFix_Destination.validator.mapcss
+ https://raw.githubusercontent.com/osm-fr/osmose-backend/master/plugins/Colour.validator.mapcss
+ https://raw.githubusercontent.com/osm-fr/osmose-backend/master/plugins/notprefix.validator.mapcss
+ https://raw.githubusercontent.com/osm-fr/osmose-backend/master/plugins/TagFix_MultipleTag2.validator.mapcss
+ https://raw.githubusercontent.com/Famlam/OsmMapcssValidationNL/main/netherlands.validator.mapcss

Last errors/warnings:
- 00001.004 W: extended font config - overriding 'filename.Malgun_Gothic=malgun.ttf' with 'MALGUN.TTF'
- 00001.007 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00001.008 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00001.987 E: java.security.KeyStoreException: Windows-ROOT not found. Oorzaak: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available
}}}

See also #9296, #17488, #20468"	enhancement	closed	normal	24.09	Internal preset	tested	fixed	template_report cycleway opposite	gaben
