[osmosis-dev] nodes column in way table and way_nodes table
Michel Seuthe
m.seuthe at googlemail.com
Wed Dec 21 13:37:37 GMT 2011
2011/12/21 Igor Podolskiy <igor.podolskiy at vwi-stuttgart.de>
> Michel,
>
> please reply to the list, _not_ just to me in person. Thank you.
>
>
> On 21.12.2011 14:00, Michel Seuthe wrote:
>
>> Hmm okay, but that means all references from the way to it's nodes are
>> stored in way_nodes and in way table. Which would be a mass of redundant
>> data...
>>
> Why do you think it is redundant? It isn't. The node sequences of the ways
> aren't stored anywhere else in the database. The snapshot schema is as 2nd
> normal form as it can get...
>
> The ways table store only the assembled line strings, i.e. the _geometry_
> of the way derived from the node sequences. If you don't need this or if
> this is a problem for you, use another schema. APIDB, for example, does not
> store assembled geometries.
>
> Bye
> Igor
>
For example:
SELECT id, nodes FROM ways WHERE id=55579416;
delivers:
55579416; "{299810549,299809848,299810550,259983366}"
SELECT way_id, node_id, sequence_id FROM way_nodes WHERE way_id=55579416;
delivers:
55579416;299810549;0
55579416;299809848;1
55579416;299810550;2
55579416;259983366;3
Exactly the same data, same sequence and everything.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20111221/5ddbb953/attachment.html>
More information about the osmosis-dev
mailing list