[OSM-talk] Turn restrictions ambiguity

andrzej zaborowski balrogg at gmail.com
Thu Apr 23 20:56:09 BST 2009


2009/4/23 SteveC <steve at asklater.com>:
>
> On 23 Apr 2009, at 12:32, Teemu Koskinen wrote:
>
>> On Thu, 23 Apr 2009 22:25:36 +0300, SteveC <steve at asklater.com> wrote:
>>
>>>
>>> On 23 Apr 2009, at 12:17, Teemu Koskinen wrote:
>>>
>>>> On Thu, 23 Apr 2009 21:34:05 +0300, SteveC <steve at asklater.com>
>>>> wrote:
>>>>
>>>>> I don't see a clear explanation as to why there is ambiguity if you
>>>>> don't do turn restrictions at the end of ways on the wiki. There is
>>>>> some stuff in the talk page
>>>>>
>>>>>    http://wiki.openstreetmap.org/wiki/Talk:Relation:restriction
>>>>>
>>>>> Anyone care to provide an explanation?
>>>>>
>>>>> The reason I ask is that I've come across some roads where there
>>>>> is a
>>>>> restriction every  other turn in both directions... and splitting a
>>>>> mile long road in to 30 pieces seems nuts. As a follow up, I can
>>>>> guess, but what will the renderer do in that situation? I'm
>>>>> guessing
>>>>> mapnik will give up trying to put 30 names on a one mile road and
>>>>> won't notice they're the same name?
>>>>
>>>>
>>>> If both from and to ways continue after the via point and neither
>>>> is one-way, there's two possible ways to interpret it: the
>>>> restriction could apply when coming from either of the ends of the
>>>> from-way. This of course doesn't matter if there is similar
>>>> restriction coming from both directions, but that's not nearly
>>>> always the case. And even if there is symmetry in the real life
>>>> restrictions, it's not appropriate in my opinion to map those with
>>>> just one restriction.
>>>
>>> eh? don't you assign direction by saying 'from' and 'to' ?
>>>
>>
>> Yes in the sense of which of the two ways you are coming from, but
>> if the way is not one-way and it doesn't end at the via-node,
>> there's two possible directions from where you can come to the via-
>> node using the way.
>
> Um... no.
>
> The restriction has handedness - left or right... and the way coming
> off it has an angle.. lets try some ascii
>
> B
> |
> |
> |----------C
> |
> |
> |
> A
>
> I am going from A to B. There is no 'right_turn' restriction on the
> corner that stops me turning to C.
>
> That cannot be interpreted as a restriction from B to A as it would be
> a left turn, not a right turn. To figure that out you just need to
> compute the angle it makes with your direction of travel to see if
> it's left or right?

The no_left_turn, no_right_turn is only to indicate the type of
streetsign to show AFAIU.

Practically, adding angles to the specification will be a hell to
implementers, and there are few use cases that would benefit from
this.  Sometimes you will have a way splitting off to C that first
turns slightly left, enters a tunnel or viaduct and then goes on the
other side of AB, something that at low zoom level looks as in your
drawing, and the streetsign might stilll be no_right_turn.

Or something like this is common:

B  C
 \  |
  \ |
   \|
    |
    |
    A

where the straight line is considered a turn even though it's
straight, and the turn from A to B is considered straight even though
it's an arc :P

Cheers




More information about the talk mailing list