Пример #1
0
    def test_warped_vrt(self):
        warped_vrt.warp_vrt(self.directory)
        shapes = []
        dirs = [
            _ for _ in os.listdir(self.directory) if not _.endswith('.txt')
        ]
        for d in dirs:
            lst = [
                _ for _ in os.listdir(os.path.join(self.directory, d))
                if _.endswith('.TIF')
            ]
            for l in lst:
                tif = os.path.join(self.directory, d, l)
                with rasopen(tif, 'r') as src:
                    shapes.append(src.shape)

        shutil.rmtree(self.directory)
        self.assertEqual(shapes[0], shapes[1])
Пример #2
0
 def warp_vrt(self):
     warp_vrt(self.root,
              delete_extra=False,
              use_band_map=False,
              remove_bqa=True)