Skip to content

Commit f3cc785

Browse files
authored
Refactor GeoTIFF Phase 5f: extract _encode.py from _writer.py (#2263)
* Refactor GeoTIFF Phase 5f: extract _encode.py from _writer.py (#2260) Move the strip / tile encode helpers, the photometric resolution and MinIsWhite inversion helpers, the predictor normalisation, the ``_compression_tag`` mapping, and the streaming ``_compress_block`` helper out of ``_writer.py`` into a new ``_encode.py``. Mirrors the ``_decode.py`` extraction on the read side (PR-G). ``_writer.py`` re-exports every moved name so the existing public import path (``xrspatial.geotiff._writer.<name>``) and downstream backends (``_writers/eager.py``, ``_writers/gpu.py``, ``_writers/vrt.py``, ``_write_layout.py``, the test suite) keep working without churn. ``_write_tiled`` and ``_write_stripped`` look up ``_prepare_tile`` and ``_prepare_strip`` through ``_writer`` so the monkeypatch contract pinned by ``test_gil_friendly_kwarg_1830`` survives the move. ``_writer.py`` drops from 1800 to 1269 lines. Part of #2211. * Address review: clarify _encode lazy-lookup docstring and test refs (#2260) Tighten the module docstring to point at the actual call sites where the lazy _writer import lives (_write_stripped / _write_tiled), and cross-reference the test that pins the monkeypatch contract from the inline comments next to those lookups. Pure documentation; no behaviour change.
1 parent 7501b67 commit f3cc785

2 files changed

Lines changed: 709 additions & 576 deletions

File tree

0 commit comments

Comments
 (0)