Describe the bug
xrspatial/geotiff/_vrt.py:647 wraps the per-source read_to_array call in a try/except that, by default, warns once and continues:
except (OSError, ValueError, struct.error,) + _CODEC_DECODE_EXCEPTIONS as e:
if _geotiff_strict_mode():
raise
warnings.warn(...)
continue
A continuing read returns a mosaic with holes. For integer VRTs the hole is the dtype zero, which downstream functions cannot distinguish from real data unless the band has a nodata value set.
Expected behavior
Either invert the default to strict (lenient becomes opt-in via XRSPATIAL_GEOTIFF_STRICT=0), or surface a stronger signal than a warning, for example a metadata['vrt_holes'] entry on the returned DataArray that records which sources failed and where.
Additional context
The current opt-in is XRSPATIAL_GEOTIFF_STRICT=1. Documented behavior should match what a new user will hit on a corrupt mosaic.
Describe the bug
xrspatial/geotiff/_vrt.py:647wraps the per-sourceread_to_arraycall in a try/except that, by default, warns once and continues:A continuing read returns a mosaic with holes. For integer VRTs the hole is the dtype zero, which downstream functions cannot distinguish from real data unless the band has a nodata value set.
Expected behavior
Either invert the default to strict (lenient becomes opt-in via
XRSPATIAL_GEOTIFF_STRICT=0), or surface a stronger signal than a warning, for example ametadata['vrt_holes']entry on the returned DataArray that records which sources failed and where.Additional context
The current opt-in is
XRSPATIAL_GEOTIFF_STRICT=1. Documented behavior should match what a new user will hit on a corrupt mosaic.