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
Surfaced by the new pytest-cog-validator job from #2302. With rio-cogeo installed, cog_validate(path, strict=False) on a basic to_geotiff(da, path, cog=True, overview_levels=[2, 4]) output returns:
- The offset of the first block of overview of index 0 should be after the one of the overview of index 1
- The offset of the first block of the main resolution image should be after the one of the overview of index 1
The COG spec requires overview tile blocks to be laid out smallest-overview-first, then progressively larger, with the main resolution image's blocks last. The current writer interleaves or reverses this order, so external readers that rely on monotonically increasing decimation reject the file.
The in-process round-trip and the local _assert_ifds_before_data layout check both pass. The bug is specifically in tile block ordering across overview IFDs, not the IFD chain.
Fix lives in the writer's overview-emit path (_writer.py / overview assembly).
Surfaced by the new
pytest-cog-validatorjob from #2302. With rio-cogeo installed,cog_validate(path, strict=False)on a basicto_geotiff(da, path, cog=True, overview_levels=[2, 4])output returns:The COG spec requires overview tile blocks to be laid out smallest-overview-first, then progressively larger, with the main resolution image's blocks last. The current writer interleaves or reverses this order, so external readers that rely on monotonically increasing decimation reject the file.
Repro
CI evidence: PR #2304 run
run (3.12)-- https://github.com/xarray-contrib/xarray-spatial/actions/runs/26288974021/job/77383787093Scope
_assert_ifds_before_datalayout check both pass. The bug is specifically in tile block ordering across overview IFDs, not the IFD chain._writer.py/ overview assembly).xfailontest_external_cog_validator(added in Make rio-cogeo COG validator a required CI gate (#2302) #2304) so the validator gate is fully green.Acceptance
cog_validate(path, strict=False)returnsvalid=True, errors=[]on the same input shape used intest_external_cog_validator.xfailremoved fromtest_external_cog_validator; the COG-validator CI job is green.