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
40       --buffer-data
41              Read all input files into memory and only then write out all the
42              data.  This will need a lot of memory and is usually slower than
43              a normal copy.  Used for timing the reading  and  writing  phase
44              separately.
45

COMMON OPTIONS

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

INPUT OPTIONS

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

OUTPUT OPTIONS

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

DIAGNOSTICS

106       osmium cat exits with exit code
107
108       0      if everything went alright,
109
110       1      if there was an error processing the data, or
111
112       2      if there was a problem with the command line arguments.
113

MEMORY USAGE

115       osmium cat does all its work on the fly and doesn’t keep much  data  in
116       main memory.
117

EXAMPLES

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

SEE ALSO

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

CONTACT

149       If you have any questions or  want  to  report  a  bug,  please  go  to
150       https://osmcode.org/contact.html
151

AUTHORS

153       Jochen Topf <jochen@topf.org>.
154
155
156
157                                    1.16.0                       OSMIUM-CAT(1)
Impressum