[OSM-dev] Way as Relation

Stefan de Konink skinkie at xs4all.nl
Thu May 29 20:16:45 BST 2008


Jon Burgess schreef:
> 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. 

I have implemented an index for relations too.

> 2) The relation IDs overlap with the way IDs. You would probably need to
> renumber either all the ways or relations.

True, but if that is the biggest problem...

> 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.

I'll benchmark both solutions.


Stefan




More information about the dev mailing list