Describe the bug
build_vrt in xrspatial/geotiff/_vrt.py:848 derives the mosaic's resolution, dtype, band count, nodata, and CRS from the first source only:
first = sources_meta[0]
res_x = first['transform'].pixel_width
res_y = first['transform'].pixel_height
...
sf = first['sample_format']
bps = first['bps']
...
n_bands = first['bands']
srs = crs_wkt or first.get('crs_wkt') or ''
The remaining sources are never checked. Mixed pixel sizes, sample formats, band counts, or CRS will produce a syntactically valid VRT that misplaces or mis-types data downstream. Failure is silent.
Expected behavior
Validate that every entry in sources_meta agrees with the first on:
- pixel width and pixel height (within a small tolerance)
- sample format and bits per sample (i.e. dtype)
- band count
- CRS WKT (when one is set)
Raise a clear error on mismatch. Document nodata precedence between caller arg and per-source value.
Describe the bug
build_vrtinxrspatial/geotiff/_vrt.py:848derives the mosaic's resolution, dtype, band count, nodata, and CRS from the first source only:The remaining sources are never checked. Mixed pixel sizes, sample formats, band counts, or CRS will produce a syntactically valid VRT that misplaces or mis-types data downstream. Failure is silent.
Expected behavior
Validate that every entry in
sources_metaagrees with the first on:Raise a clear error on mismatch. Document nodata precedence between caller arg and per-source value.