VRTFetcher
Tile fetcher for virtual rasters
Implements the TileFetcher
protocol.
PARAMETER | DESCRIPTION |
---|---|
path
|
Path to the virtual raster (.vrt file)
TYPE:
|
channel_keys
|
Channel name, channel name and time step combination, channel names, or channel name and time step combinations (if None, the channel is ignored)
TYPE:
|
tile_size
|
Tile size in meters
TYPE:
|
ground_sampling_distance
|
Ground sampling distance in meters
TYPE:
|
interpolation_mode
|
Interpolation mode (
TYPE:
|
buffer_size
|
Buffer size in meters
TYPE:
|
from_config
classmethod
Creates a VRT fetcher from the configuration.
PARAMETER | DESCRIPTION |
---|---|
config
|
Configuration
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
VRTFetcher
|
VRT fetcher |
__call__
Fetches a tile from the virtual raster.
PARAMETER | DESCRIPTION |
---|---|
coordinates
|
Coordinates (x_min, y_min) of the tile in meters
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Tile
|
Tile |
VRTFetcherConfig
Bases: pydantic.BaseModel
Configuration for the from_config
class method of VRTFetcher
Create the configuration from a config file
- Use 'bilinear' or 'nearest' instead of
InterpolationMode.BILINEAR
orInterpolationMode.NEAREST
- Use null instead of None
Example
You can create the configuration from a config file.
package: 'aviary'
name: 'VRTFetcher'
config:
path: 'path/to/my_vrt.vrt'
channel_keys:
- 'r'
- 'g'
- 'b'
tile_size: 128
ground_sampling_distance: .2
interpolation_mode: 'bilinear'
buffer_size: 0
ATTRIBUTE | DESCRIPTION |
---|---|
path |
Path to the virtual raster (.vrt file)
TYPE:
|
channel_keys |
Channel name, channel name and time step combination, channel names, or channel name and time step combinations (if None, the channel is ignored)
TYPE:
|
tile_size |
Tile size in meters
TYPE:
|
ground_sampling_distance |
Ground sampling distance in meters
TYPE:
|
interpolation_mode |
Interpolation mode (
TYPE:
|
buffer_size |
Buffer size in meters (specifies the area around the tile that is additionally fetched) - defaults to 0
TYPE:
|