vrt.Source

One band of a file or nested VRT drawn into a VRT band.

Usage

Source

vrt.Source(
    path,
    band=1,
    src_window=None,
    dst_window=None,
    nodata=None,
    lut=None,
    resampling=None,
    properties=None
)

Parameters

path: UPath | VRT

Absolute path of the source file, or a VRT nested inline.

band: int = 1

1-based band of the source to read.

src_window: Window | None = None

Region of the source to read. GDAL maps the whole source onto the whole band only when both windows are None.

dst_window: Window | None = None

Region of the VRT band to write to.

nodata: float | None = None

Source value treated as nodata; setting it writes a ComplexSource.

lut: list[tuple[float, float]] | None = None

(input, output) pairs mapping source values; setting it writes a ComplexSource.

resampling: Resampling | None = None

Resampling used when the windows differ in size.

properties: SourceProperties | None = None
Header of the source raster.

Methods

Name Description
__eq__() Compare all fields, treating NaN nodata as equal.

__eq__()

Compare all fields, treating NaN nodata as equal.

Usage

Source

__eq__(other)
Parameters
other: object
Object to compare with.
Returns
bool
Whether other is a Source with equal fields.