.TH "OSMIUM-FILE-FORMATS" "5" "1.6.1" "" "" .SH NAME .PP osmium\-file\-formats \- OSM file formats known to Osmium .SH FORMATS .PP The \f[B]osmium\f[] command line tool supports all file formats supported by the Osmium library. These are: .IP \[bu] 2 The classical XML format in the variants \f[I]\&.osm\f[] (for data files), \f[I]\&.osh\f[] (for data files with history) and \f[I]\&.osc\f[] (for change files). .IP \[bu] 2 The PBF binary format (usually with suffix \f[I]\&.osm.pbf\f[]). .IP \[bu] 2 The OPL format (usually with suffix \f[I]\&.osm.opl\f[]). .IP \[bu] 2 The O5M/O5C format (usually with suffix \f[I]\&.o5m\f[] or \f[I]\&.o5c\f[]) (reading only). .IP \[bu] 2 The "debug" format (usually with suffix \f[I]\&.osm.debug\f[]) (writing only). .PP In addition files in all formats except PBF can be compressed using \f[I]gzip\f[] or \f[I]bzip2\f[]. (Add \f[I]\&.gz\f[] or \f[I]\&.bz2\f[] suffixes, respectively.) .SH AUTODETECTION .PP Which format a file has is usually autodetected from the file name suffix. .PP If this doesn\[aq]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. .PP Most \f[B]osmium\f[] commands support the \f[B]\-\-input\-format\f[] (\f[B]\-\-F\f[]) and \f[B]\-\-output\-format\f[] (\f[B]\-f\f[]) options to set the format. They take a comma\-separated list of arguments, the first is the format, further arguments set additional options. .SH SPECIAL FORMAT OPTIONS .PP The following options can be added when writing OSM files: .TP .B \f[C]xml_change_format\f[]=\f[C]true\f[]/\f[C]false\f[] Enable/disable XML change format. Same as \f[I]\&.osc\f[]. .RS .RE .TP .B \f[C]force_visible_flag\f[]=\f[C]true\f[]/\f[C]false\f[] (\f[I]default: false\f[]) Force writing of visible flag, even for normal OSM XML files. .RS .RE .TP .B \f[C]pbf_dense_nodes\f[]=\f[C]true\f[]/\f[C]false\f[] (\f[I]default: true\f[]) Enable/disable DenseNodes format for PBF files. .RS .RE .TP .B \f[C]pbf_compression\f[]=\f[C]true\f[]/\f[C]false\f[] (\f[I]default: true\f[]) Enable/disable compression in PBF files. Disabling this will make writing files a bit faster, but the resulting files are 2 to 3 times bigger. .RS .RE .TP .B \f[C]add_metadata\f[]=\f[C]true\f[]/\f[C]false\f[] (\f[I]default: true\f[]) Enable/disable writing of object metadata such as changeset id, username, etc. Disabling this will make files a bit smaller. .RS .RE .SH EXAMPLES .PP Here are some examples: .TP .B \f[C]pbf\f[] PBF format. .RS .RE .TP .B \f[C]pbf,add_metadata=false\f[] PBF format, dont\[aq] write metadata .RS .RE .TP .B \f[C]osm.bz2\f[] XML format, compressed with bzip2. .RS .RE .TP .B \f[C]osc.gz\f[] OSM change file, compressed with gzip. .RS .RE .TP .B \f[C]osm.gz,xml_change_format=true\f[] OSM change file, compressed with gzip. .RS .RE .SH SEE ALSO .IP \[bu] 2 \f[B]osmium\f[](1) .IP \[bu] 2 Osmium website (http://osmcode.org/osmium-tool/) .IP \[bu] 2 OSM File Formats Manual (http://osmcode.org/file-formats-manual/) .SH COPYRIGHT .PP Copyright (C) 2013\-2017 Jochen Topf . License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH CONTACT .PP If you have any questions or want to report a bug, please go to http://osmcode.org/contact.html .SH AUTHORS Jochen Topf .