13#ifndef GDAL_ALGORITHM_C_INCLUDED
14#define GDAL_ALGORITHM_C_INCLUDED
17#include "cpl_progress.h"
50} GDALAlgorithmArgType;
53bool CPL_DLL GDALAlgorithmArgTypeIsList(GDALAlgorithmArgType type);
56const char CPL_DLL *GDALAlgorithmArgTypeName(GDALAlgorithmArgType type);
59typedef struct GDALArgDatasetValueHS *GDALArgDatasetValueH;
62typedef struct GDALAlgorithmArgHS *GDALAlgorithmArgH;
65typedef struct GDALAlgorithmHS *GDALAlgorithmH;
68typedef struct GDALAlgorithmRegistryHS *GDALAlgorithmRegistryH;
74GDALAlgorithmRegistryH CPL_DLL GDALGetGlobalAlgorithmRegistry(
void);
76void CPL_DLL GDALAlgorithmRegistryRelease(GDALAlgorithmRegistryH);
78char CPL_DLL **GDALAlgorithmRegistryGetAlgNames(GDALAlgorithmRegistryH);
80GDALAlgorithmH CPL_DLL GDALAlgorithmRegistryInstantiateAlg(
81 GDALAlgorithmRegistryH,
const char *pszAlgName);
83GDALAlgorithmH CPL_DLL GDALAlgorithmRegistryInstantiateAlgFromPath(
84 GDALAlgorithmRegistryH,
const char *
const *papszAlgPath);
90void CPL_DLL GDALAlgorithmRelease(GDALAlgorithmH);
92const char CPL_DLL *GDALAlgorithmGetName(GDALAlgorithmH);
94const char CPL_DLL *GDALAlgorithmGetDescription(GDALAlgorithmH);
96const char CPL_DLL *GDALAlgorithmGetLongDescription(GDALAlgorithmH);
98const char CPL_DLL *GDALAlgorithmGetHelpFullURL(GDALAlgorithmH);
100bool CPL_DLL GDALAlgorithmHasSubAlgorithms(GDALAlgorithmH);
102char CPL_DLL **GDALAlgorithmGetSubAlgorithmNames(GDALAlgorithmH);
104GDALAlgorithmH CPL_DLL
105GDALAlgorithmInstantiateSubAlgorithm(GDALAlgorithmH,
const char *pszSubAlgName);
107bool CPL_DLL GDALAlgorithmParseCommandLineArguments(GDALAlgorithmH,
110char CPL_DLL **GDALAlgorithmGetArgDependencies(GDALAlgorithmH,
111 const char *pszArgumentName);
113GDALAlgorithmH CPL_DLL GDALAlgorithmGetActualAlgorithm(GDALAlgorithmH);
115bool CPL_DLL GDALAlgorithmRun(GDALAlgorithmH, GDALProgressFunc pfnProgress,
116 void *pProgressData);
118bool CPL_DLL GDALAlgorithmFinalize(GDALAlgorithmH);
120char CPL_DLL *GDALAlgorithmGetUsageAsJSON(GDALAlgorithmH);
122char CPL_DLL **GDALAlgorithmGetArgNames(GDALAlgorithmH);
124GDALAlgorithmArgH CPL_DLL GDALAlgorithmGetArg(GDALAlgorithmH,
125 const char *pszArgName);
127GDALAlgorithmArgH CPL_DLL GDALAlgorithmGetArgNonConst(GDALAlgorithmH,
128 const char *pszArgName);
134void CPL_DLL GDALAlgorithmArgRelease(GDALAlgorithmArgH);
136const char CPL_DLL *GDALAlgorithmArgGetName(GDALAlgorithmArgH);
138GDALAlgorithmArgType CPL_DLL GDALAlgorithmArgGetType(GDALAlgorithmArgH);
140const char CPL_DLL *GDALAlgorithmArgGetDescription(GDALAlgorithmArgH);
142const char CPL_DLL *GDALAlgorithmArgGetShortName(GDALAlgorithmArgH);
144char CPL_DLL **GDALAlgorithmArgGetAliases(GDALAlgorithmArgH);
146const char CPL_DLL *GDALAlgorithmArgGetMetaVar(GDALAlgorithmArgH);
148const char CPL_DLL *GDALAlgorithmArgGetCategory(GDALAlgorithmArgH);
150bool CPL_DLL GDALAlgorithmArgIsPositional(GDALAlgorithmArgH);
152bool CPL_DLL GDALAlgorithmArgIsRequired(GDALAlgorithmArgH);
154int CPL_DLL GDALAlgorithmArgGetMinCount(GDALAlgorithmArgH);
156int CPL_DLL GDALAlgorithmArgGetMaxCount(GDALAlgorithmArgH);
158bool CPL_DLL GDALAlgorithmArgGetPackedValuesAllowed(GDALAlgorithmArgH);
160bool CPL_DLL GDALAlgorithmArgGetRepeatedArgAllowed(GDALAlgorithmArgH);
162char CPL_DLL **GDALAlgorithmArgGetChoices(GDALAlgorithmArgH);
164char CPL_DLL **GDALAlgorithmArgGetMetadataItem(GDALAlgorithmArgH,
const char *);
166bool CPL_DLL GDALAlgorithmArgIsExplicitlySet(GDALAlgorithmArgH);
168bool CPL_DLL GDALAlgorithmArgHasDefaultValue(GDALAlgorithmArgH);
170bool CPL_DLL GDALAlgorithmArgGetDefaultAsBoolean(GDALAlgorithmArgH);
172const char CPL_DLL *GDALAlgorithmArgGetDefaultAsString(GDALAlgorithmArgH);
174int CPL_DLL GDALAlgorithmArgGetDefaultAsInteger(GDALAlgorithmArgH);
176double CPL_DLL GDALAlgorithmArgGetDefaultAsDouble(GDALAlgorithmArgH);
178char CPL_DLL **GDALAlgorithmArgGetDefaultAsStringList(GDALAlgorithmArgH);
180const int CPL_DLL *GDALAlgorithmArgGetDefaultAsIntegerList(GDALAlgorithmArgH,
183const double CPL_DLL *GDALAlgorithmArgGetDefaultAsDoubleList(GDALAlgorithmArgH,
186bool CPL_DLL GDALAlgorithmArgIsHidden(GDALAlgorithmArgH);
188bool CPL_DLL GDALAlgorithmArgIsHiddenForCLI(GDALAlgorithmArgH);
190bool CPL_DLL GDALAlgorithmArgIsHiddenForAPI(GDALAlgorithmArgH);
192bool CPL_DLL GDALAlgorithmArgIsAvailableInPipelineStep(GDALAlgorithmArgH);
195bool CPL_DLL GDALAlgorithmArgIsOnlyForCLI(GDALAlgorithmArgH)
196 CPL_WARN_DEPRECATED(
"Use GDALAlgorithmArgIsHiddenForAPI() instead");
199bool CPL_DLL GDALAlgorithmArgIsInput(GDALAlgorithmArgH);
201bool CPL_DLL GDALAlgorithmArgIsOutput(GDALAlgorithmArgH);
203const char CPL_DLL *GDALAlgorithmArgGetMutualExclusionGroup(GDALAlgorithmArgH);
205const char CPL_DLL *GDALAlgorithmArgGetMutualDependencyGroup(GDALAlgorithmArgH);
207bool CPL_DLL GDALAlgorithmArgGetAsBoolean(GDALAlgorithmArgH);
209const char CPL_DLL *GDALAlgorithmArgGetAsString(GDALAlgorithmArgH);
212 CPL_DLL GDALAlgorithmArgGetAsDatasetValue(GDALAlgorithmArgH);
214int CPL_DLL GDALAlgorithmArgGetAsInteger(GDALAlgorithmArgH);
216double CPL_DLL GDALAlgorithmArgGetAsDouble(GDALAlgorithmArgH);
218char CPL_DLL **GDALAlgorithmArgGetAsStringList(GDALAlgorithmArgH);
220char CPL_DLL **GDALAlgorithmArgGetDirectDependencies(GDALAlgorithmArgH);
222const int CPL_DLL *GDALAlgorithmArgGetAsIntegerList(GDALAlgorithmArgH,
225const double CPL_DLL *GDALAlgorithmArgGetAsDoubleList(GDALAlgorithmArgH,
228bool CPL_DLL GDALAlgorithmArgSetAsBoolean(GDALAlgorithmArgH,
bool);
230bool CPL_DLL GDALAlgorithmArgSetAsString(GDALAlgorithmArgH,
const char *);
232bool CPL_DLL GDALAlgorithmArgSetAsDatasetValue(GDALAlgorithmArgH hArg,
233 GDALArgDatasetValueH value);
235bool CPL_DLL GDALAlgorithmArgSetDataset(GDALAlgorithmArgH hArg,
GDALDatasetH);
237bool CPL_DLL GDALAlgorithmArgSetDatasets(GDALAlgorithmArgH hArg,
size_t nCount,
240bool CPL_DLL GDALAlgorithmArgSetDatasetNames(GDALAlgorithmArgH hArg,
243bool CPL_DLL GDALAlgorithmArgSetAsInteger(GDALAlgorithmArgH,
int);
245bool CPL_DLL GDALAlgorithmArgSetAsDouble(GDALAlgorithmArgH,
double);
247bool CPL_DLL GDALAlgorithmArgSetAsStringList(GDALAlgorithmArgH,
CSLConstList);
249bool CPL_DLL GDALAlgorithmArgSetAsIntegerList(GDALAlgorithmArgH,
size_t nCount,
250 const int *pnValues);
252bool CPL_DLL GDALAlgorithmArgSetAsDoubleList(GDALAlgorithmArgH,
size_t nCount,
253 const double *pnValues);
258typedef int GDALArgDatasetType;
260GDALArgDatasetType CPL_DLL GDALAlgorithmArgGetDatasetType(GDALAlgorithmArgH);
263#define GADV_NAME (1 << 0)
265#define GADV_OBJECT (1 << 1)
267int CPL_DLL GDALAlgorithmArgGetDatasetInputFlags(GDALAlgorithmArgH);
269int CPL_DLL GDALAlgorithmArgGetDatasetOutputFlags(GDALAlgorithmArgH);
275GDALArgDatasetValueH CPL_DLL GDALArgDatasetValueCreate(
void);
277void CPL_DLL GDALArgDatasetValueRelease(GDALArgDatasetValueH);
279const char CPL_DLL *GDALArgDatasetValueGetName(GDALArgDatasetValueH);
281GDALDatasetH CPL_DLL GDALArgDatasetValueGetDatasetRef(GDALArgDatasetValueH);
284 CPL_DLL GDALArgDatasetValueGetDatasetIncreaseRefCount(GDALArgDatasetValueH);
286void CPL_DLL GDALArgDatasetValueSetName(GDALArgDatasetValueH,
const char *);
288void CPL_DLL GDALArgDatasetValueSetDataset(GDALArgDatasetValueH,
GDALDatasetH);
Core portability definitions for CPL.
#define CPL_C_END
Macro to end a block of C symbols.
Definition cpl_port.h:279
#define CPL_C_START
Macro to start a block of C symbols.
Definition cpl_port.h:275
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1252
Public (C callable) GDAL entry points.
void * GDALDatasetH
Opaque type used for the C bindings of the C++ GDALDataset class.
Definition gdal_fwd.h:42