[Git][debian-gis-team/rio-cogeo][upstream] New upstream version 7.0.4
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sun Oct 11 07:42:30 BST 2026
Antonio Valentino pushed to branch upstream at Debian GIS Project / rio-cogeo
Commits:
15073d02 by Antonio Valentino at 2026-10-11T06:36:21+00:00
New upstream version 7.0.4
- - - - -
6 changed files:
- CHANGES.md
- pyproject.toml
- rio_cogeo/__init__.py
- rio_cogeo/cogeo.py
- + tests/fixtures/validate/sparse_empty.tif
- tests/test_validate.py
Changes:
=====================================
CHANGES.md
=====================================
@@ -1,5 +1,9 @@
# Release Notes
+## 7.0.4 (2026-10-09)
+
+* fix: avoid index error on COGs with no data (author @benboothby, https://github.com/cogeotiff/rio-cogeo/pull/338)
+
## 7.0.3 (2026-09-24)
* fix: tiling check for datasets exceeding 512px in a single dimension (author @m3zn, https://github.com/cogeotiff/rio-cogeo/pull/332)
=====================================
pyproject.toml
=====================================
@@ -98,7 +98,7 @@ ignore = [
]
[tool.bumpversion]
-current_version = "7.0.3"
+current_version = "7.0.4"
search = "{current_version}"
replace = "{new_version}"
tag = true
=====================================
rio_cogeo/__init__.py
=====================================
@@ -1,6 +1,6 @@
"""rio_cogeo: Cloud Optimized GeoTIFF creation and validation plugin for rasterio."""
-__version__ = "7.0.3"
+__version__ = "7.0.4"
from .cogeo import cog_info, cog_translate, cog_validate # noqa
from .profiles import cog_profiles # noqa
=====================================
rio_cogeo/cogeo.py
=====================================
@@ -659,7 +659,7 @@ def cog_validate( # noqa: C901
continue
break
- if data_offsets[-1] != 0 and data_offsets[-1] < ifd_offsets[-1]:
+ if data_offsets and data_offsets[-1] < ifd_offsets[-1]:
if len(overviews) > 0:
errors.append(
"The offset of the first block of the smallest overview "
=====================================
tests/fixtures/validate/sparse_empty.tif
=====================================
Binary files /dev/null and b/tests/fixtures/validate/sparse_empty.tif differ
=====================================
tests/test_validate.py
=====================================
@@ -20,6 +20,8 @@ raster_jpeg = os.path.join(fixture_dir, "validate", "nontiff.jpg")
raster_big = os.path.join(fixture_dir, "image_2000px.tif")
raster_zero_offset = os.path.join(fixture_dir, "validate", "cog_no_offest.tif")
raster_sparse = os.path.join(fixture_dir, "validate", "sparse.tif")
+# Sparse COG filled entirely with nodata (no block has a data offset)
+raster_sparse_empty = os.path.join(fixture_dir, "validate", "sparse_empty.tif")
# COG created with rio-cogeo but using gdal 3.1
raster_rioCOGgdal31 = os.path.join(fixture_dir, "validate", "image_rioCOG_gdal3.1.tif")
@@ -89,6 +91,12 @@ def test_cog_validate_valid(monkeypatch):
# Sparse COG with some overviews that contain zeros
assert cog_validate(raster_sparse, config=config)[0]
+ # Sparse COG filled entirely with nodata
+ is_valid, errors, warnings = cog_validate(raster_sparse_empty, config=config)
+ assert is_valid
+ assert not errors
+ assert not warnings
+
def test_cog_validate_return():
"""Checkout returned values."""
View it on GitLab: https://salsa.debian.org/debian-gis-team/rio-cogeo/-/commit/15073d027d4b31bc345f03d838af0b0a37a64c8d
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/rio-cogeo/-/commit/15073d027d4b31bc345f03d838af0b0a37a64c8d
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20261011/70f6c8ec/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list