1OSMIUM-APPLY-CHANGES(1)                                OSMIUM-APPLY-CHANGES(1)
2
3
4

NAME

6       osmium-apply-changes - apply OSM change file(s) to OSM data file
7

SYNOPSIS

9       osmium  apply-changes [OPTIONS] OSM-DATA-FILE OSM-CHANGE-FILE... osmium
10       apply-changes [OPTIONS] OSM-HISTORY-FILE OSM-CHANGE-FILE...
11

DESCRIPTION

13       Merges the content of all OSM change files and applies those changes to
14       the OSM data or history file.
15
16       Objects  in  the  data  or history file must be sorted by type, ID, and
17       version.  Objects in change files need not be  sorted,  so  it  doesn't
18       matter  in  what order the change files are given or in what order they
19       contain the data.
20
21       Changes can be applied to normal OSM data files or  OSM  history  files
22       with  this  command.   File  formats will be autodetected from the file
23       name suffixes, see the –with-history option if that doesn't work.
24
25       This commands reads its input file(s) only once and writes  its  output
26       file  in  one go so it can be streamed, ie.  it can read from STDIN and
27       write to STDOUT.
28

OPTIONS

30       -H, –with-history
31              Update an OSM history file (instead of a normal OSM data  file).
32              Both  input  and  output  must be history files.  This option is
33              usually not necessary, because history files  will  be  detected
34              from  their  file  name  suffixes, but if this detection doesn't
35              work, you can force this mode with this option.  Can not be used
36              together with the –locations-on-ways option.
37
38       –locations-on-ways
39              Input has and output should have node locations on ways.  Can be
40              used  to  update   files   created   by   the   osmium-add-loca‐
41              tions-to-ways.  See there for details on the format.  Can not be
42              used together with the –with-history,-H option.
43
44       –redact
45              Redact (patch) history files.  Change files can contain any ver‐
46              sion  of  any  object  which  will  replace that version of that
47              object from the input.  This allows changing the  history!  This
48              mode is for special use only, for instance to remove copyrighted
49              or private data.
50
51       -r, –remove-deleted
52              Deprecated.  Remove deleted objects from the  output.   This  is
53              now  the  default  if  your input file is a normal OSM data file
54              (`.osm').
55
56       -s, –simplify
57              Deprecated.  Only write the last version of any  object  to  the
58              output.   This is now the default if your input file is a normal
59              OSM data file (`.osm').
60

COMMON OPTIONS

62       -h, –help
63              Show usage help.
64
65       -v, –verbose
66              Set verbose mode.  The program  will  output  information  about
67              what it is doing to STDERR.
68
69       –progress
70              Show  progress bar.  Usually a progress bar is only displayed if
71              STDOUT and STDERR are detected to be TTY.  With  this  option  a
72              progress  bar  is  always  shown.  Note that a progress bar will
73              never be shown when reading from STDIN or a pipe.
74
75       –no-progress
76              Do not show progress bar.  Usually a progress bar  is  displayed
77              if STDOUT and STDERR are detected to be a TTY.  With this option
78              the progress bar is suppressed.  Note that a progress  bar  will
79              never be shown when reading from STDIN or a pipe.
80

INPUT OPTIONS

82       -F, –input-format=FORMAT
83              The  format  of  the  OSM-DATA-FILE or OSM-HISTORY-FILE.  Can be
84              used to set the input format if it can't  be  autodetected  from
85              the file name.  See osmium-file-formats(5) or the libosmium man‐
86              ual for details.
87
88       –change-file-format=FORMAT
89              The format of the OSM-CHANGE-FILE(s).  Can be used  to  set  the
90              input  format if it can't be autodetected from the file name(s).
91              This will set the format for all change files, there is  no  way
92              to   set   the   format   for   some  change  files  only.   See
93              osmium-file-formats(5) or the libosmium manual for details.
94

OUTPUT OPTIONS

96       -f, –output-format=FORMAT
97              The format of the output file.  Can be used to  set  the  output
98              file  format  if  it  can't be autodetected from the output file
99              name.  See osmium-file-formats(5) or the  libosmium  manual  for
100              details.
101
102       –fsync Call  fsync after writing the output file to force flushing buf‐
103              fers to disk.
104
105       –generator=NAME
106              The name and version of the program generating the output  file.
107              It  will  be added to the header of the output file.  Default is
108osmium/” and the version of osmium.
109
110       -o, –output=FILE
111              Name of the output file.  Default is `-' (STDOUT).
112
113       -O, –overwrite
114              Allow an existing  output  file  to  be  overwritten.   Normally
115              osmium will refuse to write over an existing file.
116
117       –output-header=OPTION=VALUE
118              Add  output header option.  This command line option can be used
119              multiple times for different OPTIONs.  See the libosmium  manual
120              for a list of available header options.
121

DIAGNOSTICS

123       osmium apply-changes exits with exit code
124
125       0      if everything went alright,
126
127       1      if there was an error processing the data, or
128
129       2      if there was a problem with the command line arguments.
130

MEMORY USAGE

132       osmium apply-changes keeps the contents of all the change files in main
133       memory.  This will take roughly 10 times as much memory  as  the  files
134       take on disk in .osm.bz2 format.
135

EXAMPLES

137       Apply  changes  in  362.osc.gz  to  planet  file  and  write  result to
138       new.osm.pbf:
139
140              osmium apply-changes --output=new.osm.pbf planet.osm.pbf 362.osc.gz
141

SEE ALSO

143       · osmium(1),      osmium-file-formats(5),      osmium-merge-changes(1),
144         osmium-derive-changes(1)
145
146       · Osmium website (https://osmcode.org/osmium-tool/)
147
149       Copyright (C) 2013-2018 Jochen Topf <jochen@topf.org>.
150
151       License      GPLv3+:     GNU     GPL     version     3     or     later
152       <https://gnu.org/licenses/gpl.html>.  This is free  software:  you  are
153       free  to  change  and  redistribute  it.   There is NO WARRANTY, to the
154       extent permitted by law.
155

CONTACT

157       If you have any questions or  want  to  report  a  bug,  please  go  to
158       https://osmcode.org/contact.html
159

AUTHORS

161       Jochen Topf <jochen@topf.org>.
162
163
164
165                                    1.10.0             OSMIUM-APPLY-CHANGES(1)
Impressum