Skip to content

Release-gate: overview / sidecar metadata survival (PR 3 of 5 of epic #2341) #2359

@brendancol

Description

@brendancol

Reason or Problem

Epic #2341 names "overview reads lose CRS/transform/nodata metadata" as a priority risk. The existing overview tests under xrspatial/geotiff/tests/ (e.g. test_cog_overview_nodata_1613.py, test_dask_overview_level.py, test_cog_cubic_overview_nodata_1623.py) assert pixel correctness or specific nodata behaviour, but not full metadata survival on the overview output, and not parity between internal overviews (COG) and external .ovr sidecars.

Proposal

Add xrspatial/geotiff/tests/test_release_gate_overview_sidecar_metadata_2341.py.

Two parametrized test groups:

Internal overviews (COG): for a COG fixture with overviews at levels 2 and 4, open at the base level and at each overview level via eager and dask. Assert:

  • attrs['crs'], attrs['crs_wkt'], attrs['georef_status'], attrs['raster_type'], attrs['nodata'], attrs['masked_nodata'] are equal across all three levels (overview reads do not lose or rewrite the contract).
  • attrs['transform'] scales correctly (pixel size doubles at each level, origin unchanged).

External .ovr sidecar: for a fixture with an external .ovr, read the base raster + the overview level via the sidecar path. Assert the same metadata-survival contract as above.

Assertions inlined per-file. Add a row to docs/source/reference/release_gate_geotiff.rst under "Sidecar and overview interactions" citing the new file.

Stakeholders and Impacts

Touches one new test file. Reads fixtures already present in xrspatial/geotiff/tests/golden_corpus/ where available; if a .ovr sidecar fixture does not exist yet, build one in-test using the existing fixture-construction helpers.

Out of scope: pixel-correctness of resampling kernels (already covered by the cubic/nodata tests), VRT mosaics (epic #2342).

Drawbacks

Building an .ovr sidecar in-test couples the test to the writer path; if the writer regresses, this test breaks too. That is acceptable — the test is part of the release gate, so any writer-side breakage is in scope to surface.

Alternatives

  • Limit to COG internal overviews and skip sidecars in this PR. Rejected: the epic explicitly names sidecar reads as a release-promised path.

Additional Notes or Context

Parent epic: #2341. PR 3 of 5.

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