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/-H 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-locations-to-
41              ways.   See  there  for  details on the format.  Can not be used
42              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 osmium-file-
93              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
103              Call  fsync after writing the output file to force flushing buf‐
104              fers to disk.
105
106       --generator=NAME
107              The name and version of the program generating the output  file.
108              It  will  be added to the header of the output file.  Default is
109osmium/” and the version of osmium.
110
111       -o, --output=FILE
112              Name of the output file.  Default is `-' (STDOUT).
113
114       -O, --overwrite
115              Allow an existing  output  file  to  be  overwritten.   Normally
116              osmium will refuse to write over an existing file.
117
118       --output-header=OPTION=VALUE
119              Add  output header option.  This command line option can be used
120              multiple times for different OPTIONs.  See the libosmium  manual
121              for  a  list of available header options.  For some commands you
122              can use the special format “OPTION!” (ie.  an  exclamation  mark
123              after  the OPTION and no value set) to set the value to the same
124              as in the input file.
125

DIAGNOSTICS

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

MEMORY USAGE

136       osmium apply-changes keeps the contents of all the change files in main
137       memory.   This  will  take roughly 10 times as much memory as the files
138       take on disk in .osm.bz2 format.
139

EXAMPLES

141       Apply changes  in  362.osc.gz  to  planet  file  and  write  result  to
142       new.osm.pbf:
143
144              osmium apply-changes --output=new.osm.pbf planet.osm.pbf 362.osc.gz
145

SEE ALSO

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

CONTACT

161       If  you  have  any  questions  or  want  to  report a bug, please go to
162       https://osmcode.org/contact.html
163

AUTHORS

165       Jochen Topf <jochen@topf.org>.
166
167
168
169                                    1.12.1             OSMIUM-APPLY-CHANGES(1)
Impressum