OSMIUM-CAT(1)
π osmium-cat β the manual page, but make it cute β¨
okay bestie, you're reading the osmium-cat manual page (that's section 1 of the manual, iykyk) and honestly? this one is a whole vibe. let's get into it π«Ά
πΈ NAME πΈ
osmium-cat β concatenate OSM files and convert to different formats
like, it's a cat but for OSM files. it also does conversions. main character energy, fr fr π
β¨ SYNOPSIS β¨
osmium cat [OPTIONS] OSM-FILE...
π¦ DESCRIPTION π¦
So what this does: it concatenates all your input files and writes the result to the output file. That's it. The data is not sorted in any way β it's strictly copied from input to output, no editorializing, no rearranging, nothing. it just vibes the bytes across π
Because this program supports several different input and output formats, you can use it to convert OSM files from one format into another. free conversion, no cap.
This command reads its input file(s) 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. stream queen π
β οΈ Usually this is not the right command to merge two or more typical OSM files β see osmium merge for that. don't be out here cat-ing when you should be merging, bestie π
π OPTIONS π
-c,--clean=ATTRβ Clean the attribute from the data before writing it out again. The attribute options are:version,timestamp,changeset,uid,user. The attribute will be set to0(and the user will be set to the empty string). You can give this option multiple times π Depending on the output format these attributes might show up as0or not show up at all.-t,--object-type=TYPEβ Read only objects of the given type. Valid types arenode,way,relation,changeset. By default all types are read. This option can be given multiple times. slay, filter away β¨--buffer-dataβ Read all input files into memory and only then write out all the data. This will need a lot of memory and is usually slower than a normal copy. Used for timing the reading and writing phase separately. it's giving "why would you do this" but okay, sometimes you need the receipts π§
π COMMON OPTIONS π
-h,--helpβ Show usage help. the classic.-v,--verboseβ Set verbose mode. The program will output information about what it is doing toSTDERR. nosy but make it useful π--progressβ Show progress bar. Usually a progress bar is only displayed ifSTDOUTandSTDERRare detected to be TTY. With this option a progress bar is always shown. Note that a progress bar will never be shown when reading fromSTDINor a pipe. π--no-progressβ Do not show progress bar. Usually a progress bar is displayed ifSTDOUTandSTDERRare detected to be a TTY. With this option the progress bar is suppressed. Note that a progress bar will never be shown when reading fromSTDINor a pipe. the yin to the other one's yang π
πΈ 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. one format to rule them all π
π 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. your data, safely on disk, periodt πΎ--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 isosmium/and the version of osmium.-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. it's protective, we love that for it π«Ά--output-header=OPTION=VALUEβ Add output header option. This command line option can be used multiple times for differentOPTIONs. See theosmium-output-headers(5)man page for a list of available header options. For some commands you can use the special formatOPTION!(ie. an exclamation mark after theOPTIONand no value set) to set the value to the same as in the input file. copy-paste but make it legal β¨
π₯ DIAGNOSTICS π₯
osmium cat exits with exit code:
0β if everything went alright π1β if there was an error processing the data π2β if there was a problem with the command line arguments π
π§ MEMORY USAGE π§
osmium cat does all its work on the fly and doesn't keep much data in main memory. low memory footprint, high key iconic π
β EXAMPLES β
Convert a PBF file to a compressed XML file:
osmium cat -o out.osm.bz2 in.osm.pbf
Concatenate all change files in the changes directory into one:
osmium cat -o all-changes.osc.gz changes/*.osc.gz
Copy nodes and ways from source to destination file:
osmium cat -o dest.osm.pbf source.osm.pbf -t node -t way
Remove changeset, uid, and user from a file to protect personal data:
osmium cat -c changeset -c uid -c user -o cleaned.osm.pbf data.osm.pbf
π¦ SEE ALSO π¦
osmium(1),osmium-file-formats(5),osmium-merge(1),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.
fr fr, no warranty. use responsibly bestie π
π CONTACT π
If you have any questions or want to report a bug, please go to https://osmcode.org/contact.html
π AUTHORS π
Jochen Topf <jochen@topf.org>.
and that's the whole page, bestie β¨ this was osmium-cat, version 1.19.1 β go stream some OSM files, you've got this π π«Ά
π¦ 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