[OSM-dev] OSM Fixer [Sequal]

Dave Stubbs osm.list at randomjunk.co.uk
Wed Mar 25 20:27:26 GMT 2009


2009/3/25 Stefan de Konink <stefan at konink.de>:
> Matt Amos wrote:
>> yeah, the wiki page could probably do with some updating. but you
>> remember this thread last month, right?
>> http://lists.openstreetmap.org/pipermail/dev/2009-February/014024.html
>>
>> the issue with things referencing deleted items should go away because
>> the transactions wrap the used-by checks.
>
> True; But isn't Rails doing that now too? [I am talking about the main
> database]
>
>>> Never the less, I asked Dave if he checked in the MySQL database if the
>>> presented violators are in there or if this is a hypercube issue. I
>>> would like to have a reply to that, because then it might be an issue
>>> that should be addressed by more people.
>>
>> looks like it might be a planet generation issue. maybe take a look at
>> the history for some of the items which are causing you problems?
>
> That is exactly the reason I want to know if it is currently in the main
> database or not.
>
>
> http://api.openstreetmap.org/api/0.5/way/4043588/history
> http://api.openstreetmap.org/api/0.5/node/292984561/history
>
> The issue is that the hypercube 'dump' contains the waynds on
> 4043588, 292984561.
>
>
> Grant, Tom, could any of you if specifically this relation still exist
> in the main database?
>

Who needs SQL?
http://api.openstreetmap.org/api/0.5/node/292984561/ways

So yes. It is.
The API's Way.to_xml_node method strips out invisible nodes that it reads.
  http://api.openstreetmap.org/api/0.5/way/4043588 <-- no node
The OldWay.to_xml_node history calls do not.
  http://api.openstreetmap.org/api/0.5/way/4043588/history <-- node
(despite way timestamp saved after node was deleted)

The hypercube dumps probably work off the osmosis diffs which read the
history tables, hence the node in there.
The main planet dump reads the current tables but doesn't filter the
invisible ones like the API does. Potlatch also doesn't try to filter
deleted nodes, so it'll appear in Potlatch too (and be successfully
resurected if you save the way).
So in those cases you will find a reference to a deleted node that the
main API doesn't appear to have.

Obviously the current ways shouldn't contain invisible nodes... but
they do... and that'll be most likely due to lack of transactions etc
etc

Dave




More information about the dev mailing list