OSMIUM-FILE-FORMATS(5) | OSMIUM-FILE-FORMATS(5) |
osmium-file-formats - OSM file formats known to Osmium
OSM uses three types of files for its main data:
All these files have in common that they contain OSM objects (nodes, ways, and relations). History files and change files can contain several versions of the same object and also deleted objects, data files can’t.
Where possible, Osmium commands can handle all file types. For some commands only some file types make sense.
The osmium command line tool supports all major OSM file formats plus some more. These are:
In addition files in all formats except PBF can be compressed using gzip or bzip2. (Add .gz or .bz2 suffixes, respectively.)
Which format a file has is usually autodetected from the file name suffix.
If this doesn’t work, either because you are reading from STDIN or writing to STDOUT, or because you have an unusual file name, you have to set the format manually. You can also set the format manually if you want to specify special format options.
Most osmium commands support the --input-format/-F and --output-format/-f options to set the format. They take a comma-separated list of arguments, the first is the format, further arguments set additional options.
The following options can be added when writing OSM files:
Here are some examples:
Copyright (C) 2013-2021 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.
If you have any questions or want to report a bug, please go to https://osmcode.org/contact.html
Jochen Topf <jochen@topf.org>.
1.13.1 |