gdal.reduce_vrt

Build a Virtual Raster from a collection of rasters (fan-in after a map).

  • Kind: reduce
  • Network: no

Inputs🔗

NameTypeDescription
tilescollection of file (GeoTIFF)Rasters produced by the upstream mapped blocks.
resolutionstringOne of highest, lowest, average, user (default highest).

Outputs🔗

NameTypeDescription
vrtfile (VRT)Virtual raster over the gathered tiles, packaged with copies of the tiles under sources/.

Output layout🔗

A VRT is an XML file of references to other rasters, and the runtime moves the file: into outputs/<name>/, then into a downstream block's inputs/<name>/, usually on another machine. GDAL records those references relative to where the VRT was written, so a bare VRT does not survive the trip. This block therefore publishes the VRT with copies of its sources beside it:

outputs/vrt/
  mosaic.vrt
  sources/
    0000_0_tile.tif
    0001_1_tile.tif

Every reference in mosaic.vrt points into sources/, so the bundle reads identically wherever it is staged. A downstream raster input receives mosaic.vrt as its file and the sources/ directory travels with it. The tile bytes move once, at upload, so the fan-in is not free; what stays lazy is the read, which touches only the tiles a window needs. References the runtime does not move (/vsis3/, /vsicurl/) are left as written.

One limit: a bundle gathered into a kind: reduce block as one member of its collection does not survive, because the gather renames every top-level entry with the sibling's index and the VRT's references no longer match.

To broadcast the result cheaply — into a map over thousands of regions, say — follow it with platform.normalize_vrt, which rewrites the bundle to a few kilobytes of object references that read their sources lazily wherever the runtime stages them.