Skip to content

geotiff: extract read_geotiff_gpu into _backends/gpu.py (#1813 step 7) #1885

@brendancol

Description

@brendancol

Reason

read_geotiff_gpu (xrspatial/geotiff/__init__.py lines 2723–3338) is the largest single function in the file at about 615 lines. With GPU helpers (#1813 step 6), validators (step 4), attrs helpers (step 5), and sentinels (step 2) already extracted, the body is now a near-mechanical lift into its own backend module.

Proposal

Move read_geotiff_gpu to xrspatial/geotiff/_backends/gpu.py. Re-export from __init__.py so from xrspatial.geotiff import read_geotiff_gpu is unchanged. open_geotiff's GPU-branch dispatch continues to work via the same re-import path.

Drawbacks

Largest extraction in the sequence; reviewers should verify the body is unchanged except for import statements. The parity matrix in #1813 step 1 backstops behavioural regressions.

Refs: #1813.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiAPI design and consistencyenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions