JOSM: Reverse oneway direction [RESOLVED]

Maybe it’s a bug, maybe not.

Map 2 ways (for ease of demo) and tag them as oneway=yes. When selected I’ve set it to show an arrow at the head of the way (right one) and when not selected it shows the little triangles in the same direction (left one).

Select both ways and hit R to reverse the direction: A little panel appears

image

The panels asks to make a change “to maintain data consistency” where oneway=-1 reminds me of old ID editor warnings of oneway=-1 being passé, it should always be yes (IIRC).

When following the panel’s suggestion and hit Apply selected changes, the ways are reversed as far as drawing direction is concerned, but the little oneway triangles continue to point southbound and oneway=-1 is tagged.

When hitting the Do not apply changes or de-select the little Apply? boxes, the drawing direction is reversed, oneway=yes stays as what it was before and all is fine, oneway’s point northbound.

Why I’m asking is today was surveying a whole quartier and all was oneway, except it was not tagged, added the oneways, then started to hit the reverse where needed and was left with the little triangles pointing the wrong way in many a case, then turning to the method of first setting the drawing direction right, then adding the oneway=yes or manually changing the -1 values back to yes and wondering why this -1 even still exists.

oneway=-1 is the opposite of oneway=yes, regarding the direction of travel. Imagine oneway=yes is the same as oneway=+1. So it’s not a bug. JOSM is just asking you to reverse the geometric line direction, but keeping the former direction of travel.

Since you want to change the travel direction as well, you shouldn’t apply the changes or first reverse the geometry and then add the oneway tag.

3 Likes

Not understood a word, not being native english. Once upon a time someone drew a street, southbound, did not mark it oneway i.e. OSM assumes two-way. Then comes along moi and finds the road is oneway but in the opposite direction of what it was drawn as. One way or the other, after just adding oneway=yes the little triangles point the same way as the direction the street was drawn in, southbound in the example when in actuality the oneway is northbound, so that needs to be reversed. As the panel functions, one needs to do the ‘do not apply changes’ i,e. reverse the direction but leave the oneway=yes tag alone to get the correct ‘direction of travel’ as you put it, best exemplified at a roundabout flare consisting of an off and an on way, no oneway is given the -1 value, not seen it and as noted ID gave a warning on streets with this value suggesting how to fix it.

Edit: To emphasize, when a street is selected, there’s no telling if the oneway=yes or oneway=-1 is correct as one only sees the drawing direction.

At the start you have a way going south with southbound oneway traffic (oneway=yes). You R reverse the way. JOSM asks if you want to change the tag on the way so that it is still oneway going south even though you reversed the way. If you select “apply the selected changes” the new tag will be oneway=-1 which keeps the traffic direction set to go south even though the way now goes north. If you select “do not apply changes” (or un-select the :white_check_mark: under “Apply?”) the tag will be left as oneway=yes which means that the traffic now goes north in the direction of the way.

1 Like

Agreed: distilling the good juice from InsertUser’s reply is to note that “Do not apply changes” is the correct solution when this panel pops up (and you wish for your “R” to really mean “yeah, do the reversal, but WHILE KEEPING the oneway=yes tag instead of changing it to a oneway=-1 tag.”

I know, it’s confusing, I’ve had to both read it, read it about it and do it several times before it makes sense, but once you do it’s like learning to ride a bike; you got this.

Quoting from the oneway wiki, the suggested work sequence is to (if needed) to first set the drawing direction to the way of travel, then add the oneway=yes and as concluded to take the ‘do not’ in case the oneway=yes was already set.

If the oneway restriction is in the opposite direction to the drawn way, the fix in most cases is to turn the way around (“reverse way” tool in the map editors) and apply oneway=yes. If in a (very) rare case, the direction of the way cannot be changed, you can instead tag it as oneway=-1.

Thanks for all replies.