[OSM-dev] Way as Relation

Stefan de Konink skinkie at xs4all.nl
Sat May 31 20:24:43 BST 2008


Richard Fairhurst schreef:
> I'd very very roughly summarise the argument as I see it:
> 
> - pro: "neater" data model; some opportunities for simplifying code

The way I have implemented it now, it will save the way/way_tags table. 
And it will allow relations to branch two member tables instead of one. 
(For relations; And for Nodes)

> - con: no real need to do so; makes things more abstract and harder to  
> understand; whole lot of recoding needed (i.e. every single client)  
> with no obvious payback

I think it is much more easy to understand. The way I coded it now as 
k=type v=way,  works as a charm. I also presented legacy support (for 
ways, for references it is a bit more tricky).


http://wiki.openstreetmap.org/index.php/Cherokee/MonetDB_Handler_OSM


<osm version="0.5" generator="Cherokee/MonetDB OSM Server">
<way id="4088272" visible="true" user="unknown" timestamp="2006-12-27 
00:00:00.000000+00:00">
<nd ref="21709836"/>
<nd ref="21748175"/>
<nd ref="21748176"/>
<nd ref="21748186"/>
<nd ref="24966809"/>
<nd ref="24966810"/>
<nd ref="24966811"/>
<nd ref="25314781"/>
<nd ref="25843932"/>
<tag k="created_by" v="JOSM"/>
<tag k="name" v="Noordkade"/>
<tag k="highway" v="cycleway"/>
</way>
</osm>

vs

<osm version="0.5" generator="Cherokee/MonetDB OSM Server">
<relation id="4088272" visible="true" user="unknown" 
timestamp="2006-12-27 00:00:00.000000+00:00">
<member type="node" ref="21748175" role=""/>
<member type="node" ref="25843932" role=""/>
<member type="node" ref="21748176" role=""/>
<member type="node" ref="24966811" role=""/>
<member type="node" ref="24966810" role=""/>
<member type="node" ref="25314781" role=""/>
<member type="node" ref="24966809" role=""/>
<member type="node" ref="21709836" role=""/>
<member type="node" ref="21748186" role=""/>
<tag k="created_by" v="JOSM"/>
<tag k="name" v="Noordkade"/>
<tag k="highway" v="cycleway"/>
<tag k="type" v="way"/>
</relation>
</osm>


Stefan




More information about the dev mailing list