Possible bug: Inconsistency b/w JOSM 2561 and Potlatch 1.3e

Consider these ways:


They appear correctly when viewed within JOSM but the directionality of the ways are reversed in Potlatch. User error?

No, it is simply how to interpretate the arrows.

JOSM shows the arrows always in OSM direction, as soon as oneway=* is set.

OSM direction means the internal ordering of the nodes that the way is consisting of.

Mapnik and Potlatch show the “traffic flow” direction, and that is reversed to
the OSM direction when using oneway=-1.

Why the Tiger import data is using oneway=-1 so often is another question.


Is it possible that JOSM didn’t support reversing a way back in the early days?

Chris, I’m skeptical – the arrows in JOSM appear to indicate the direction of traffic when oneway = yes. Hitting R to reverse the direction of the way causes the arrows to change direction.

The tiger data didn’t import oneway for these ways – I set oneway = yes within JOSM. Did you take a look at these ways in JOSM?

Okay, so I just reversed the direction of the way from within Potlatch and that also reversed it within JOSM. This has to be a bug. If not by inspecting the arrow directions, how can a user determine the direction of oneway roads from within JOSM?

Please take a look at this image showing the inconsistency:

Only if you assume, that “reversing the direction of the way from within Potlatch” just changes the direction of the traffic flow and that’s wrong. It changes the sequence of points and that “sequence of points” is shown using arrows in JOSM.

So I don’t see any bug here.

If you just want to change the direction of the traffic flow, you have to replace oneway=-1 by oneway=yes (or the other way round).

By inspecting the oneway tag.
If it is “yes”, then the traffic flow is in the direction of the way as it is stored in OSM and shown by JOSM, if oneway=-1, the traffic flows against the direction of the way as it is stored in OSM and shown by JOSM.

Also take in mind that when you have JOSM set to only show arrows on ‘interesting’ ways, it will show them when the oneway key is present, regardless of it’s content.

The arrows in JOSM denote the internal ordering of the nodes in the way, while in Potlatch they denote the actual direction of traffic flow as indicated by the oneway key. Also, as you might have noticed, the traffic direction arrows in the mapnik map are also pointing the wrong way.

While oneway=-1 is an accepted way to tag traffic flow going against the internal way direction, the commonly used method is to point the way with the direction of traffic and tag it oneway=yes. You can fix both cases (JOSM + mapnik map) by reversing the way in JOSM and changing oneway=-1 to oneway=yes (if JOSM didn’t do that automatically already). In my opinion, oneway=-1 should be reserved for only very exceptional cases, where the way direction has to go against traffic flow. Can’t think of such a situation, offhand.

Maybe this has changed in the newer versions of JOSM. I am using an “old” tested version (2561).

So, when you change oneway=yes to oneway=-1 the arrows changes the direction?


Thanks Chris – I found the bit that’s confusing me. Steps to recreate below:

  1. Within JOSM, select a way and note its direction. For my purposes, I’ll assume a way that travels South to North.
  2. Add the oneway=yes tag. In JOSM’s default config, this causes arrows to be displayed on the way even when the way is not selected.
  3. Assuming that the direction of traffic flow on our test way is North to South, it’s necessary to reverse the flow of traffic.
  4. Clicking on Tools | Reverse Ways both changes the internal ordering of the nodes of the way and switches oneway=yes to oneway=-1 and vice-versa. That is, the Reverse Ways command notices and modifies the oneway tag and goes out of its way to NOT CHANGE THE DIRECTION OF TRAFFIC.

There are two simultaneous issues with the JOSM UI here:

  1. Arrows on a oneway road (that only appear once the oneway tag is added) are incorrectly interpreted by a user to indicate the directionality of traffic.
  2. The Reverse Way command was incorrectly interpreted to reverse both the internal ordering of the nodes and the flow of traffic when only the directionality of the nodes were modified. Since the dialog box that pops up indicates that oneway=yes is being changed to oneway=-1 and the directions of arrows were modified I think this is understandable.

With regards to issue #2: That’s the intended behaviour of the Reverse Way command. This is so that someone intent on reversing a way (for some other reason) will not inadvertently change the actual direction of traffic indicated by oneway. You have to consciously change the oneway tag if you really want to change the direction of traffic.

Makes sense, in retrospect – I just had the perfect storm of misunderstandings going for me.

I’ve used JOSM for a long time and never understood JOSM’s usage of oneway and -1 until now! I had the same understanding as the OP, and thought something was broken.