vrt.read()

Read a VRT file into the model.

Usage

Source

vrt.read(
    path,
    *,
    storage_options=None,
)

Relative source paths resolve against path and keep its storage options. /vsis3/ sources become s3:// paths carrying storage_options, or else the storage options of an s3:// path.

Parameters

path: str | Path | UPath

The VRT, local or s3://.

storage_options: Mapping[str, Any] | None = None
Options for every S3 source. For an s3:// path they replace its storage options, for reading the VRT and its relative sources.

Returns

VRT
The parsed VRT.

Raises

ValueError

If the VRT holds an element the model does not support, or a source path on a GDAL virtual file system other than /vsis3/ and /vsicurl/.

ImportError
If path is http(s):// and aiohttp is not installed.