[OSM-dev] Diff files - Best Approach?

Steve Hill steve at nexusuk.org
Thu Feb 19 20:39:19 GMT 2009


On Thu, 19 Feb 2009, brendan barrett wrote:

> 1. What's the difference between these two diff approaches?

Not sure - I've always used the daily/hourly/minutely ones. :)

> 2. Is there a best practice approach to keeping in sync?

For OpenPisteMap, I write an updater script:
http://subversion.nexusuk.org/projects/openpistemap/trunk/scripts/updater.py
(you'll need to hack the paths in the script as appropriate).

It basically tries to keep the local database in sync with the OSM server 
by grabbing the deltas each minute, but it also tries to be smart with 
whether it downloads the daily, hourly or minutely deltas based on how far 
behind you are.

> FYI: I am not using any OSM tools to do the import, i'm writing my own
> import code (i'm in a .Net environment, and I find it better for my
> understanding if I do this myself). I can figure out how the files
> work, I just need to know the high level stuff.

Well, my updater script may not directly be that useful to you then (it 
uses osm2pgsql), but it might be a handy reference.  I don't claim it is 
necessarilly a "best practice" implementation, but I have tried to be 
sensible with the number of requests it makes to the OSM server.

  - Steve
    xmpp:steve at nexusuk.org   sip:steve at nexusuk.org   http://www.nexusuk.org/

      Servatis a periculum, servatis a maleficum - Whisper, Evanescence





More information about the dev mailing list