Skip to content

Commit a5c9317

Browse files
Merge pull request #310 from cogeotiff/feature/rename-resamp-tag
rename resampling tag
2 parents 9971ea4 + 9397f35 commit a5c9317

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

CHANGES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
## 6.0.0 (2025-11-05)
44

5-
* allow `interleave=BAND` when using GDAL COG driver (require `GDAL>=3.11`)
5+
* allow `interleave=BAND` when using GDAL COG driver (require `GDAL>=3.11`) (https://github.com/cogeotiff/rio-cogeo/issues/306)
66
* remove python 3.8 and 3.9 support
77
* add support for python 3.13
8+
* rename `OVR_RESAMPLING_ALG` tag to `OVERVIEW_RESAMPLING` (https://github.com/cogeotiff/rio-cogeo/issues/308)
89

910
## 5.4.2 (2025-06-27)
1011

rio_cogeo/cogeo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def cog_translate( # noqa: C901
400400
tags = src_dst.tags()
401401
tags.update(
402402
{
403-
"OVR_RESAMPLING_ALG": ResamplingEnums[
403+
"OVERVIEW_RESAMPLING": ResamplingEnums[
404404
overview_resampling
405405
].name.upper()
406406
}

tests/test_cogeo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def _validate_translated_rgb_jpeg(src):
7070
assert src.photometric.value == "YCbCr"
7171
assert src.interleaving.value == "PIXEL"
7272
assert src.overviews(1) == [2, 4, 8]
73-
assert src.tags()["OVR_RESAMPLING_ALG"] == "NEAREST"
73+
assert src.tags()["OVERVIEW_RESAMPLING"] == "NEAREST"
7474
assert not has_mask_band(src)
7575

7676

@@ -328,7 +328,7 @@ def test_cog_translate_tags(runner):
328328
with runner.isolated_filesystem():
329329
cog_translate(raster_path_tags, "cogeo.tif", jpeg_profile, quiet=True)
330330
with rasterio.open("cogeo.tif") as src:
331-
assert src.tags()["OVR_RESAMPLING_ALG"] == "NEAREST"
331+
assert src.tags()["OVERVIEW_RESAMPLING"] == "NEAREST"
332332
assert src.tags()["DatasetName"] == "my useful dataset"
333333
assert src.descriptions[0] == "first band"
334334
assert src.descriptions[1] == "second band"
@@ -342,14 +342,14 @@ def test_cog_translate_tags(runner):
342342
additional_cog_metadata={"comment": "it should work"},
343343
)
344344
with rasterio.open("cogeo.tif") as src:
345-
assert src.tags()["OVR_RESAMPLING_ALG"] == "NEAREST"
345+
assert src.tags()["OVERVIEW_RESAMPLING"] == "NEAREST"
346346
assert src.tags()["comment"] == "it should work"
347347

348348
cog_translate(
349349
raster_path_tags, "cogeo.tif", raw_profile, indexes=[2], quiet=True
350350
)
351351
with rasterio.open("cogeo.tif") as src:
352-
assert src.tags()["OVR_RESAMPLING_ALG"] == "NEAREST"
352+
assert src.tags()["OVERVIEW_RESAMPLING"] == "NEAREST"
353353
assert src.tags()["DatasetName"] == "my useful dataset"
354354
assert src.descriptions[0] == "second band"
355355

0 commit comments

Comments
 (0)