[OSM-dev] Inconsistency in database?
Frank Bielig
Frank at Bielig.Info
Wed Feb 24 05:43:05 GMT 2010
Hallo,
I just checked the way 44141527. Calling
http://api.openstreetmap.org/api/0.6/way/44141527 I get following result:
<osm version="0.6" generator="OpenStreetMap server">
<way id="44141527" visible="true" timestamp="2009-11-11T17:31:53Z"
version="2" changeset="3091813" user="Eric S" uid="45284">
<tag k="boundary" v="national_park"/>
<tag k="name" v="Réserve Nosy Hara"/>
<tag k="source" v="ANGAP 2007"/>
</way>
</osm>
No node references are returned. Asking for special version with
http://api.openstreetmap.org/api/0.6/way/44141527/2 node references are
returned:
<osm version="0.6" generator="OpenStreetMap server">
<way id="44141527" visible="true" timestamp="2009-11-11T17:31:53Z"
user="Eric S" uid="45284" version="2" changeset="3091813">
<nd ref="560160550"/>
<nd ref="560160548"/>
<nd ref="560160549"/>
...
<nd ref="560160626"/>
<nd ref="560160550"/>
<tag k="boundary" v="national_park"/>
<tag k="name" v="Réserve Nosy Hara"/>
<tag k="source" v="ANGAP 2007"/>
</way>
</osm>
Unfortunately these node references are not valid. This inconsistency
seems to be in planet file too. Does anybody has an idea of the reason?
Should be a foreign key constraint in database schema? Currently only
way id is checked:
Table "public.way_nodes"
Column | Type | Modifiers
-------------+--------+-----------
id | bigint | not null
node_id | bigint | not null
version | bigint | not null
sequence_id | bigint | not null
Indexes:
"way_nodes_pkey" PRIMARY KEY, btree (id, version, sequence_id)
"way_nodes_node_idx" btree (node_id)
Foreign-key constraints:
"way_nodes_id_fkey" FOREIGN KEY (id, version) REFERENCES ways(id,
version)
Frank
--
They who can give up essential liberty to obtain a little temporary
safety, deserve neither liberty nor safety.
-- Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Frank.vcf
Type: text/x-vcard
Size: 189 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20100224/30902178/attachment.vcf>
More information about the dev
mailing list