You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
geotiff: inherit nodata + rich-tag set on overview reads (#1739)
`extract_geo_info_with_overview_inheritance` was inheriting only the
CRS-side fields from the level-0 IFD. The COG writer also emits
GDAL_NODATA, GDAL_METADATA, the resolution tags, and the extra-tag
pass-through fields (colormap, image_description, extra_samples) only
on level 0, so an `open_geotiff(path, overview_level=N)` for N >= 1
returned a DataArray whose `attrs['nodata']` was None even when the
file declared a sentinel. The overview's on-disk pixels still carried
that sentinel (writer rewrites NaN to sentinel before reducing), so
downstream stats / threshold / plot pipelines silently folded sentinel
values into their results.
Fix: extend the inheritance helper to fill in the per-IFD pass-through
tags whenever the overview IFD lacks its own value. Mirrors the
existing CRS-side inheritance pattern (only inherit fields the
overview doesn't already carry), so an overview that does re-declare
any of these tags keeps its own value.
Affects all four backends (numpy, dask+numpy, cupy, dask+cupy) since
they all go through this helper. Adds a 4-backend regression test
suite that exercises nodata, gdal_metadata, and the resolution tags
across overview levels, and a contract test pinning the symmetric
diff of the attrs keyset to zero between level 0 and overview reads.
Updates one existing test in test_cog_overview_nodata_1613.py that
was inadvertently asserting the buggy behaviour (raw sentinel in the
overview output instead of NaN); the post-fix expectation matches
the level-0 behaviour.
geotiff,2026-05-12,1710,MEDIUM,2,"open_geotiff/read_geotiff_dask/read_geotiff_gpu windowed reads of non-georef TIFFs produced float64 half-pixel-shifted coords while full reads produced int64 [0,1,2,...] coords. Affected every backend the same way; not a backend parity bug, a windowed-vs-full inconsistency. _populate_attrs_from_geo_info also fabricated an identity transform attr on non-georef files. Fixed by threading has_georef through all windowed coord paths and through the transform attr emitter (#1710)."
3
+
geotiff,2026-05-12,1739,HIGH,1;4,"COG overview reads dropped attrs['nodata'] from level 0, so the writer-baked sentinel survived as raw data in the overview pixels (silent numerical corruption). extract_geo_info_with_overview_inheritance was inheriting CRS-side fields only; extended to per-IFD pass-through tags (nodata, gdal_metadata*, resolution*, colormap, extra_tags, image_description, extra_samples). All four backends affected (numpy/dask/cupy/dask+cupy). Fixed in #1739."
3
4
reproject,2026-05-10,1572;1573,HIGH,1;3;4,geoid_height_raster dropped input attrs and used dims[-2:] for 3D inputs (#1572). reproject/merge ignored nodatavals (rasterio convention) when rioxarray absent (#1573). Fixed in same branch.
0 commit comments