[OSM-dev] Hwo to get a diff (and apply it?)

Brett Henderson brett at bretth.com
Sat Jun 21 09:09:27 BST 2008


If you do wish to automate osmosis diff application, you can use this 
script, adapt it to your bounding box and trigger it from cron:
http://www.bretth.com/myanmar/replicate_osm_file.sh

Installation instructions for the script are here.  It will need to be 
adapted for your area because the script is currently used for Myanmar data.
http://wiki.openstreetmap.org/index.php/OnDemandTileServer#Myanmar_Data_Replication

I have the script being run at 40 minutes past the hour, then at 45 
minutes past the hour I import the resultant file into the mapnik 
database.  This keeps the following slippy map with Myanmar data within 
2 hours of the main API.
http://www.bretth.com/world_map/

Frederik Ramm wrote:
> Don't.
>
> If you wanted to do what you say, you'd have to use Osmosis to apply the 
> diff to your downloaded XML file, then cut out the affected area again 
> because applying the diff (which is for the whole planet) will also 
> create new objects everywhere on the planet. After that you'd have to 
> re-import your patched XML to PostGIS. I think you'd be better off just 
> downloading the whole area once or twice a day if it is so small.
>
> Bye
> Frederik





More information about the dev mailing list