[Tagging] Status of oneway=cw oneway=ccw

Kevin Kenny kevin.b.kenny at gmail.com
Thu Mar 14 20:31:54 UTC 2019

On Thu, Mar 14, 2019 at 10:39 AM Kevin Kenny <kevin.b.kenny at gmail.com> wrote:
> The order of ways in the relation definitely determines the direction
> to which oneway=* refers. It oneway=yes or oneway=signed (or whatever
> we settle on) is present, the ways are traversed from the first
> relation member to last - irrespective of the direction of the way.

And I just realized where this rule needs *something* to resolve a
possible ambiguity:

We already have concluded that the direction a route traverses a way
needs to be independent of the direction of the way. (I have examples
where two routes share one way in the same direction, and elsewhere
share a different way in opposite directions, and that's not
achievable otherwise.)

If a route is circular, and the relation has fewer than three ways,
there's then an ambiguity.  For a single way in the relation, the
direction of travel could be either with or against the way.  For a
relation with two ways, the direction of travel on the first way could
be either with or against the way, and in either case, the other way
will have an endpoint that joins and the route will close.

The first case is just a closed way, and the route provides no
indication of the direction of travel.

The second case is that there are ways x and y joining nodes A and B.
The direction of the ways in a route relation, we've already
established, needs to be ignored. So the actual route will depend on
the choice of which end of 'x' is chosen as the start.  It could be B
-> x-in-reverse -> A -> y -> B, or A -> x -> B -> y-in-reverse -> A.
Both routings visit way x before way y, so the order of the ways in
the relation doesn't determine the route.

For three or more ways, there's no ambiguity, since only one endpoint
of the first way will join to the second, determining the direction of
travel on both.

The simplest solution is to require that the ways be split if
necessary to avoid ambiguity - forbid one-way routes of fewer than
three members. An alternative is what I mentioned previously,
disambiguate with 'forward' or 'backward' roles on the ways.  I can
live with either.

More information about the Tagging mailing list