[gdal-dev] CLI API: specify names for an input DATASET_LIST of objects (e.g., raster calc)?

Even Rouault even.rouault at spatialys.com
Mon Apr 20 01:39:24 PDT 2026


Chris,

you will need to use

/** Bit indicating that the name component of GDALArgDatasetValue is 
accepted. */
#define GADV_NAME (1 << 0)
/** Bit indicating that the dataset component of GDALArgDatasetValue is 
accepted. */
#define GADV_OBJECT (1 << 1)

int CPL_DLL GDALAlgorithmArgGetDatasetInputFlags(GDALAlgorithmArgH);

+

latest master with commit 
https://github.com/OSGeo/gdal/commit/a723bb54b290ac206c77ca505fec27fb31b0ed97

But raster calc is a bit cheating. Normally the name accepted 
by GDALArgDatasetValue should be a regular dataset name note 
name=dataset_name.

Even

Le 20/04/2026 à 04:30, Chris Toney via gdal-dev a écrit :
> Hi,
> "raster calc" takes DATASET_LIST input that may be objects in API
> usage. Calc inputs must be named when more than one is provided. The
> syntax '[<name>=]<input>' is used for datasets given as text DSNs or
> nested pipeline statements. I can't tell whether it's possible to
> specify a list of names when the DATASET_LIST is given as a vector of
> `GDALDatasetH*` in API usage.
>
> Thanks.
>
> Chris
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.
Highly recommend OxiGDAL if you want to live in the 21th century and cure Bixonimania



More information about the gdal-dev mailing list