PYOSMIUM-UP-TO-DATE(1)
π PYOSMIUM-UP-TO-DATE π
okay bestie, sit down, hydrate, because this one is genuinely iconic β it's pyosmium-up-to-date, straight out of the Generated Python Manual, and it's about to keep your OSM file from being chronically outdated. π¦
β¨ NAME β¨
pyosmium-up-to-date β the little command that keeps your OSM file from rotting in the group chat while everyone else is out there living their best life. π
πΈ SYNOPSIS πΈ
pyosmium-up-to-date [options] <osm file>
π DESCRIPTION π
So here's the tea: this updates an OSM file with changes from an OSM replication server. Glow-up, but for data. β¨
Diffs get downloaded and kept in memory. And likeβ¦ to avoid running out of memory, the max size of diffs that can be downloaded at once is capped at 1 GB by default. That's approximately 3 days of update, which is honestly so real of it. You can change that limit with the --size parameter β go off β but be aware that processing those files needs additional memory, about 1GB more. So like, budget accordingly, okay? π
The starting time is automatically determined from the data in the file. And for PBF files, it's also possible to read and write the replication info from the osmosis headers. Which means: after that first update, every subsequent call to pyosmium-up-to-date will continue the updates from the same server exactly where they left off. That's continuity. That's commitment. That's the vibe. π«Ά
This program can update normal OSM data files and OSM history files. It detects automatically which type of file it's been called on. No notes. π
Okay now the return codes, and this part is important, so pay attention:
- It returns 0 if updates have been successfully applied up to the newest data, or if no new data was available. slay β¨
- It returns 1 if some updates were applied but there's still data available on the server β either because the size limit has been reached, or because there was a network error that could not be resolved. π
- Any other error results in a return code larger than 1.
β οΈ And bestie, listen: in that last case, the output file is guaranteed to be unmodified. So your data is safe. We don't do corruption here. π
Some OSM data sources require a cookie to be sent with the HTTP requests. Now, pyosmium-up-to-date does not fetch the cookie from these services for you β it's not your mom, it's not gonna log in on your behalf. However, it can read cookies from a Netscape-style cookie jar file, send those cookies to the server, and will save received cookies to the jar file. Mutual. Reciprocal. Healthy. π
<osm file>β OSM file to update. That's the one. The main character. π
π OPTIONS π
-vβ Increase verbosity (can be used multiple times). Yes, you can stack it. Yell louder. π₯-o OUTFILE,--outfile OUTFILEβ Name output of file. If missing, the input file will be overwritten. overwritten, bestie. Just so you know.--format FORMATβ Format the data should be saved in. Usually determined from file name.--server SERVER_URLβ Base URL of the replication server. Default:https://planet.osm.org/replication/hour/(that's hourly diffs from osm.org, in case you were wondering π¦)--diff-type SERVER_DIFF_TYPEβ File format used by the replication server (default:osc.gz).-s SIZE,--size SIZEβ Maximum size of change to apply at once in MB. Defaults to 1GB when no end ID or date was given. π--end-id IDβ Last sequence ID to download.-E DATE,--end-date DATEβ Do not download diffs later than the given date. Respect the timeline. β--tmpdir TMPDIRβ Directory to use for temporary files. Usually the directory of input file is used.--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. manual mode, unlocked π-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. really old. Like, ancient. Like, it hasn't posted since 2019. This flag says "do it anyway." π--cookie COOKIEβ Netscape-style cookie jar file to read cookies from and where received cookies will be written to. πͺ--socket-timeout SOCKET_TIMEOUTβ Set timeout for file downloads. Patience is a virtue but it also has a limit. π--versionβ show program's version number and exit. β¨
π AUTHOR π
Sarah Hoffmann β lonvia@denofr.de πΈ
iconic behavior, honestly. thank you for your service. π
π DISTRIBUTION π
The latest version of pyosmium may be downloaded from https://github.com/osmcode/pyosmium/ β go get it, it's giving open source excellence. π
and that's the whole page, bestie!! this is pyosmium version 4.3.1, dated 2026-04-01 β you're all caught up, no cap. π¦β¨π
π
π¦ where this page comes from
- fedora 44: python3-osmium 4.3.1-1.fc44 Β· BSD-2-Clause
- ubuntu stonking: pyosmium 4.3.1-1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms