1OSMIUM-MERGE-CHANGES(1) OSMIUM-MERGE-CHANGES(1)
2
3
4
6 osmium-merge-changes - merge several OSM change files into one
7
9 osmium merge-changes [OPTIONS] OSM-CHANGE-FILE...
10
12 Merges the content of all change files given on the command line into
13 one large change file.
14
15 Objects are sorted by type, ID, version, and timestamp so it doesn’t
16 matter in what order the change files are given or in what order they
17 contain the data. (If you are using change files of extracts this is
18 not necessarily true and you must specify the change files on the com‐
19 mand line in the correct order from oldest to newest. This is because
20 change files from extracts can contain multiple different object ver‐
21 sions with the same version and timestamp!)
22
23 This commands reads its input file(s) only once and writes its output
24 file in one go so it can be streamed, ie. it can read from STDIN and
25 write to STDOUT.
26
28 -s, --simplify
29 Only write the last version of any object to the output. For an
30 object created in one of the change files and removed in a later
31 one, the deleted version of the object will still appear because
32 it is the latest version.
33
35 -h, --help
36 Show usage help.
37
38 -v, --verbose
39 Set verbose mode. The program will output information about
40 what it is doing to STDERR.
41
42 --progress
43 Show progress bar. Usually a progress bar is only displayed if
44 STDOUT and STDERR are detected to be TTY. With this option a
45 progress bar is always shown. Note that a progress bar will
46 never be shown when reading from STDIN or a pipe.
47
48 --no-progress
49 Do not show progress bar. Usually a progress bar is displayed
50 if STDOUT and STDERR are detected to be a TTY. With this option
51 the progress bar is suppressed. Note that a progress bar will
52 never be shown when reading from STDIN or a pipe.
53
55 -F, --input-format=FORMAT
56 The format of the input file(s). Can be used to set the input
57 format if it can’t be autodetected from the file name(s). This
58 will set the format for all input files, there is no way to set
59 the format for some input files only. See osmium-file-for‐
60 mats(5) or the libosmium manual for details.
61
63 -f, --output-format=FORMAT
64 The format of the output file. Can be used to set the output
65 file format if it can’t be autodetected from the output file
66 name. See osmium-file-formats(5) or the libosmium manual for
67 details.
68
69 --fsync
70 Call fsync after writing the output file to force flushing buf‐
71 fers to disk.
72
73 --generator=NAME
74 The name and version of the program generating the output file.
75 It will be added to the header of the output file. Default is
76 “osmium/” and the version of osmium.
77
78 -o, --output=FILE
79 Name of the output file. Default is `-' (STDOUT).
80
81 -O, --overwrite
82 Allow an existing output file to be overwritten. Normally os‐
83 mium will refuse to write over an existing file.
84
85 --output-header=OPTION=VALUE
86 Add output header option. This command line option can be used
87 multiple times for different OPTIONs. See the osmium-output-
88 headers(5) man page for a list of available header options. For
89 some commands you can use the special format “OPTION!” (ie. an
90 exclamation mark after the OPTION and no value set) to set the
91 value to the same as in the input file.
92
94 osmium merge-changes exits with exit code
95
96 0 if everything went alright,
97
98 1 if there was an error processing the data, or
99
100 2 if there was a problem with the command line arguments.
101
103 osmium merge-changes keeps the contents of all the change files in main
104 memory. This will take roughly 10 times as much memory as the files
105 take on disk in .osm.bz2 format.
106
108 Merge all changes in changes directory into all.osc.gz:
109
110 osmium merge-changes -o all.osc.gz changes/*.gz
111
112 Because osmium merge-changes sorts its input, you can also use it to
113 sort just a single change file:
114
115 osmium merge-changes unsorted.osc.gz -o sorted.osc.gz
116
118 • osmium(1), osmium-file-formats(5), osmium-output-headers(5), osmium-
119 merge(1)
120
121 • Osmium website (https://osmcode.org/osmium-tool/)
122
124 Copyright (C) 2013-2023 Jochen Topf <jochen@topf.org>.
125
126 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/li‐
127 censes/gpl.html>. This is free software: you are free to change and
128 redistribute it. There is NO WARRANTY, to the extent permitted by law.
129
131 If you have any questions or want to report a bug, please go to
132 https://osmcode.org/contact.html
133
135 Jochen Topf <jochen@topf.org>.
136
137
138
139 1.16.0 OSMIUM-MERGE-CHANGES(1)