Skip to content

Add BigTIFF COG external compliance test and tier entry (#2303)#2306

Merged
brendancol merged 1 commit into
xarray-contrib:mainfrom
brendancol:bigtiff-cog-compliance-2303
May 22, 2026
Merged

Add BigTIFF COG external compliance test and tier entry (#2303)#2306
brendancol merged 1 commit into
xarray-contrib:mainfrom
brendancol:bigtiff-cog-compliance-2303

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Summary

  • Adds xrspatial/geotiff/tests/test_bigtiff_cog_compliance_2286.py, the external-interop gate for the BigTIFF + COG writer combination. Per-row contract mirrors test_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.
  • Matrix is scoped to the BigTIFF-specific layout rather than re-validating every codec: one lossless integer codec (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.
  • Auto-BigTIFF threshold row monkeypatches _compute_classic_ifd_overhead to drive estimated_file_size > UINT32_MAX from a 64x64 raster rather than allocating a true >4 GiB array. Mirrors the strategy in test_eager_bigtiff_overhead_exact_1905.py.
  • Adds writer.bigtiff_cog: advanced to SUPPORTED_FEATURES at 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 the writer.cog / reader.local_cog / reader.http_cog entries in parallel, so this lands clear of that diff).
  • Adds a BigTIFF COG (issue #2303) section to docs/source/reference/geotiff.rst covering 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 advanced in this PR; promotion to stable happens after the gate has lived in CI for a release cycle. No rows triggered a real BigTIFF bug, so no xfail markers 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 skipped
  • from xrspatial.geotiff import SUPPORTED_FEATURES; SUPPORTED_FEATURES['writer.bigtiff_cog'] == 'advanced'
  • CI green on the runner

Closes #2303.

…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.
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label May 22, 2026
@brendancol
Copy link
Copy Markdown
Contributor Author

Self-review

Looked 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 xfail markers were needed.

@brendancol brendancol marked this pull request as ready for review May 22, 2026 13:04
@brendancol brendancol merged commit c8d73ca into xarray-contrib:main May 22, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigTIFF COG external compliance + tier decision (#2286 prod-ready wave D)

1 participant