Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1.23 KB

File metadata and controls

43 lines (32 loc) · 1.23 KB

GeoTIFF / COG

Reading

.. autosummary::
    :toctree: _autosummary

    xrspatial.geotiff.open_geotiff
    xrspatial.geotiff.read_vrt

Writing

.. autosummary::
    :toctree: _autosummary

    xrspatial.geotiff.to_geotiff
    xrspatial.geotiff.write_geotiff_gpu
    xrspatial.geotiff.write_vrt

Strict mode (XRSPATIAL_GEOTIFF_STRICT)

Several internal helpers historically returned None when something went wrong: pyproj failing to parse a WKT string, a VRT source file being missing, a GPU helper (GDS, nvCOMP, nvJPEG, nvJPEG2000) hitting a CUDA or library error. These now emit :class:`xrspatial.geotiff.GeoTIFFFallbackWarning` with the original exception type and message.

Set XRSPATIAL_GEOTIFF_STRICT=1 (or true, yes) to promote those warnings into raised exceptions. The same env var also forces read_geotiff_gpu(on_gpu_failure='auto') to behave like on_gpu_failure='strict' so CI can fail loudly when the GPU fast path silently falls back to CPU.

XRSPATIAL_GEOTIFF_STRICT=1 pytest xrspatial/geotiff/tests/

See issue #1662 for the audit and the full list of affected call sites.