Antonio Valentino pushed to branch master 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
- - - - -
183044fe by Antonio Valentino at 2026-10-11T06:38:17+00:00
Update upstream source from tag 'upstream/7.0.4'

Update to upstream version '7.0.4'
with Debian dir a1559b6a2242866fe42eebb84cefcd312209d906
- - - - -
20c859fb by Antonio Valentino at 2026-10-11T06:39:23+00:00
New upstream release

- - - - -
6c7afb94 by Antonio Valentino at 2026-10-11T06:40:06+00:00
Set distribution to unstable

- - - - -


7 changed files:

- CHANGES.md
- debian/changelog
- 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)


=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+rio-cogeo (7.0.4-1) unstable; urgency=medium
+
+  * New upstream release.
+
+ -- Antonio Valentino <[email protected]>  Sun, 11 Oct 2026 
06:39:43 +0000
+
 rio-cogeo (7.0.3-1) unstable; urgency=medium
 
   [ Bas Couwenberg ]


=====================================
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/-/compare/b35fa2ab96d010f9c12bcdc368842b63c30775e7...6c7afb9413fe7debb72abdad9c5833de157414c7

-- 
View it on GitLab: 
https://salsa.debian.org/debian-gis-team/rio-cogeo/-/compare/b35fa2ab96d010f9c12bcdc368842b63c30775e7...6c7afb9413fe7debb72abdad9c5833de157414c7
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


_______________________________________________
Pkg-grass-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to