Skip to content

Add GPU COG overview support (#1150)#1174

Open
brendancol wants to merge 4 commits intomasterfrom
issue-1150
Open

Add GPU COG overview support (#1150)#1174
brendancol wants to merge 4 commits intomasterfrom
issue-1150

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Summary

  • write_geotiff_gpu() now accepts cog, overview_levels, and overview_resampling. Overviews are block-reduced and compressed on GPU, then written in COG layout (IFDs first, pixel data after).
  • to_geotiff() passes overview params through to the GPU path, so CuPy arrays get COG output without CPU fallback.
  • 16 new tests: resampling methods, multi-level overviews, auto-generation, round-trip, GPU/CPU parity.

Test plan

  • pytest xrspatial/geotiff/tests/test_cog.py -- 25 tests (9 existing + 16 new), all pass
  • GPU tests need CuPy+CUDA, skip otherwise
  • COG structure verified: IFDs before pixel data, correct overview dimensions
  • Full-res values unchanged after COG write with overviews

Closes #1150

write_geotiff_gpu now accepts cog, overview_levels, and overview_resampling.
Overviews are block-reduced and compressed on GPU, then assembled into COG
layout. to_geotiff() passes the new params through to the GPU path.
Tests cover resampling methods (mean, nearest, mode, min, max, median),
multi-level overviews, auto-generation, round-trip value preservation,
public API dispatch, and GPU/CPU parity for block-reduce.
New docs/source/reference/geotiff.rst covers the public I/O functions.
README feature matrix now lists write_geotiff_gpu and shows COG
overview usage examples.
Covers automatic and explicit overview levels, resampling methods,
and round-trip verification. Self-contained with synthetic data.
@github-actions github-actions bot added the performance PR touches performance-sensitive code label Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add overview (pyramid) generation for Cloud-Optimized GeoTIFF output

1 participant