[OSM-dev] Way as Relation

Jon Burgess jburgess777 at googlemail.com
Thu May 29 20:10:13 BST 2008

On Thu, 2008-05-29 at 16:51 +0200, Stefan de Konink wrote:
> Maybe this is discussed before, but I want to know what the general
> opinion is about it.
> I wonder if we can skip a table of ways, and instead make it a relation.
> And it would look as:
> <relation id="77" visible="true" timestamp="2006-03-14T10:07:23+00:00" user="fred">
>   <member type="relation" ref="343" role="from" />
>   <member type="node" ref="911" role="at" />
>   <member type="relation" ref="227" role="to" />
>   <tag k="type" v="way"/>
> </relation>
> Is there a reason not to implement it this way?

I'm not sure I understand, but I think you are proposing that ways be
implemented as a type of relation. Two problems with this:-
1) The list of nodes in a way is ordered. The members of a relation are
not ordered. 
2) The relation IDs overlap with the way IDs. You would probably need to
renumber either all the ways or relations.

In general though, do you really want to "optimise" the data by
converting the 20M concisely defined ways by making them look more like
the 11k generic relations in the DB[1]. This surely going to expand the
storage and processing overhead for the ways. That sounds wrong to me.


[1] http://www.openstreetmap.org/stats/data_stats.html 

More information about the dev mailing list