pyosmium-up-to-date - Bringing OSM files up-to-date

Usage

Update an OSM file with changes from a OSM replication server. Diffs are downloaded and kept in memory. To avoid running out of memory, the maximum size of diffs that can be downloaded at once is limited to 1 GB per default. This corresponds to approximately 3 days of update. The limit can be changed with the –size parameter. However, you should take into account that processing the files requires additional memory (about 1GB more). The starting time is automatically determined from the data in the file. For PBF files, it is also possible to read and write the replication information from the osmosis headers. That means that after the first update, subsequent calls to pyosmium-up-to-date will continue the updates from the same server exactly where they have left of. The program returns 0, if updates have been successfully applied up to the newest data. It returns 1, if some updates have been applied but there is still data available on the server (either because the size limit has been reached or there was a network error which could not be resolved). Any other error results in a return code larger than 1. The output file is guaranteed to be unmodified in that case.

usage: pyosmium-up-to-date [options] <osm file>

<osm file>

OSM file to update

-h, --help

show this help message and exit

-v

Increase verbosity

-o <outfile>, --outfile <outfile>

Name output of file. If missing, the input file will be overwritten.

--server <server_url>

Base URL of the replication server. Default: ‘https://planet.osm.org/replication/hour/‘ (hourly diffs from osm.org).

-s <size>, --size <size>

Maximum size of change to apply at once in MB. Default: 1GB.

--tmpdir <tmpdir>

Directory to use for temporary files. Default: directory of input file

--ignore-osmosis-headers

Ignore potential replication information in the header of the input file and search for the newest OSM object in the file instead.

-b <wind_back>, --wind-back <wind_back>

Number of minutes to start downloading before the newest addition to input data. (Ignored when the file contains a sequence ID.) Default: 60.

--force-update-of-old-planet

Apply update even if the input data is really old.