You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
geotiff: read_vrt and open_geotiff(.vrt) default missing_sources to lenient 'warn' #1860
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
importxrspatial.geotiffasg# vrt that references a missing tileda=g.read_vrt("partial.vrt") # warns, returns array with NaN holesda=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.
Activity
geotiff: default missing_sources to 'raise' in public read_vrt (#1860) (
geotiff: chunked-VRT coverage for missing_sources policy (xarray-cont…
geotiff: chunked-VRT coverage for missing_sources policy (xarray-cont…
geotiff: chunked-VRT coverage for missing_sources policy (xarray-cont…