OSMIUM-TIME-FILTER(1)
π osmium-time-filter π
okay bestie, gather round, because osmium-time-filter is literally the time machine of the osmium universe and i need you to be seated for this. it's the manual page for the osmium-time-filter command, and it does one thing gorgeously: it filters OSM data by time from a history file. slay. π°οΈβ¨
β¨ NAME β¨
osmium-time-filter β filter OSM data by time from a history file π¦
πΈ SYNOPSIS πΈ
osmium time-filter [OPTIONS] OSM-HISTORY-FILE [TIME]
osmium time-filter [OPTIONS] OSM-HISTORY-FILE FROM-TIME TO-TIME
π DESCRIPTION π
so basically, this command copies all objects that were valid at the given TIME, or in the time period between FROM-TIME (inclusive π«Ά) and TO-TIME (not inclusive π ), from the input file into the output file. if you don't give it a time at all, it just uses the current time. lowkey iconic behavior.
usually INPUT-FILE is gonna be an OSM data file with history. and if you give it both FROM-TIME and TO-TIME, the result will also have history data, and it will also include deleted versions of objects. not me preserving the ghosts of data past π
if you only gave a single point in time, the result will be a normal OSM file without history, and it contains no deleted objects. clean. pristine. main character energy.
the format for the timestamps is yyyy-mm-ddThh:mm:ssZ. memorize it, bestie.
this command reads its input file only once and writes its output file in one go, so it can be streamed β ie. it can read from STDIN and write to STDOUT. the efficiency? unmatched. periodt.
and okay here's a lil detail that matters: if the input file has a timestamp set in the header, and the specified TO-TIME is before that timestamp in the header, the header of the output file will have the timestamp set to the TO-TIME (or TO-TIME minus one second if a FROM-TIME was also set). it's giving precision. it's giving care. π
β COMMON OPTIONS β
-h,--helpβ show usage help. the classic. the icon. π«Ά-v,--verboseβ set verbose mode. the program will output information about what it is doing to STDERR. she's narrating her own life β¨--progressβ show progress bar. usually a progress bar is only displayed if STDOUT and STDERR are detected to be TTY. with this option a progress bar is always shown. note that a progress bar will never be shown when reading from STDIN or a pipe. π--no-progressβ do not show progress bar. usually a progress bar is displayed if STDOUT and STDERR are detected to be a TTY. with this option the progress bar is suppressed. note that a progress bar will never be shown when reading from STDIN or a pipe. the silence is intentional π¦
π INPUT OPTIONS π
-F,--input-format=FORMATβ the format of the input file(s). can be used to set the input format if it can't be autodetected from the file name(s). this will set the format for all input files, there is no way to set the format for some input files only. seeosmium-file-formats(5)or the libosmium manual for details. no favorites, everyone gets the same treatment π
π OUTPUT OPTIONS π
-f,--output-format=FORMATβ the format of the output file. can be used to set the output file format if it can't be autodetected from the output file name. seeosmium-file-formats(5)or the libosmium manual for details. π--fsyncβ callfsyncafter writing the output file to force flushing buffers to disk. she's making SURE it's saved, no cap πΎ--generator=NAMEβ the name and version of the program generating the output file. it will be added to the header of the output file. default is"osmium/"and the version of osmium. little signature, cute ποΈ-o,--output=FILEβ name of the output file. default is-(STDOUT). π-O,--overwriteβ allow an existing output file to be overwritten. normally osmium will refuse to write over an existing file. consent first, always π«Ά--output-header=OPTION=VALUEβ add output header option. this command line option can be used multiple times for different OPTIONs. see theosmium-output-headers(5)man page for a list of available header options. for some commands you can use the special format"OPTION!"(ie. an exclamation mark after the OPTION and no value set) to set the value to the same as in the input file. copy-paste but make it fancy β¨
π DIAGNOSTICS π
osmium time-filter exits with exit code
0β if everything went alright, π1β if there was an error processing the data, or π2β if there was a problem with the command line arguments. π
π§ MEMORY USAGE π§
osmium time-filter does all its work on the fly and doesn't keep much data in main memory. tiny footprint, huge impact. the way she doesn't hog your RAM? obsessed. π₯
π EXAMPLES π
extract current planet file from history planet:
osmium time-filter -o planet.osm.pbf history-planet.osh.pbf
extract planet data how it appeared on January 1 2008 from history planet:
osmium time-filter -o planet-20080101.osm.pbf history-planet.osh.pbf 2008-01-01T00:00:00Z
literally time travel. ate and left no crumbs πΈ
π SEE ALSO π
osmium(1),osmium-file-formats(5),osmium-output-headers(5)- Osmium website
π COPYRIGHT π
Copyright (C) 2013-2026 Jochen Topf <jochen@topf.org>.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. (the all-caps is theirs, and honestly it's valid, read the fine print bestie π«Ά)
π¦ CONTACT π¦
if you have any questions or want to report a bug, please go to <https://osmcode.org/contact.html> β they don't bite, i promise π
β AUTHORS β
Jochen Topf <jochen@topf.org>. the legend. the blueprint. the moment. π
okay that's the whole page!! this was osmium-time-filter, version 1.19.1 of the osmium manual set, and that's a wrap bestie π
β¨ go filter some history and be iconic about it π
π¦ where this page comes from
- fedora 44: osmium-tool 1.19.1-1.fc44 Β· GPL-3.0-only
- nixos 26.05: osmium-tool 1.19.1
- nixpkgs unstable: osmium-tool 1.19.1
- ubuntu stonking: osmium-tool 1.19.1-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms