Exemplo n.º 1
0
    def comparelocalraster(self, testname):
        if not self.GENERATE_BASELINE_DATA:
            golden = gdal.Open(self.inputdir + testname + ".tif")
            test = gdal.Open(self.outputdir + testname + ".tif")

            # compare as GDAL Datasets.
            gdaltest.compare_db(self, golden, test)
Exemplo n.º 2
0
    def comparelocalraster(self, testname):
        if not self.GENERATE_BASELINE_DATA:
            golden = gdal.Open(self.inputdir + testname + ".tif")
            test = gdal.Open(self.outputdir + testname + ".tif")

            # compare as GDAL Datasets.
            gdaltest.compare_db(self, golden, test)
Exemplo n.º 3
0
    def compareraster(self, raster, testname, nodata=-9999):
        if self.GENERATE_BASELINE_DATA:
            self.saveraster(raster, testname, nodata)
        else:
            # jvm = self.gateway.jvm
            # test = raster.mapop.toDataset(False)

            testimage = self.outputdir + testname
            raster.export(testimage, singleFile=True, format="tiff", overridenodata=nodata)
            testimage += ".tif"
            test = gdal.Open(testimage)

            golden = gdal.Open(self.inputdir + testname + ".tif")

            # compare as GDAL Datasets.
            gdaltest.compare_db(self, golden, test)

            os.remove(testimage)
Exemplo n.º 4
0
    def compareraster(self, raster, testname):
        if self.GENERATE_BASELINE_DATA:
            self.saveraster(raster, testname)
        else:
            # jvm = self.gateway.jvm
            # test = raster.mapop.toDataset(False)

            testimage = self.outputdir + "testimage"
            raster.export(testimage,
                          singleFile=True,
                          format="tiff",
                          overridenodata=-9999)
            testimage += ".tif"
            test = gdal.Open(testimage)

            golden = gdal.Open(self.inputdir + testname + ".tif")

            # compare as GDAL Datasets.
            gdaltest.compare_db(self, golden, test)

            os.remove(testimage)