[OSM-dev] OSMChangeset support
Stefan de Konink
stefan at konink.de
Sun Apr 5 23:14:51 BST 2009
Hi all,
One of the last things I wanted to add was 'native' update support for
database to database transactions. Currently known as OSMChangeset; the
attachment is what I import into the database and the following file
generates it.
http://repo.or.cz/w/handlerosm.git?a=blob;f=osmsucker-ywk.c;hb=HEAD
For Monet it is extremely fast less than 15mins to push it through. I
realise that the pgsql people need some horizontal merging, but the tool
might inspire some more people. What is also pretty unique, is that the
tool actually takes care of references that cannot exists anymore when a
changeset contains deletes.
As can be seen in the example I first delete the actual deletes from the
way_nds and relation_members tables. After that the temporary table with
delete ids is added with the modified ids. They all get deleted, and
reinserted like a normal planet import.
There are still come catches, but this makes my life much easier and
might other toolmakers to take a different approach in updating.
Stefan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: example.sql
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090406/216351a5/attachment.ksh>
More information about the dev
mailing list