Exemple #1
0
    def test_cogtif_low_res(self):
        low_res = self.create_acq((80, 80), (0, 0))
        expected = {
            "options": {"compress": "deflate", "zlevel": 4, "copy_src_overviews": "yes"},
            "config_options": {},
        }

        results = get_cogtif_options(low_res)
        self.assertEqual(DeepDiff(results, expected), {})
Exemple #2
0
    def test_cogtif_low_res(self):
        low_res = self.create_acq((80, 80), (0, 0))
        expected = {
            'options': {
                'compress': 'deflate',
                'zlevel': 4,
                'copy_src_overviews': 'yes'
            },
            'config_options': {}
        }

        results = get_cogtif_options(low_res)
        self.assertEqual(DeepDiff(results, expected), {})
Exemple #3
0
    def test_cogtif_boundary_res(self):
        low_res = self.create_acq((1024, 512), (512, 512))
        expected = {
            'options': {
                'compress': 'deflate',
                'zlevel': 4,
                'copy_src_overviews': 'yes',
                'blockysize': 512,
                'blockxsize': 256
            },
            'config_options': {}
        }

        results = get_cogtif_options(low_res)
        self.assertEqual(DeepDiff(results, expected), {})
Exemple #4
0
    def test_cogtif_boundary_res(self):
        low_res = self.create_acq((1024, 512), (512, 512))
        expected = {
            "options": {
                "compress": "deflate",
                "zlevel": 4,
                "copy_src_overviews": "yes",
                "blockysize": 512,
                "blockxsize": 256,
            },
            "config_options": {},
        }

        results = get_cogtif_options(low_res)
        self.assertEqual(DeepDiff(results, expected), {})
Exemple #5
0
    def test_cogtif_tiled_res(self):
        low_res = self.create_acq((2048, 2048), (1024, 1024))
        expected = {
            'options': {
                'compress': 'deflate',
                'zlevel': 4,
                'copy_src_overviews': 'yes',
                'blockysize': 1024,
                'blockxsize': 1024,
                'tiled': 'yes'
            },
            'config_options': {}
        }

        results = get_cogtif_options(low_res)
        self.assertEqual(DeepDiff(results, expected), {})
Exemple #6
0
    def test_cogtif_tiled_res(self):
        low_res = self.create_acq((2048, 2048), (1024, 1024))
        expected = {
            "options": {
                "compress": "deflate",
                "zlevel": 4,
                "copy_src_overviews": "yes",
                "blockysize": 1024,
                "blockxsize": 1024,
                "tiled": "yes",
            },
            "config_options": {},
        }

        results = get_cogtif_options(low_res)
        self.assertEqual(DeepDiff(results, expected), {})
Exemple #7
0
    def test_cogtif_single_tile(self):
        low_res = self.create_acq((1024, 1024), (1024, 1024))
        expected = {
            "options": {
                "compress": "deflate",
                "zlevel": 4,
                "blockysize": 512,
                "blockxsize": 512,
                "tiled": "yes",
                "copy_src_overviews": "yes",
            },
            "config_options": {"GDAL_TIFF_OVR_BLOCKSIZE": 512},
        }

        results = get_cogtif_options(low_res)
        self.assertEqual(DeepDiff(results, expected), {})
Exemple #8
0
    def test_cogtif_single_tile(self):
        low_res = self.create_acq((1024, 1024), (1024, 1024))
        expected = {
            'options': {
                'compress': 'deflate',
                'zlevel': 4,
                'blockysize': 512,
                'blockxsize': 512,
                'tiled': 'yes',
                'copy_src_overviews': 'yes'
            },
            'config_options': {
                'GDAL_TIFF_OVR_BLOCKSIZE': 512
            }
        }

        results = get_cogtif_options(low_res)
        self.assertEqual(DeepDiff(results, expected), {})