.TH "OSMIUM-DIFF" "1" "1.5.1" "" "" .SH NAME .PP osmium\-diff \- display differences between OSM files .SH SYNOPSIS .PP \f[B]osmium diff\f[] [\f[I]OPTIONS\f[]] \f[I]OSM\-FILE1\f[] \f[I]OSM\-FILE2\f[] .SH DESCRIPTION .PP Finds differences between two OSM files and displays them. .PP Only differences between objects (node, ways, and relations) are found and displayed. Headers are ignored. .PP Objects in both input files must be sorted in the same order. .PP Several output formats are supported, see the \f[B]OUTPUT FORMATS\f[] section. .PP This command is intended for displaying the differences between files to humans. It can not be used to create an OSM change file (\f[C]\&.osc\f[]), use \f[B]osmium\-derive\-changes\f[] for that. .SH OUTPUT FORMATS .PP The following output formats are supported and can be set with the \f[B]\-\-output\-format\f[] or \f[B]\-f\f[] options. Default is the compact format. .TP .B compact A very compact format. For all objects a line is printed with the type of object (\[aq]n\[aq], \[aq]w\[aq], or \[aq]r\[aq]), the object ID and then the version number. If objects appear in both files and are identical they are preceded by a space (\[aq] \[aq]) character, if they are in both files, but different, they are preceded by an asterisk (\[aq]*\[aq]). Otherwise they get a minus (\[aq]\-\[aq]) or plus (\[aq]+\[aq]) character to show that they are only in the first or second file, respectively. .RS .RE .TP .B opl The usual OPL format with all lines preceded by space (\[aq] \[aq]), minus (\[aq]\-\[aq]), or plus (\[aq]+\[aq]) characters depending on whether the object is in both, the first, or the second file. .RS .RE .TP .B debug The usual debug format with all lines preceded by space (\[aq] \[aq]), minus (\[aq]\-\[aq]), or plus (\[aq]+\[aq]) characters depending on whether the object is in both, the first, or the second file. Color support can be enabled (\[aq]debug,color\[aq]). .RS .RE .PP None of the output formats print the headers of the input files. .SH OPTIONS .TP .B \-c, \-\-suppress\-common Do not output objects that are the same in both files. .RS .RE .TP .B \-f, \-\-output\-format=FORMAT See the \f[B]OUTPUT FORMATS\f[] section. .RS .RE .TP .B \-o, \-\-output=FILE Name of the output file. Default is \[aq]\-\[aq] (STDOUT). .RS .RE .TP .B \-O, \-\-overwrite Allow an existing output file to be overwritten. Normally \f[B]osmium\f[] will refuse to write over an existing file. .RS .RE .TP .B \-q, \-\-quiet No output. Just report when files differ through the return code. .RS .RE .TP .B \-s, \-\-summary Print count of objects that are only in the left or right files, or the same in both or different in both to \f[I]stderr\f[]. .RS .RE .TP .B \-t, \-\-object\-type=TYPE Read only objects of given type (\f[I]node\f[], \f[I]way\f[], \f[I]relation\f[]). By default all types are read. This option can be given multiple times. This affects the output as well as the return code of the command. .RS .RE .SH COMMON OPTIONS .TP .B \-h, \-\-help Show usage help. .RS .RE .TP .B \-v, \-\-verbose Set verbose mode. The program will output information about what it is doing to \f[I]stderr\f[]. .RS .RE .SH INPUT OPTIONS .TP .B \-F, \-\-input\-format=FORMAT The format of the input file(s). Can be used to set the input format if it can\[aq]t be autodetected from the file name(s). This will set the format for all input files, there is no way to set the format for some input files only. See \f[B]osmium\-file\-formats\f[](5) or the libosmium manual for details. .RS .RE .SH DIAGNOSTICS .PP \f[B]osmium diff\f[] exits with exit code .TP .B 0 if the files are the same, .RS .RE .TP .B 1 if the files are different, or .RS .RE .TP .B 2 if there was an error .RS .RE .SH MEMORY USAGE .PP \f[B]osmium diff\f[] doesn\[aq]t keep a lot of data in memory. .SH EXAMPLES .PP Show difference between Nepal files from January 2016 and Febrary 2016 in compact format: .IP .nf \f[C] osmium\ diff\ nepal\-20160101.osm.pbf\ nepal\-20160201.osm.pbf \f[] .fi .PP Show in color debug format only those objects that are different: .IP .nf \f[C] osmium\ diff\ nepal\-20160101.osm.pbf\ nepal\-20160201.osm.pbf\ \-f\ debug,color\ \-c \f[] .fi .SH SEE ALSO .IP \[bu] 2 \f[B]osmium\f[](1), \f[B]osmium\-file\-formats\f[](5), \f[B]osmium\-derive\-changes\f[](1) .IP \[bu] 2 Osmium website (http://osmcode.org/osmium-tool/) .SH COPYRIGHT .PP Copyright (C) 2013\-2017 Jochen Topf . License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH CONTACT .PP If you have any questions or want to report a bug, please go to http://osmcode.org/contact.html .SH AUTHORS Jochen Topf .