pyosmium-get-changes - Downloading OSM change files¶
Usage¶
pyosmium-get-changes.py¶
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.
usage: pyosmium-get-changes [options]
- -h, --help¶
show this help message and exit
- -v¶
Increase verbosity (can be used multiple times)
- -o <outfile>, --outfile <outfile>¶
Name of diff output file. If omitted, only the sequence ID will be printed where updates would start.
- --format <format>¶
Format the data should be saved in.
- --server <server_url>¶
Base URL of the replication server
- --cookie <cookie>¶
Netscape-style cookie jar file to read cookies from and where received cookies will be written to.
- -s <outsize>, --size <outsize>¶
Maximum data to load in MB (default: 100MB).
- -I <id>, --start-id <id>¶
Sequence ID to start with
- -D <date>, --start-date <date>¶
Date when to start updates
- -O <osmfile>, --start-osm-data <osmfile>¶
start at the date of the newest OSM object in the file
- -f <seq_file>, --sequence-file <seq_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-timeout <socket_timeout>¶
Set timeout for file downloads.
- --version¶
show program’s version number and exit