Commit 50424ac
committed
Address Copilot review feedback on #1649
Four wording fixes; no behavioural change:
- compression='jpeg': the docstring previously implied parity with
to_geotiff, but to_geotiff rejects jpeg at runtime (it omits the
JPEGTables tag and produces files that don't round-trip through GDAL).
Spell out that write_geotiff_gpu DOES accept jpeg, that the on-disk
bytes are self-contained JFIF tiles, and that GDAL/rasterio interop is
not guaranteed until the JPEGTables fix lands.
- compression='jpeg2000' / 'j2k': replace "route to the CPU encoders"
with the actual conditional behaviour (nvJPEG2K GPU encode first, CPU
glymur fallback when libnvjpeg2k is missing) and call out that the two
paths are not byte-stable, so byte-for-byte parity with to_geotiff
isn't a contract here.
- test module docstring: distinguish "not nvCOMP-accelerated" (lzw,
packbits, lz4, lerc — truly CPU-only) from jpeg2000/j2k (GPU first
with CPU fallback) and from jpeg (write_geotiff_gpu only, separate
test module).
- "exercised by test_features.py" referenced a file that doesn't cover
JPEG. Repoint the test docstring to
test_gpu_writer_compression_modes_2026_05_11.py which actually pins
JPEG round-trips for the GPU writer.
All 7 tests in test_compression_docstring_1644.py still pass.1 parent aa6ef5d commit 50424ac
2 files changed
Lines changed: 66 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2723 | 2723 | | |
2724 | 2724 | | |
2725 | 2725 | | |
2726 | | - | |
2727 | | - | |
2728 | | - | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
2729 | 2730 | | |
2730 | 2731 | | |
2731 | 2732 | | |
2732 | | - | |
2733 | | - | |
2734 | | - | |
2735 | | - | |
2736 | | - | |
2737 | | - | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
2738 | 2758 | | |
2739 | 2759 | | |
2740 | 2760 | | |
| |||
Lines changed: 37 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
14 | 32 | | |
15 | 33 | | |
16 | 34 | | |
| |||
42 | 60 | | |
43 | 61 | | |
44 | 62 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
50 | 70 | | |
51 | 71 | | |
52 | 72 | | |
| |||
83 | 103 | | |
84 | 104 | | |
85 | 105 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
91 | 112 | | |
92 | 113 | | |
93 | 114 | | |
| |||
0 commit comments