.\" Man page generated from reStructuredText. . .TH "GDALCOMPARE" "1" "Mar 05, 2021" "" "GDAL" .SH NAME gdalcompare \- Compare two images. . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C gdalcompare.py [\-sds] golden_file new_file .ft P .fi .UNINDENT .UNINDENT .SH DESCRIPTION .sp The \fBgdalcompare.py\fP script compares two GDAL supported datasets and reports the differences. In addition to reporting differences to the standard output the script will also return the difference count in its exit value. .sp Image pixels, and various metadata are checked. There is also a byte by byte comparison done which will count as one difference. So if it is only important that the GDAL visible data is identical a difference count of 1 (the binary difference) should be considered acceptable. .INDENT 0.0 .TP .B \-sds If this flag is passed the script will compare all subdatasets that are part of the dataset, otherwise subdatasets are ignored. .UNINDENT .INDENT 0.0 .TP .B The file that is considered correct, referred to as the golden file. .UNINDENT .INDENT 0.0 .TP .B The file being compared to the golden file, referred to as the new file. .UNINDENT .sp Note that the \fBgdalcompare.py\fP script can also be called as a library from python code though it is not typically in the python path for including. The primary entry point is \fIgdalcompare.compare()\fP which takes a golden \fIgdal.Dataset\fP and a new \fIgdal.Dataset\fP as arguments and returns a difference count (excluding the binary comparison). The \fIgdalcompare.compare_sds()\fP entry point can be used to compare subdatasets. .SH AUTHOR Frank Warmerdam .SH COPYRIGHT 1998-2021 .\" Generated by docutils manpage writer. .