Skip to main content

vrt.build_vrt_mosaic()

Mosaic aligned tiles into a VRT.

Usage

Source

vrt.build_vrt_mosaic(
    files,
    dst_vrt,
    *,
    bounds=None,
)

Deprecated: use mosaic(files, bounds=bounds).to_vrt(dst_vrt).

Sources on the VRT’s store are referenced relative to it, which keeps the pair relocatable.

Parameters

files: Sequence[str | Path | UPath]

Source tiles, sharing a CRS, pixel size, band count, dtype and NODATA value.

dst_vrt: str | Path | UPath

Output VRT.

bounds: rasterio.coords.BoundingBox or tuple of float or None = None
Extent of the mosaic as (left, bottom, right, top). Defaults to the union of the sources. Pass a fixed extent to place every mosaic of a series on one canonical grid, so they can be stacked without alignment.

Raises

ValueError
If inputs are empty or incompatible, or if bounds does not lie on the sources’ pixel grid.