vrt.build_vrt_mosaic()
Mosaic same-resolution, single-band tiles into a VRT.
Usage
vrt.build_vrt_mosaic(
files,
dst_vrt,
)Tiles are placed within the mosaic by their own bounds, and referenced by bare filename (relativeToVRT), so files must all share the same CRS, pixel size, dtype, NODATA and band count, be axis-aligned to a common pixel grid, and live in the same directory as dst_vrt – the mosaic and its tiles then stay valid together if the directory is moved.
Parameters
files: Sequence[str | Path | UPath]-
Source tile files, all in the same directory as
dst_vrt. dst_vrt: str | Path | UPath- Output VRT path.
Raises
ValueError-
If
filesis empty, or the tiles are inconsistent (see_validate_mosaic_tiles()) or not grid-aligned.