Skip to content

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

@brendancol

Description

@brendancol

Follow-up to #2286. BigTIFF COG was explicitly excluded from wave 1's stable scope. Resolve the open decision: either promote BigTIFF COG (with the gating compliance test it would need) or pin its advanced tier with a documented threshold.

Required changes

Compliance test

New file: xrspatial/geotiff/tests/test_bigtiff_cog_compliance_2286.py.

Approach: force-BigTIFF on a small raster via bigtiff=True so the test exercises the BigTIFF layout (8-byte offsets, BigTIFF-specific IFDs, tile / overview offset tables in BigTIFF form) without allocating a multi-gigabyte array.

Matrix (smaller than the main compliance suite — we are not re-validating every codec, just the BigTIFF-specific layout):

  • One lossless integer codec (e.g. deflate, uint16).
  • One lossless float codec (e.g. zstd, float32).
  • Single-band and 3-band.
  • One overview level.

Per row, the same assertions as test_cog_writer_compliance.py:

Auto-BigTIFF threshold test

One additional row asserting that for a raster sized just over 4 GB (compressed-output estimate), the writer auto-promotes to BigTIFF without bigtiff=True and produces a readable file. Use a small array with a very high band count or a contrived in-memory layout that triggers the threshold logic without actually allocating 4 GB — or pytest.skip with a clear reason if the threshold cannot be exercised without large allocation.

xrspatial/geotiff/_attrs.py

Pick one outcome based on test results:

  • If the BigTIFF compliance tests pass cleanly: leave writer.bigtiff and add writer.bigtiff_cog: advanced (we are not promoting BigTIFF COG to stable in the same PR that adds the tests — promotion happens once the gates have lived in CI for a release cycle).
  • If a test reveals a real BigTIFF COG bug: keep writer.bigtiff as-is, add writer.bigtiff_cog: advanced with an inline comment linking to a new issue documenting the bug; xfail the failing row.

Docs

In docs/source/reference/geotiff.rst, add a one-paragraph note: BigTIFF COG behavior at the 4 GB threshold; current tier; pointer to the compliance test file.

Out of scope

  • Promoting BigTIFF COG to stable in this PR.
  • HTTP BigTIFF COG (HTTP COG is its own track).
  • GPU BigTIFF.

Acceptance

  • New test file present.
  • All rows either pass or xfail with linked issues — no silent skips except the documented auto-BigTIFF threshold skip when an array large enough to trigger it cannot be allocated.
  • SUPPORTED_FEATURES reflects the BigTIFF COG entry.
  • Docs reference page mentions the BigTIFF COG status.
  • Full test suite green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions