1GDALCOMPARE(1)                       GDAL                       GDALCOMPARE(1)
2
3
4

NAME

6       gdalcompare -  Compare two images.
7

SYNOPSIS

9          gdalcompare.py [-sds] golden_file new_file
10

DESCRIPTION

12       The  gdalcompare.py script compares two GDAL supported datasets and re‐
13       ports the differences. In addition  to  reporting  differences  to  the
14       standard output the script will also return the difference count in its
15       exit value.
16
17       Image pixels, and various metadata are checked. There is also a byte by
18       byte  comparison  done  which will count as one difference. So if it is
19       only important that the GDAL visible data  is  identical  a  difference
20       count of 1 (the binary difference) should be considered acceptable.
21
22       -sds   If  this  flag is passed the script will compare all subdatasets
23              that are part of the dataset, otherwise subdatasets are ignored.
24
25       <golden_file>
26              The file that is considered correct, referred to as  the  golden
27              file.
28
29       <new_file>
30              The  file  being compared to the golden file, referred to as the
31              new file.
32
33       Note that the gdalcompare.py script (like all the  other  scripts)  can
34       also  be  called as a library from python code: from osgeo_utils import
35       gdalcompare.  The primary entry point is gdalcompare.compare_db() which
36       takes a golden gdal.Dataset and a new gdal.Dataset as arguments and re‐
37       turns a difference count (excluding the binary comparison).  The  gdal‐
38       compare.compare_sds() entry point can be used to compare subdatasets.
39

AUTHOR

41       Frank Warmerdam <warmerdam@pobox.com>
42
44       1998-2023
45
46
47
48
49                                 Oct 30, 2023                   GDALCOMPARE(1)
Impressum