[Tagging] Relations (was directions)

Simone Saviolo simone.saviolo at gmail.com
Wed Aug 10 11:00:19 BST 2011


2011/8/10 Tobias Knerr <osm at tobias-knerr.de>

> Simone Saviolo wrote:
> > Ok, but there are use cases where simple things don't suffice. In the
> > case at hand, for example, using something like direction=forward
> > doesn't work in all the use cases. And using direction=<angle in
> > degrees> is in no way simpler (can you figure a newcomer trying to work
> > out the angle? What's the reference? Should I use degrees, decimal
> > degrees, radians? Should I use minutes and seconds for the fractional
> > part (the horror)? Should I be content with something like direction=225
> > or be more precise and use direction=221,32? You know what, nevermind,
> > I'll use Streetview instead).
>
> Now, *this* is something that can be abstracted away by tools much more
> easily than relations. The unit issue has already been neatly solved by
> editors such as Potlatch 2, and I can imagine how I would design a nice
> dialog for editing tags with angular values. I have no idea how to even
> approach a similarly user-friendly editing tool for direction relations.
>

Look at the turnrestrictions plugin for JOSM. When you use it, you can even
have no idea that there's a relation involved.

A major advantage of tags compared with relations is that they don't
> affect other objects, which has all sorts of benefits (object history
> easier to understand, no unexpected side effects when I move a node of
> the road, ...).


Yes and no. Relations exist for the exact purpose of binding objects that
are supposed to be bound. If I map a speed camera and use the relation, I'll
set a node as "from" and another one as "to"; if then I get better data and
I move those two nodes, the relation is still valid and it is automatically
updated. On the other hand, if I had used something like, for example (it's
not a real tag, just an example), distance_from_road_margin=2 to specify
where the speed camera is, I would have to move the nodes accordingly, or to
edit the value of the tag, and if I forget one of the two, or if I do it
incorrectly, I have invalid data.

As to object history, relations are "above" objects. A node that represents
an intersection is there because it is an intersection; it may be moved or
tags may be applied, the road may change its classification, whatever, and
all of these changes should be tracked in the history of the node. When that
node becomes the member of a turn restriction relation, what happens to the
relation should not be recorded in the history of the node. If the node is
changed and the turn restriction still applies, the history of the node will
have all the relevant information, and the history of the relation will have
all the relevant information (relevant to the relation, of course, i.e. no
change).

Regards,

Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tagging/attachments/20110810/f99400ac/attachment-0001.html>


More information about the Tagging mailing list