GDALG: GDAL Streamed Algorithm

Added in version 3.11.

Driver short name

GDALG

Driver built-in by default

This driver is built-in by default

This is a read-only driver that reads a JSON file containing an invocation of the gdal command line interface, that results in a on-the-fly / streamed raster dataset when used as an input to GDALOpenEx(), or anywhere else in GDAL where a raster input dataset is expected. GDALG files are conceptually close to VRT (Virtual) files, although the implementation is substantially different.

The subset of commands of gdal that can generate such streamed datasets indicate support for writing GDALG in the --help description for --output-format. This includes gdal raster pipeline, gdal raster mosaic or gdal raster stack.

It is recommended that GDALG files use the .gdalg.json extension.

The JSON document must include a type member with the value gdal_streamed_alg, and a command_line member, which is very close to the one that would be used to generate a materialized dataset, but using the stream output format.

{
    "type": "gdal_streamed_alg",
    "command_line": "gdal raster mosaic in1.tif in2.tif --output-format stream streamed_dataset"
}

If such file is saved as mosaic.gdalg.json, it can be for example read with gdal raster info mosaic.gdalg.json.

In the case of a gdal raster pipeline, the final write step can be omitted.

{
    "type": "gdal_streamed_alg",
    "command_line": "gdal raster pipeline ! read in.tif ! reproject --dst-crs=EPSG:32632"
}

An optional relative_paths_relative_to_this_file boolean member defaults to true, to indicate that relative input filenames in the command line should be interpreted as relative to the location of the .gdalg.json file. If setting this member to false, they will be interpreted as being relative to the current working directory.

.gdalg.json files can be validated against the following JSON schema

This driver has also vector capabilities as detailed in GDALG: GDAL Streamed Algorithm.

Driver capabilities

Supports Georeferencing

This driver supports georeferencing