[OSM-dev] simple tool for finding minimal set of osmosis diff files
Timo Juhani Lindfors
timo.lindfors at iki.fi
Wed Jul 2 15:10:52 BST 2008
Hi,
Brett Henderson <brett at bretth.com> writes:
> Osmosis has a task named --read-change-interval which will download all
> changes from the last time it ran (it maintains a timestamp file), and
> merge them into a single changeset. That changeset can then be used to
> patch a file, or imported into a database, etc.
Aha, due to java issues I was using the java5 compatible version which
does not have that option:
$ grep -ri read-change-interval osmosis-0.24.1-java5
$
> For example, I use it to maintain a local copy of all data in Myanmar.
> http://www.bretth.com/myanmar/
> The main file of interest in that directory is replicate_osm_file.sh
> which is launched from cron hourly. configuration.txt defines which set
> of diffs to download, I'm using hourly diffs but minute and day diffs
> will also work.
Interesting, I didn't know you could apply diffs if you only have some
small bounding box of data.
> There is one big problem with your script which should be easy to fix.
> DON'T use the bz2 daily files, they use a different timezone offset
> (BST) to the gz daily files (UTC) so will contain slightly different
> data. I'm going to disable them very soon in favour of the new gz
> files. The gz files are a bit larger but fix timezone issues and
> drastically improve the reliability of daily files.
Thanks for the warning :-) I fixed the script.
> One nice thing about your script is that it uses daily files and hourly
> diffs, osmosis won't do that for you. It's probably faster to use your
> approach because less files are downloaded, although the total bandwidth
> consumption will be almost identical.
Yep, I am experimenting with
http://svn.openstreetmap.org/applications/utils/export/tiledata/import
and trying to make it support minutely diffs so I really need more
than just hourly diffs. I need to add support for the case where
starttime is not at midnight.
best regards,
Timo Lindfors
More information about the dev
mailing list