pyosmium-get-changes
Contents
Description
Fetch diffs from an OSM planet server.
The starting point of the diff must be given either as a sequence ID or a date or can be computed from an
OSM file. If no output file is given, the program will just print the initial sequence ID it would use
(or save it in a file, if requested) and exit. This can be used to bootstrap the update process.
The program tries to download until the latest change on the server is found or the maximum requested
diff size is reached. Note that diffs are kept in memory during download.
On success, the program will print a single number to stdout, the sequence number where to continue
updates in the next run. This output can also be written to (and later read from) a file.
*Note:* you may pipe the diff also to standard output using '-o -'. Then the sequence number will not be
printed. You must write it to a file in that case.
Some OSM data sources require a cookie to be sent with the HTTP requests. pyosmium-get-changes does not
fetch the cookie from these services for you. However, it can read cookies from a Netscape-style cookie
jar file, send these cookies to the server and will save received cookies to the jar file.
Distribution
The latest version of pyosmium may be downloaded from https://github.com/osmcode/pyosmium/
pyosmium 2025-03-04 PYOSMIUM-GET-CHANGES(1)
Name
pyosmium-get-changes
Options
-v Increase verbosity (can be used multiple times)
-oOUTFILE, --outfileOUTFILE
Name of diff output file. If omitted, only the sequence ID will be printed where updates would
start.
--formatFORMAT
Format the data should be saved in.
--serverSERVER_URL
Base URL of the replication server
--diff-typeSERVER_DIFF_TYPE
File format used by the replication server (default: osc.gz)
--cookieCOOKIE
Netscape-style cookie jar file to read cookies from and where received cookies will be written to.
-sOUTSIZE, --sizeOUTSIZE
Maximum data to load in MB (default: 100MB).
-IID, --start-idID
Sequence ID to start with
-DDATE, --start-dateDATE
Date when to start updates
-OOSMFILE, --start-osm-dataOSMFILE
start at the date of the newest OSM object in the file
-fSEQ_FILE, --sequence-fileSEQ_FILE
Sequence file. If the file exists, then updates will start after the id given in the file. At the
end of the process, the last sequence ID contained in the diff is written.
--ignore-osmosis-headers
When determining the start from an OSM file, ignore potential replication information in the
header and search for the newest OSM object.
-d, --no-deduplicate
Do not deduplicate diffs.
--socket-timeoutSOCKET_TIMEOUT
Set timeout for file downloads.
--version
show program's version number and exit
Synopsis
pyosmium-get-changes [options]
