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

Steps to update osm data back and forth?

1

I have both a PostGIS database with OSM data imported, and the same data in a SHP folder.

By adding missing information to the downloaded OSM data, both in SHP and PostGIS, I'd be able to contribute with the project.

If I need to also update my server from an OSM periodical diff, which would be the correct sequence of tasks? (I'm assuming that there is new info in OSM to download and new info on my server to upload, and that would be happening regularly).

asked 06 Feb '13, 18:38

Martin0x777's gravatar image

Martin0x777
21112
accept rate: 0%


One Answer:

6

Both the Shape Files and the PostGIS database - assuming you're using an osm2pgsql or Imposm import - are data reduced; you cannot extract the orginal OSM data from it any more. Therefore, if you add data to your shape file or PostGIS, it will be very difficult to upload that enhancement in OSM. You would need a program that does roughly this:

  1. user has updated an object in the shape file
  2. find out which OSM object(s) have been used to create that shape object
  3. find out what changes have to be made to these object to reflect the update
  4. download latest version of the object and make sure we're not accidentally overwriting someone else's change
  5. upload a changeset that reflects the update

Some people who want to run continuous imports have done some work in that direction but there's no plug and play solution for your problem.

The best way to edit OSM is via one of the major editors, JOSM or Potlatch.

answered 06 Feb '13, 20:48

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 06 Feb '13, 20:48

Source code available on GitHub .