hydromt.data_catalog.drivers.RasterioOptions#

pydantic model hydromt.data_catalog.drivers.RasterioOptions[source]#

Options for RasterioDriver.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

KWARGS_FOR_OPEN: ClassVar[set[str]] = {'mosaic_kwargs'}#

Fields that are to be included as kwargs when passing to open functions. By default, all fields defined in the class are excluded.

field mosaic: bool = False#

If True and multiple uris are given, will mosaic the datasets together using rasterio.merge.merge. Default is False.

field mosaic_kwargs: dict[str, Any] = {}#

Additional keyword arguments to pass to rasterio.merge.merge.

field cache: bool = False#

If True and reading from VRT files, will cache the tiles locally to speed up reading. Default is False.

field cache_root: str = '/home/runner/.hydromt'#

Root directory for caching. Default is taken from hydromt.config.SETTINGS.cache_root.

field cache_dir: str | None = None#

Subdirectory for caching. Default is the stem of the first uri without extension.

get_cache_path(uris: list[str]) Path[source]#

Get the cache path based on the options and uris.

serialize_paths(value: Path) str | None[source]#

Serialize Path to str for pydantic compatibility.