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 vector dataset when used as an input
to GDALOpenEx()
, or anywhere else in GDAL
where a vector 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 vector pipeline,
gdal vector reproject, gdal vector filter, gdal vector select,
gdal vector sql, etc.
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 vector reproject --dst-crs=EPSG:32632 in.gpkg --output-format stream streamed_dataset"
}
If such file is saved as reprojected.gdalg.json
, it can be for example read with
gdal vector info reprojected.gdalg.json
.
In the case of a gdal vector pipeline, the final write
step can be
omitted.
{
"type": "gdal_streamed_alg",
"command_line": "gdal vector pipeline ! read in.tif ! reproject --dst-crs=EPSG:32632 ! select --fields fid,geom"
}
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 raster capabilities as detailed in GDALG: GDAL Streamed Algorithm.
Driver capabilities
Supports Georeferencing
This driver supports georeferencing