[OSM-talk] empty relations
Stefan Baebler
stefan.baebler at gmail.com
Tue Jun 10 23:51:13 BST 2008
Frederik Ramm wrote:
> 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).
Ok, so it is basically (ab)using the only locationless entity available
in OSM model to store some data, which _may_ be referenced by other
relations. It is still not clear to me how could one reference it
without having it retrieved in some bbox.
> 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.
Why not store the data about the company in that latter, second
relation, and using this same relation to group all the roads operated
by a particular company at the same time?
Is it just a bad example or I misunderstood it somehow? Are there any
other, meaningful uses?
> The feature is not used yet but why disable it if it doesn't hurt.
We could just as well just deprecated segments, but decision was to
ditch them completely. Now we find ourselves splitting ways into chunks
no longer than a segment and gluing them together with relations (way
has to be split whenever there is a bridge, speed limit change, bus or
cycle route joins the way...). This might be a bit radical, but we could
as well ditch ways and replace them with relations (of ordered nodes to
compose ways). </thinking aloud>
>> 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.
goodie!
But it doesn't make non-referenced relations with no members any more
useful. One still won't be able to retrieve them to reference them.
Stefan
More information about the talk
mailing list