Skip to content

VRTFetcher

Bases: FromConfigMixin

Data fetcher for virtual rasters

Implements the DataFetcher protocol.

PARAMETER DESCRIPTION
path

path to the virtual raster (.vrt file)

TYPE: Path

tile_size

tile size in meters

TYPE: TileSize

ground_sampling_distance

ground sampling distance in meters

TYPE: GroundSamplingDistance

interpolation_mode

interpolation mode (BILINEAR or NEAREST)

TYPE: InterpolationMode DEFAULT: InterpolationMode.BILINEAR

buffer_size

buffer size in meters (specifies the area around the tile that is additionally fetched)

TYPE: BufferSize DEFAULT: 0

drop_channels

channel indices to drop (supports negative indexing)

TYPE: list[int] | None DEFAULT: None

from_config classmethod

Creates a vrt fetcher from the configuration.

PARAMETER DESCRIPTION
config

configuration

TYPE: VRTFetcherConfig

RETURNS DESCRIPTION
VRTFetcher

vrt fetcher

__call__

Fetches data from the virtual raster.

PARAMETER DESCRIPTION
x_min

minimum x coordinate

TYPE: Coordinate

y_min

minimum y coordinate

TYPE: Coordinate

RETURNS DESCRIPTION
npt.NDArray

data


VRTFetcherConfig

Bases: pydantic.BaseModel

Configuration for the from_config class method of VRTFetcher

ATTRIBUTE DESCRIPTION
path

path to the virtual raster (.vrt file)

TYPE: Path

tile_size

tile size in meters

TYPE: TileSize

ground_sampling_distance

ground sampling distance in meters

TYPE: GroundSamplingDistance

interpolation_mode

interpolation mode ('bilinear' or 'nearest')

TYPE: InterpolationMode

buffer_size

buffer size in meters (specifies the area around the tile that is additionally fetched)

TYPE: BufferSize

drop_channels

channel indices to drop (supports negative indexing)

TYPE: list[int] | None