1OSMIUM-DIFF(1)                                                  OSMIUM-DIFF(1)
2
3
4

NAME

6       osmium-diff - display differences between OSM files
7

SYNOPSIS

9       osmium diff [OPTIONS] OSM-FILE1 OSM-FILE2
10

DESCRIPTION

12       Finds  all  differences  between two OSM files and displays them.  This
13       command compares all attributes of all objects, so it will  even  find,
14       say,  differences  in  the user name or even the order of tags, differ‐
15       ences that should not happen in normal OSM data unless there is also  a
16       different object version.
17
18       Only  differences between objects (node, ways, and relations) are found
19       and displayed.  Headers are ignored.
20
21       Objects in both input files must be sorted in the same order.
22
23       Several output formats are supported, see the OUTPUT FORMATS section.
24
25       This command is intended for displaying the differences  between  files
26       to humans.  It can not be used to create an OSM change file (.osc), use
27       osmium-derive-changes for that.
28

OUTPUT FORMATS

30       The following output formats are supported and  can  be  set  with  the
31       –output-format or -f options.  Default is the compact format.
32
33       compact
34              A  very  compact format.  For all objects a line is printed with
35              the type of object (`n', `w', or `r'), the object  ID  and  then
36              the  version  number.   If  objects appear in both files and are
37              identical they are preceded by a space (`') character,  if  they
38              are in both files, but different, they are preceded by an aster‐
39              isk ('*`). Otherwise they get a minus ('-`) or plus ('+')  char‐
40              acter  to  show  that they are only in the first or second file,
41              respectively.
42
43       opl    The usual OPL format with all  lines  preceded  by  space  (`'),
44              minus  (`-'),  or plus (`+') characters depending on whether the
45              object is in both, the first, or the second file.
46
47       debug  The usual debug format with all lines preceded  by  space  (`'),
48              minus  (`-'),  or plus (`+') characters depending on whether the
49              object is in both, the first, or the second file.  Color support
50              can be enabled (`debug,color').
51
52       None of the output formats print the headers of the input files.
53

OPTIONS

55       -c, –suppress-common
56              Do not output objects that are the same in both files.
57
58       -f, –output-format=FORMAT
59              See the OUTPUT FORMATS section.
60
61       -o, –output=FILE
62              Name of the output file.  Default is `-' (STDOUT).
63
64       -O, –overwrite
65              Allow  an  existing  output  file  to  be overwritten.  Normally
66              osmium will refuse to write over an existing file.
67
68       -q, –quiet
69              No output.  Just report when files  differ  through  the  return
70              code.
71
72       -s, –summary
73              Print count of objects that are only in the left or right files,
74              or the same in both or different in both to STDERR.
75
76       -t, –object-type=TYPE
77              Read only objects of  given  type  (node,  way,  relation).   By
78              default  all  types are read.  This option can be given multiple
79              times.  This affects the output as well as the  return  code  of
80              the command.
81

COMMON OPTIONS

83       -h, –help
84              Show usage help.
85
86       -v, –verbose
87              Set  verbose  mode.   The  program will output information about
88              what it is doing to STDERR.
89
90       –progress
91              Show progress bar.  Usually a progress bar is only displayed  if
92              STDOUT  and  STDERR  are detected to be TTY.  With this option a
93              progress bar is always shown.  Note that  a  progress  bar  will
94              never be shown when reading from STDIN or a pipe.
95
96       –no-progress
97              Do  not  show progress bar.  Usually a progress bar is displayed
98              if STDOUT and STDERR are detected to be a TTY.  With this option
99              the  progress  bar is suppressed.  Note that a progress bar will
100              never be shown when reading from STDIN or a pipe.
101

INPUT OPTIONS

103       -F, –input-format=FORMAT
104              The format of the input file(s).  Can be used to set  the  input
105              format  if it can't be autodetected from the file name(s).  This
106              will set the format for all input files, there is no way to  set
107              the  format  for  some  input  files only.  See osmium-file-for‐
108              mats(5) or the libosmium manual for details.
109

DIAGNOSTICS

111       osmium diff exits with exit code
112
113       0      if the files are the same,
114
115       1      if the files are different, or
116
117       2      if there was an error
118

MEMORY USAGE

120       osmium diff doesn't keep a lot of data in memory.
121

EXAMPLES

123       Show difference between Nepal files from January 2016 and Febrary  2016
124       in compact format:
125
126              osmium diff nepal-20160101.osm.pbf nepal-20160201.osm.pbf
127
128       Show in color debug format only those objects that are different:
129
130              osmium diff nepal-20160101.osm.pbf nepal-20160201.osm.pbf -f debug,color -c
131

SEE ALSO

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

CONTACT

146       If you have any questions or  want  to  report  a  bug,  please  go  to
147       https://osmcode.org/contact.html
148

AUTHORS

150       Jochen Topf <jochen@topf.org>.
151
152
153
154                                    1.10.0                      OSMIUM-DIFF(1)
Impressum