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

NAME

6       osmium-derive-changes - create OSM change files from two OSM data files
7

SYNOPSIS

9       osmium derive-changes [OPTIONS] OSM-FILE1 OSM-FILE2
10

DESCRIPTION

12       Finds  differences between two OSM files and creates a change file with
13       those differences.  The resulting change file is created in a way, that
14       it could be applied on OSM-FILE1 to re-create OSM-FILE2.
15
16       Objects  in  both  input files must be sorted by type, ID, and version.
17       The first input file must be from a point in  time  before  the  second
18       input file.
19
20       Only  object  type,  id, and version are compared, so this program will
21       not detect differences in, say, the tags, unless the object has  a  new
22       version,  which  is  the normal way things work in OSM.  If you need to
23       compare all data in OSM files, have a look at the osmium diff program.
24
25       For this command to create a proper change file you  have  to  set  the
26       –output  option or –output-format option in a way that it will generate
27       an .osc file, typically by using something like `-o  out.osc.gz'.   You
28       can  create any other OSM file format, but that is usually not what you
29       want.  Osmium derive-changes will warn you in this case.
30
31       Note that for objects  that  are  in  OSM-FILE1  but  not  OSM-FILE2  a
32       “deleted”  entry will be created in the output.  But because we can not
33       know when this deletion actually occurred, in which changeset,  and  by
34       which  user,  it  is unclear what attributes this deleted object should
35       have.  Also, if you are working with extracts,  the  object  might  not
36       actually  have  been deleted in the OSM database, but just moved out of
37       the extract you are looking at.  So a real, new, “deleted” version  was
38       never  created.  Usually the “deleted” object will get the same version
39       number and timestamp as the object in OSM-FILE1 had, all other informa‐
40       tion  will  be  removed.   But  you  can  change this using the –incre‐
41       ment-version, –keep-details, and –update-timestamp options.   Depending
42       on  which  software you are using the change files with, different set‐
43       tings might be necessary.
44
45       This commands reads its input files only once  and  writes  its  output
46       file  in  one go so it can be streamed, ie.  it can read from STDIN and
47       write to STDOUT.
48

OPTIONS

50       –increment-version
51              Increment version number of deleted objects.
52
53       –keep-details
54              Keep details of deleted objects.  Usually only id, version,  and
55              timestamp  are  kept.  If this option is set all attributes, all
56              tags, and all nodes or members for ways and  relations,  respec‐
57              tively, are kept.
58
59       –update-timestamp
60              Update  timestamp  of deleted objects to the current time.  This
61              is the same behaviour as Osmosis.
62

COMMON OPTIONS

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

INPUT OPTIONS

84       -F, –input-format=FORMAT
85              The  format  of the input file(s).  Can be used to set the input
86              format if it can't be autodetected from the file name(s).   This
87              will  set the format for all input files, there is no way to set
88              the format for some  input  files  only.   See  osmium-file-for‐
89              mats(5) or the libosmium manual for details.
90

OUTPUT OPTIONS

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

DIAGNOSTICS

119       osmium derive-changes exits with exit code
120
121       0      if everything went alright,
122
123       1      if there was an error processing the data, or
124
125       2      if there was a problem with the command line arguments.
126

MEMORY USAGE

128       osmium derive-changes doesn't keep a lot of data in memory.
129

EXAMPLES

131       Find changes in Nepal extract in January 2016:
132
133              osmium derive-changes nepal-20160101.osm.pbf nepal-20160201.osm.pbf -o nepal-jan.osc.bz2
134

SEE ALSO

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

CONTACT

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

AUTHORS

154       Jochen Topf <jochen@topf.org>.
155
156
157
158                                    1.10.0            OSMIUM-DERIVE-CHANGES(1)
Impressum