openstreetmap / iD

🆔 The easy-to-use OpenStreetMap editor in JavaScript.
https://www.openstreetmap.org/edit?editor=id
ISC License
3.37k stars 1.21k forks source link

Unable to correctly invert conditional one-way roads #9955

Open LaoshuBaby opened 1 year ago

LaoshuBaby commented 1 year ago

Description

When invert a one-way road with the oneway=reversible tag, iD only replaced backward and forward and did not reverse the one-way conditions correctly (because yes and -1 are relative to the way path direction)

oneway=reversible oneway:conditional=yes @ 05:00-13:30; -1 @ 13:30-5:00

Example:

https://www.openstreetmap.org/way/1186049066 (Version 4 is the reversal of iD)

Screenshots

图片 图片

k-yle commented 1 year ago

I think this is intentional, oneway[:*] tags are not modified:

https://github.com/openstreetmap/iD/blob/c4d1390270291c12bb31af6f8276f9b2f6c9696e/modules/actions/reverse.js#L2-L4

pnorman commented 1 year ago

It's intentional, but I'm not sure the current logic holds up when you start adding in lots of other directional stuff. It's not obvious what should be switched, and what shouldn't.