Skip to content

geotiff: surface rotated_affine 6-tuple on the DataArray attrs #2129

@brendancol

Description

@brendancol

Follow-up to #2126 / PR #2128.

When open_geotiff(..., allow_rotated=True) reads a rotated GeoTIFF, the rotated 6-tuple is held on geo_info.transform.rotated_affine but geo_info is not on the returned DataArray. The matrix is therefore unreachable from public code -- callers can only see that transform is missing and crs is missing, with no way to recover the actual rotated mapping.

Proposal

Emit attrs['rotated_affine'] as a rasterio-style 6-tuple (a, b, c, d, e, f) on the allow_rotated=True path. Downstream code that wants to handle rotated rasters (custom warps, visualisation) can read it directly instead of treating the array as fully ungeoreferenced.

The attr should:

Why not bundled with #2126

#2126 fixed the documented contract (CRS attrs were leaking on the rotated path). Adding a new public attr is API surface expansion that deserves its own PR with explicit consideration of the round-trip contract and downstream consumers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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