[OSM-dev] osm2pgsql can parse diffs now (for testing anyway)
Martijn van Oosterhout
kleptog at gmail.com
Wed Jul 9 16:43:50 BST 2008
After a kind reminder this morning that this hadn't been done yet I
spent the day coding this. Basically it all works except for two
things:
- If a member of a relation changes, the relation isn't updated (can
be worked around)
- If a parking area changes, it doesn't delete the old parking node.
Modulo plain bugs ofcourse!
The first issue is a Simple Matter Of Programming, which I hope to get
around to soon. The second issue is thornier and I havn't got a good
solution for that yet. I have a possible ugly solution though, if it
comes down to it :)
Usage is simple enough. first load your planet dump with --slim mode
(if you have the memory, give it a big cache):
osm2pgsql --slim my-planet-extract.osm.gz
After that you can use:
osm2pgsql --slim -a my-daily-diff.osc.gz
To apply the patch.
Don't forget the -a, or you'll blow away the database you've got.
As expected, it's nowhere near as fast as just filling the DB with
data, but it should be able to keep up. It passes all the tests I
could throw at it, but it would be really nice if someone could try it
on a big block of data which a big diff. None of these changes should
affect the performance of plain data loading, so if you find it's much
slower, let me know.
Please report any bugs you find.
Have a nice day,
--
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/
More information about the dev
mailing list