NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi There - I'm new to OSM and I'm trying to figure out the best way to keep a local PostGIS version of OSM (one country) in sync with OSM main. I'm using OSM data to as one input into some road verification work. So where a road in my copy is modified, I'd like to keep that modification (it mighten't be relevant to anyone else) but where new features exist or features changed in OSM (that have not been modified locally) I'd like to bring them into my local copy. Can anyone give some pointers or links to the best way to approach this?

Thanks for any help

asked 03 Mar '20, 01:23

Quannah's gravatar image

accept rate: 0%

I would read this for an introduction to the process of syncing. Then I'd check OSM FR to see if the country you want is in their list, as this will simply the process of dealing with only your area of interest.

permanent link

answered 04 Mar '20, 04:41

TheSwavu's gravatar image

accept rate: 0%

edited 04 Mar '20, 04:42

Thanks - using that page and a couple others I think the process goes like this:

  1. Get the latest timestamp of the OSM main data
  2. Create the configuration, download.lock and state.txt files
  3. Generate a change (.osc diff file)of the database changes
  4. Apply the change file/s to the database.

Is that how its supposed to work?

Once I have the state file for my country and a configuration file in a working directory my osmosis command looks like this

osmosis --rri workingDirectory=%WORKOSM% --simc --wxc - | osm2pgsql -a -S "C:\Program Files\osm2pgsql-latest-x64\osm2pgsql-bin\" -d dbasename -U username -H localhost --slim -k --flat-nodes c:\temp\fl -r xml -

which generates a file - but I can't figure out what it is? I was going to check a change inside the file and then verify that changes is applied in postgis but I can't open the downloaded file. Any tips on what kind of binary it is or where I'm going wrong are much appreciated.

I think I'm gettings somewhere (just really slowly...)

(05 Mar '20, 04:50) Quannah

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 03 Mar '20, 01:23

question was seen: 2,426 times

last updated: 05 Mar '20, 04:50

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum