I have an OSM import in my PostgreSQL database and can see my map using Geoserver.

I've noticed some data have disapeared ( most water related data ) maybe after an import failure, I don't know.

I'm thinking in delete all water from database and then import again from the ways table because I believe all data still in there to allow append imports.

Another alternative is to drop the database and do a full import again but it will be a pain because it is a planet database (almost two weeks to do the import).

Some ideas ?


Apparently It's possible to use osm2pgsql to do incremental updates, although I've never done so:


"Some important features (including incremental updates (planet diffs, the initial load to populate the track tables, and proper evaluation of multipolygons) only work in slim mode."

You could also write a style.lua file to discard everything except the features you want, import into a new database (or to different tables by changing the default planet_osm_ prefix) and then compare & INSERT across tables (across databases using a postgres foreign table).

  • Yeap. I'm already using osm2pgsql to kepp my data up to date. The problem is: osm2pgsql uses the planet_osm_ways and the flat nodes file to control the updates. If some data disapears from the data tables (polygon, line, roads and point) then the update method will not restore it because the way table will keep the records there. – Magno C Oct 9 '17 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.