Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions xrspatial/geotiff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,18 +719,24 @@ def open_geotiff(source: str | BinaryIO, *,
sentinels (e.g. external tooling that writes ``"nan"`` on
integer outputs).
stable_only : bool, default False
[advanced] Read-side opt-in for stable-tier sources only. When
``True``, a ``.vrt`` source raises
[advanced] Read-side opt-in that restricts the read to the
stable-tier local-file path. When ``True``, advanced-tier
sources are rejected: a ``.vrt`` source raises
:class:`VRTStableSourcesOnlyError` because ``reader.vrt`` and
the VRT child-source pipeline sit at the ``advanced`` /
``experimental`` tiers in
:data:`xrspatial.geotiff.SUPPORTED_FEATURES`. Non-VRT sources
on this entry point already ride the stable ``reader.local_file``
path and the per-source codec gate, so the flag is a no-op for
them. The rejection names the file path and the
:data:`xrspatial.geotiff.SUPPORTED_FEATURES`, and HTTP /
fsspec sources (``http(s)://``, ``s3://``, etc.) are rejected
too because ``reader.http`` and ``reader.fsspec`` are also
``advanced``. Only a local-file source riding the stable
``reader.local_file`` path and the per-source codec gate is
accepted. The rejection names the offending source and the
``allow_experimental_codecs`` opt-in so the caller can unlock
the broader tier set explicitly when needed. See
``docs/source/reference/release_gate_geotiff.rst``.
``docs/source/reference/release_gate_geotiff.rst``. The VRT
rejection is enforced today; the HTTP / fsspec rejection is the
documented contract being rolled out and may not yet fire on
every read path (tracked in issue #2820).
allow_experimental_codecs : bool, default False
Read-side opt-in for sources compressed with the Tier 3
experimental codecs (``lerc``, ``jpeg2000`` / ``j2k``, ``lz4``).
Expand Down
16 changes: 10 additions & 6 deletions xrspatial/geotiff/_backends/dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,16 @@ def read_geotiff_dask(source: str, *,
``InvalidIntegerNodataError`` at graph-build time. See
``open_geotiff`` for the full description.
stable_only : bool, default False
[advanced] Read-side opt-in for stable-tier sources only.
Forwarded to ``read_vrt`` when the source ends in ``.vrt`` so
the rejection fires at graph-build time. Non-VRT sources on
this entry point already ride the stable ``reader.local_file``
path, so the flag is a no-op for them. See ``open_geotiff`` for
the full description.
[advanced] Read-side opt-in that restricts the read to the
stable-tier local-file path. Forwarded to ``read_vrt`` when the
source ends in ``.vrt`` so the rejection fires at graph-build
time. Advanced-tier sources (VRT, and HTTP / fsspec sources
such as ``http(s)://`` or ``s3://``) are rejected; only a
local-file source on the stable ``reader.local_file`` path is
accepted. The VRT rejection is enforced today; the HTTP /
fsspec rejection is the documented contract being rolled out
(tracked in issue #2820). See ``open_geotiff`` for the full
description.
allow_experimental_codecs : bool, default False
[advanced] Read-side opt-in for Tier 3 experimental codecs
(``lerc``, ``jpeg2000`` / ``j2k``, ``lz4``). Fires at graph
Expand Down
Loading