Add BigTIFF COG external compliance test and tier entry (#2303)#2306
Merged
brendancol merged 1 commit intoMay 22, 2026
Merged
Conversation
…ib#2303) Pins writer.bigtiff_cog at the ``advanced`` tier and lands the external-interop gate that has to soak in CI before a future PR can promote it to ``stable``. The compliance file exercises the BigTIFF layout (8-byte offsets, magic 43, BigTIFF IFDs) by forcing ``bigtiff=True`` on a small raster, plus an auto-promotion row that drives the UINT32_MAX threshold via the IFD-overhead helper rather than allocating a multi-gigabyte buffer. Closes xarray-contrib#2303.
Contributor
Author
Self-reviewLooked over the diff before opening for external review. Findings:
Did not promote the tier to stable in this PR (per the wave D rule). No row uncovered a real bug, so no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
xrspatial/geotiff/tests/test_bigtiff_cog_compliance_2286.py, the external-interop gate for the BigTIFF + COG writer combination. Per-row contract mirrorstest_cog_writer_compliance.py(COG readiness: external compliance test suite for to_geotiff(cog=True) (#2286 PR 2/6) #2292):rasterio.open, byte-exact base pixels, overview shape and count, CRS/transform/nodata/dtype/band survival, COG layout invariant (IFDs before tile data), optional rio-cogeo validator with the existing skip pattern.deflate/uint16), one lossless float codec (zstd/float32), single-band and 3-band, one overview level, plus a NaN-nodata row and the optional validator row._compute_classic_ifd_overheadto driveestimated_file_size > UINT32_MAXfrom a 64x64 raster rather than allocating a true >4 GiB array. Mirrors the strategy intest_eager_bigtiff_overhead_exact_1905.py.writer.bigtiff_cog: advancedtoSUPPORTED_FEATURESat the end of the dict (Promote local COG contract to stable: flip tiers, document the contract, release notes (#2286 prod-ready wave A) #2300 is editing thewriter.cog/reader.local_cog/reader.http_cogentries in parallel, so this lands clear of that diff).BigTIFF COG (issue #2303)section todocs/source/reference/geotiff.rstcovering the threshold, the tier, and a pointer to the new test file.Tier decision
All matrix rows pass locally. Per the wave D rule the tier stays
advancedin this PR; promotion tostablehappens after the gate has lived in CI for a release cycle. No rows triggered a real BigTIFF bug, so noxfailmarkers were needed.Test plan
pytest xrspatial/geotiff/tests/test_bigtiff_cog_compliance_2286.py-- 6 passed, 1 skipped (validator skip is expected when rio-cogeo is not installed)pytest xrspatial/geotiff/tests/test_cog_writer_compliance.py xrspatial/geotiff/tests/test_eager_bigtiff_overhead_exact_1905.py xrspatial/geotiff/tests/test_features.py-- 163 passed, 5 skippedfrom xrspatial.geotiff import SUPPORTED_FEATURES; SUPPORTED_FEATURES['writer.bigtiff_cog'] == 'advanced'Closes #2303.