#23770 closed enhancement (fixed)
[Patch] Deprecate `cycleway=opposite*` family
Reported by: | Famlam | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 24.09 |
Component: | Internal preset | Version: | tested |
Keywords: | template_report cycleway opposite | Cc: | gaben |
Description (last modified by )
What steps will reproduce the problem?
- The proposal to deprecate the `cycleway=opposite` family has been accepted unanimously
What is the expected result?
- Remove
opposite_lane,opposite_track,opposite
from the defaultpresets - Add validation rules to convert the existing cycleway tags. For instance:
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 this or 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
Attachments (1)
Change History (15)
comment:1 by , 10 months ago
Description: | modified (diff) |
---|
comment:2 by , 10 months ago
Cc: | added |
---|---|
Type: | defect → enhancement |
Yay, finally some cleanup!
Is anyone interested to create a patch? We could have it in the next stable release :)
by , 10 months ago
Attachment: | josm_23770.patch added |
---|
comment:4 by , 9 months ago
Summary: | Deprecate `cycleway=opposite*` family → [Patch] Deprecate `cycleway=opposite*` family |
---|
I've linked this issue in the deprecation table at Tag:cycleway%3Dopposite#Tools
comment:5 by , 9 months ago
The tagging
cycleway=opposite_lane highway=residential oneway=yes
after applying the autofix, becomes
cycleway:left:oneway=-1 cycleway:left=lane cycleway:right=no highway=residential oneway:bicycle=no oneway=yes
Isn't
cycleway:left=lane highway=residential oneway:bicycle=no oneway=yes
enough?
comment:6 by , 9 months ago
Hi gaben,
I used what the proposal prescribed as the best new tagging, but yes, I would be equally happy without these tags and leave it to the user to decide to add them or not. (Personally I also never tag those extra tags)
So removing the following lines from the patch would be perfectly fine with me:
fixAdd: concat("cycleway:right=", any(tag("cycleway:right"), "no"));
fixAdd: "cycleway:left:oneway=-1";
fixAdd: concat("cycleway:left=", any(tag("cycleway:left"), "no"));
fixAdd: "cycleway:right:oneway=-1";
(I'm not sure if the .patch file will still work if I simply remove those lines there, hence I listed it like this to avoid the risk of having a broken file)
comment:7 by , 9 months ago
I think dropping the fixAdd
/fixRemove
stanzas for opposite_lane
and opposite_track
; I think suggestAlternative
would be better (something like suggestAlternative: "oneway:bicycle=no + cycleway:left=* + cycleway:right=* + cycleway:right:oneway=-1
).
Anyway, let me know when the patch is ready to apply.
comment:8 by , 9 months ago
I think dropping the fixAdd/fixRemove stanzas for opposite_lane and opposite_track
@taylor, any particular reason for this? How about both?
(And would you agree with @gaben that cycleway:[regular_driving_side]=no
and cycleway:[other_driving_side]:oneway=-1
are unnecessary?)
(Note that suggestAlternative doesn't support things like concat("cycleway:right=", replace("{0.value}", "opposite_", ""))
so the message would literally have to say =*
, rather than =lane
or so. Future request already exists as #23206 :) )
comment:9 by , 9 months ago
Mostly I'm worried that the autofix won't be correct often enough for it to be worthwhile adding. I haven't done an in-depth investigation into it, which is why I'm semi-concerned about it.
I don't think that the cycleway:[regular_driving_side]=no
and cycleway:[other_driving_side]:oneway=-1
tags are something we want to auto-add. The former may be wrong (as in, can bicycles occasionally go both directions on a oneway=yes
road?). For the latter, this may also be wrong for much the same reason. I'd much rather have users manually look at the tagging and on-the-ground situation when fixing these issues.
comment:10 by , 9 months ago
Sounds good to me, I made a new patch here https://github.com/JOSM/josm/pull/140
comment:11 by , 8 months ago
@taylor and @gaben,
Just to check: is the updated patch ok or should I make other modifications?
https://github.com/JOSM/josm/pull/140
comment:13 by , 8 months ago
Milestone: | → 24.09 |
---|
add one more ticket link