The public read_vrt in xrspatial/geotiff/__init__.py:3798 defaults to missing_sources='warn':
def read_vrt(source: str, *,
...
missing_sources: str = 'warn') -> xr.DataArray:
The internal _vrt.read_vrt it dispatches to defaults to missing_sources='raise' (xrspatial/geotiff/_vrt.py:856) and the module comment at line 256 explicitly tags 'warn' as the lenient opt-in. The two defaults disagree and the public one is the lenient choice.
The same lenient default leaks into open_geotiff(.vrt) at xrspatial/geotiff/__init__.py:714: when the caller does not pass missing_sources, no kwarg is forwarded and the public read_vrt default takes over, so callers who reach VRT reads through open_geotiff get the lenient policy too.
Repro
import xrspatial.geotiff as g
# vrt that references a missing tile
da = g.read_vrt("partial.vrt") # warns, returns array with NaN holes
da = g.open_geotiff("partial.vrt") # same: silently degraded output
Fix
Change the public read_vrt default to missing_sources='raise' to match the internal default, and update the docstring. Callers who want the older lenient behavior pass missing_sources='warn' explicitly.
The public
read_vrtinxrspatial/geotiff/__init__.py:3798defaults tomissing_sources='warn':The internal
_vrt.read_vrtit dispatches to defaults tomissing_sources='raise'(xrspatial/geotiff/_vrt.py:856) and the module comment at line 256 explicitly tags'warn'as the lenient opt-in. The two defaults disagree and the public one is the lenient choice.The same lenient default leaks into
open_geotiff(.vrt)atxrspatial/geotiff/__init__.py:714: when the caller does not passmissing_sources, no kwarg is forwarded and the publicread_vrtdefault takes over, so callers who reach VRT reads throughopen_geotiffget the lenient policy too.Repro
Fix
Change the public
read_vrtdefault tomissing_sources='raise'to match the internal default, and update the docstring. Callers who want the older lenient behavior passmissing_sources='warn'explicitly.