Commit 1a8dece
committed
Block write_geotiff_gpu(file_like, cog=True) for parity with to_geotiff (#1652)
to_geotiff has long rejected cog=True + file-like destinations, but the
explicit write_geotiff_gpu entry point silently accepted the combo and
emitted a COG into the buffer. The two writers should agree on which
inputs they refuse: to_geotiff(gpu=True, cog=True, path=BytesIO) raises,
so write_geotiff_gpu(da, BytesIO, cog=True) should too.
Mirror the existing to_geotiff guard on the GPU entry point. Non-cog
file-like writes remain supported on this path (the gate is targeted at
cog=True only). Add regression coverage in test_bytesio_source.py.
Also clarify the path/compression docstring on write_geotiff_gpu:
- path: document that file-like destinations are accepted (cog=True
requires a string path).
- compression: list the full codec set the function actually accepts
and note the deliberate JPEG asymmetry with to_geotiff (#1651
downgraded to docs-only after PR #1647 confirmed advanced-API
intent).
Update .claude/sweep-api-consistency-state.csv with the 2026-05-11
re-audit row.1 parent babb72e commit 1a8dece
3 files changed
Lines changed: 76 additions & 6 deletions
File tree
- .claude
- xrspatial/geotiff
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2714 | 2714 | | |
2715 | 2715 | | |
2716 | 2716 | | |
2717 | | - | |
| 2717 | + | |
2718 | 2718 | | |
2719 | 2719 | | |
2720 | 2720 | | |
| |||
2747 | 2747 | | |
2748 | 2748 | | |
2749 | 2749 | | |
2750 | | - | |
2751 | | - | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
2752 | 2756 | | |
2753 | 2757 | | |
2754 | 2758 | | |
2755 | 2759 | | |
2756 | 2760 | | |
2757 | | - | |
2758 | | - | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
2759 | 2771 | | |
2760 | 2772 | | |
2761 | 2773 | | |
| |||
2810 | 2822 | | |
2811 | 2823 | | |
2812 | 2824 | | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
2813 | 2836 | | |
2814 | 2837 | | |
2815 | 2838 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
0 commit comments