rio_vrt package#
Submodules#
rio_vrt.enums module#
custom enums to respect the xml schema.
- rio_vrt.enums.resolutions = ['average', 'lowest', 'highest']#
accepted resolutions in the res parameters
- rio_vrt.enums.types = {'byte': 'Byte', 'cfloat32': 'CFloat32', 'cfloat64': 'CFloat64', 'cint16': 'CInt16', 'cint32': 'CInt32', 'float32': 'Float32', 'float63': 'Float64', 'int16': 'Int16', 'int32': 'Int32', 'int64': 'Int64', 'uint16': 'UInt16', 'uint32': 'UInt32', 'uint64': 'UInt64', 'uint8': 'Byte'}#
cooresponding XML types to python one
rio_vrt.vrt module#
Rasterio based vrt creation.
- rio_vrt.vrt.build_vrt(vrt_path, files, relative=False, mosaic=True, res='average')[source]#
Create a vrt file from multiple files.
- Parameters:
vrt_path (str | Path) – the final vrt file
files (List[str | Path]) – a list of rasterio readable files
relative (bool) – use a path relative to the vrt file. The files path must be relative to the vrt.
mosaic (bool) – The method to use to gather images in the vrt.
MOSAIC(True) will mosaic each band of each image together.STACK(False) will create one band for each file using the first band of each file.*res (str | Tuple[float, float]) – The resolution to use in the vrt geotransform. You can use a string (average, highest or lowest) or use a defined tuple of values (xres, yres).
- Returns:
the path to the vrt file
- Return type:
Path
Module contents#
The init file of the package.