[OSM-dev] Dealing with segements referencing deleted nodes in theplanet dump

Andy Robinson Andy_J_Robinson at blueyonder.co.uk
Tue Dec 19 21:25:26 GMT 2006


Jon,

We had a discussion mainly on irc about three weeks ago on this. As you say
the problem is that we have segments in the database which are live but use
nodes which have been deleted (ie visible=false). As I recall although this
isn’t right at the db end of things it can be overcome by ensuring none of
these end up in the planet file or delivered by the API. I'm assuming there
is a ticket somewhere on this and expect it's in Steve's to do list.

Cheers

Andy

Andy Robinson
Andy_J_Robinson at blueyonder.co.uk 

>-----Original Message-----
>From: dev-bounces at openstreetmap.org [mailto:dev-bounces at openstreetmap.org]
>On Behalf Of Jon Burgess
>Sent: 19 December 2006 6:27 PM
>To: dev
>Subject: [OSM-dev] Dealing with segements referencing deleted nodes in
>theplanet dump
>
>According to planet-061213.osm the following segement exists buts its
>nodes are missing:
>
>  <segment id="530081" from="580612" to="580613" timestamp="2006-02-
>24T18:14:14+00:00">
>    <tag k="name" v="A3 - A9 -  K_ln - FFT - Nuernberg - Muc" />
>  </segment>
>
>According to the API it has gone:
>
>$ wget "http://www.openstreetmap.org/api/0.3/segment/530081"
>...
>16:41:29 ERROR 410: Gone.
>
>but in the history it is still visible:
>
>$ wget -q -O -
>"http://www.openstreetmap.org/api/0.3/segment/530081/history"
><?xml version="1.0" encoding="UTF-8"?>
><osm version="0.3" generator="OpenStreetMap server">
>  <segment id="530081" from="580612" to="580613" visible="true"
>timestamp="2006-02-24 18:14:14">
>    <tag k="name" v="A3 - A9 -  Köln - FFT - Nuernberg - Muc"/>
>  </segment>
></osm>
>
>I think the API is declaring the segment gone because the nodes have
>been deleted and the nodes are missing from the planet dump file.
>
>$ wget -O - "http://www.openstreetmap.org/api/0.3/node/580613"
>...
>16:34:33 ERROR 410: Gone.
>
>The node history confirms the node was deleted months ago, so why is the
>segment in the planet dump?
>
><?xml version="1.0" encoding="UTF-8"?>
><osm version="0.3" generator="OpenStreetMap server">
>  <node id="580613" lat="50.907919" lon="7.117317" visible="true"
>timestamp="2006-02-24 18:14:08"/>
>  <node id="580613" lat="50.907919" lon="7.117317" visible="false"
>timestamp="2006-02-25 17:55:36"/>
></osm>
>
>What I infer from this is that when the planet dump emits a segment it
>does not check to see if the nodes have been deleted.
>
>This segment is a problem because the name tag contains invalid UTF-8
>and i'm not sure what to do with it. I'm guessing that either the planet
>dump should be surpressing these segments or we need a script to find
>and delete them via the API.
>
>        Jon
>
>
>
>
>_______________________________________________
>dev mailing list
>dev at openstreetmap.org
>http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev






More information about the dev mailing list