1OSMIUM-CAT(1)                                                    OSMIUM-CAT(1)
2
3
4

NAME

6       osmium-cat - concatenate OSM files and convert to different formats
7

SYNOPSIS

9       osmium cat [OPTIONS] OSM-FILE...
10

DESCRIPTION

12       Concatenates  all input files and writes the result to the output file.
13       The data is not sorted in any way but strictly  copied  from  input  to
14       output.
15
16       Because  this  program supports several different input and output for‐
17       mats, it can be used to convert OSM files from one format into another.
18
19       This commands reads its input file(s) only once and writes  its  output
20       file  in  one go so it can be streamed, ie.  it can read from STDIN and
21       write to STDOUT.
22
23       Usually this is not the right command to merge two or more typical  OSM
24       files, see osmium merge for that.
25

OPTIONS

27       -c, --clean=ATTR
28              Clean  the attribute (version, timestamp, changeset, uid, user),
29              from the data before writing it out again.  The  attribute  will
30              be  set  to  0 (the user will be set to the empty string).  This
31              option can be given multiple times.   Depending  on  the  output
32              format  these  attributes  might  show up as 0 or not show up at
33              all.
34
35       -t, --object-type=TYPE
36              Read only objects of given type (node,  way,  relation,  change‐
37              set).   By default all types are read.  This option can be given
38              multiple times.
39

COMMON OPTIONS

41       -h, --help
42              Show usage help.
43
44       -v, --verbose
45              Set verbose mode.  The program  will  output  information  about
46              what it is doing to STDERR.
47
48       --progress
49              Show  progress bar.  Usually a progress bar is only displayed if
50              STDOUT and STDERR are detected to be TTY.  With  this  option  a
51              progress  bar  is  always  shown.  Note that a progress bar will
52              never be shown when reading from STDIN or a pipe.
53
54       --no-progress
55              Do not show progress bar.  Usually a progress bar  is  displayed
56              if STDOUT and STDERR are detected to be a TTY.  With this option
57              the progress bar is suppressed.  Note that a progress  bar  will
58              never be shown when reading from STDIN or a pipe.
59

INPUT OPTIONS

61       -F, --input-format=FORMAT
62              The  format  of the input file(s).  Can be used to set the input
63              format if it can’t be autodetected from the file name(s).   This
64              will  set the format for all input files, there is no way to set
65              the format for some  input  files  only.   See  osmium-file-for‐
66              mats(5) or the libosmium manual for details.
67

OUTPUT OPTIONS

69       -f, --output-format=FORMAT
70              The  format  of  the output file.  Can be used to set the output
71              file format if it can’t be autodetected  from  the  output  file
72              name.   See  osmium-file-formats(5)  or the libosmium manual for
73              details.
74
75       --fsync
76              Call fsync after writing the output file to force flushing  buf‐
77              fers to disk.
78
79       --generator=NAME
80              The  name and version of the program generating the output file.
81              It will be added to the header of the output file.   Default  is
82osmium/” and the version of osmium.
83
84       -o, --output=FILE
85              Name of the output file.  Default is `-' (STDOUT).
86
87       -O, --overwrite
88              Allow  an  existing output file to be overwritten.  Normally os‐
89              mium will refuse to write over an existing file.
90
91       --output-header=OPTION=VALUE
92              Add output header option.  This command line option can be  used
93              multiple  times for different OPTIONs.  See the libosmium manual
94              for a list of available header options.  For some  commands  you
95              can  use  the special format “OPTION!” (ie.  an exclamation mark
96              after the OPTION and no value set) to set the value to the  same
97              as in the input file.
98

DIAGNOSTICS

100       osmium cat exits with exit code
101
102       0      if everything went alright,
103
104       1      if there was an error processing the data, or
105
106       2      if there was a problem with the command line arguments.
107

MEMORY USAGE

109       osmium  cat  does all its work on the fly and doesn’t keep much data in
110       main memory.
111

EXAMPLES

113       Convert a PBF file to a compressed XML file:
114
115              osmium cat -o out.osm.bz2 in.osm.pbf
116
117       Concatenate all change files in the `changes' directory into one:
118
119              osmium cat -o all-changes.osc.gz changes/*.osc.gz
120
121       Copy nodes and ways from source to destination file:
122
123              osmium cat -o dest.osm.pbf source.osm.pbf -t node -t way
124
125       Remove changeset, uid, and user from a file to protect personal data:
126
127              osmium cat -c changeset -c uid -c user -o cleaned.osm.pbf data.osm.pbf
128

SEE ALSO

130osmium(1), osmium-file-formats(5), osmium-merge(1)
131
132       • Osmium website (https://osmcode.org/osmium-tool/)
133
135       Copyright (C) 2013-2021 Jochen Topf <jochen@topf.org>.
136
137       License  GPLv3+:  GNU  GPL  version  3  or  later  <https://gnu.org/li
138       censes/gpl.html>.   This  is  free software: you are free to change and
139       redistribute it.  There is NO WARRANTY, to the extent permitted by law.
140

CONTACT

142       If you have any questions or  want  to  report  a  bug,  please  go  to
143       https://osmcode.org/contact.html
144

AUTHORS

146       Jochen Topf <jochen@topf.org>.
147
148
149
150                                    1.13.1                       OSMIUM-CAT(1)
Impressum