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 to 0 (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 as 0 or not show up at all.
  • -t, --object-type=TYPE β€” Read only objects of the given type. Valid types are node, 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 to STDERR. nosy but make it useful πŸ’€
  • --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 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. See osmium-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. See osmium-file-formats(5) or the libosmium manual for details.
  • --fsync β€” Call fsync after 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 is osmium/ 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 different OPTIONs. See the osmium-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 legal ✨

πŸ”₯ DIAGNOSTICS πŸ”₯

osmium cat exits with exit code:

  1. 0 β€” if everything went alright πŸŽ‰
  2. 1 β€” if there was an error processing the data 😭
  3. 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 πŸ¦‹


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