This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to keep a local modified database in sync with osm database

1

I imported a planet pbf into my local PostgreSQL database and need to do some private update (creation, modification and deletion) because of my business needs. However, I want to keep the local database in sync with osm official database periodically. It can be weekly, even monthly. Is there any best way to do that?

asked 04 Jul '18, 07:39

Hanson's gravatar image

Hanson
26113
accept rate: 0%

edited 04 Jul '18, 07:44

1

Please clarify how you want to proceed in these cases:

  • An object you deleted locally has been modified in OSM?
  • An object you created locally has meanwhile also been created in OSM?
  • An object you modified locally has been modified in a different way in OSM?
(04 Jul '18, 07:57) Frederik Ramm ♦

@Frederik Ramm ♦ Thank you for your reminder. It will include these cases:

  1. An object deleted locally has been modified in OSM
  2. An object created locally but does not exist in OSM
  3. An object modified locally has been modified in a different way in OSM
  4. An object created locally and its id maybe conflict with another new object in OSM, but they are different completely
(04 Jul '18, 10:17) Hanson

Source code available on GitHub .