Skip to content

geotiff: GPU stripped-TIFF fallback bypasses max_pixels, window, and band #1732

@brendancol

Description

@brendancol

Describe the bug

In xrspatial/geotiff/__init__.py:2533, the GPU read path for stripped (non-tiled) TIFFs falls back to CPU via:

arr_cpu, _ = read_to_array(source, overview_level=overview_level)

The caller's max_pixels, window, and band arguments are in scope but never forwarded. Three consequences:

  1. A user setting a smaller max_pixels cap still triggers a full decode under the default 1B-pixel limit.
  2. Windowed reads against stripped TIFFs do full-image I/O before slicing on the GPU.
  3. Single-band selection on a multi-band source also reads every band.

Expected behavior

Forward max_pixels, window, and band to read_to_array so the stripped-TIFF GPU path matches the contract of the tiled path.

Additional context

Same module's tiled path enforces max_pixels via _check_dimensions (line 2601). The stripped branch should be consistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggpuCuPy / CUDA GPU support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions