[OSM-talk] empty relations

Frederik Ramm frederik at remote.org
Tue Jun 10 16:57:24 BST 2008


Hi,

> While analyzing current uses of relations (relations-latest.osm) it  
> came
> to my attention that relations with no members can exist in the DB  
> while
> they probably have no meaning in the real world.

That's a leftover of the time when relations were planned to be  
generic "entities".

The idea behind these is to make it possible to have generic objects  
that can take part in other relations (as members).

Say you have a road and you want to say "this road is operated by  
company X". You could put a tag on the way saying "operator=X". But  
now assume that you want to store a lot of extra info with X, e.g.  
not only the name but also telephone numbers and so on. You'd end up  
having a set of tags ("operator_name", "operator_telephone" and so  
on). So you can create an object representing X, and you would use a  
relation without members for that and tag it type=company, name=...,  
telephone=.... Now you can use a second relation to link the way you  
are talking about to the company X.

The feature is not used yet but why disable it if it doesn't hurt.

> What's more, current
> editors never show such relations because they can't be related to the
> area that is being edited (it can't show up in any bbox API call, just
> in full DB dumps).

As of tonight, JOSM will have a way to download all members of a  
relation, and this would then also download the "X" relation in my  
example.

> Should relations with no members be allowed?

Yes. The only thing that doesn't make sense is a relation with no  
tags AND no members.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"







More information about the talk mailing list