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,
110GDALAlgorithmH CPL_DLL GDALAlgorithmGetActualAlgorithm(GDALAlgorithmH);
112bool CPL_DLL GDALAlgorithmRun(GDALAlgorithmH, GDALProgressFunc pfnProgress,
113 void *pProgressData);
115bool CPL_DLL GDALAlgorithmFinalize(GDALAlgorithmH);
117char CPL_DLL *GDALAlgorithmGetUsageAsJSON(GDALAlgorithmH);
119char CPL_DLL **GDALAlgorithmGetArgNames(GDALAlgorithmH);
121GDALAlgorithmArgH CPL_DLL GDALAlgorithmGetArg(GDALAlgorithmH,
122 const char *pszArgName);
124GDALAlgorithmArgH CPL_DLL GDALAlgorithmGetArgNonConst(GDALAlgorithmH,
125 const char *pszArgName);
131void CPL_DLL GDALAlgorithmArgRelease(GDALAlgorithmArgH);
133const char CPL_DLL *GDALAlgorithmArgGetName(GDALAlgorithmArgH);
135GDALAlgorithmArgType CPL_DLL GDALAlgorithmArgGetType(GDALAlgorithmArgH);
137const char CPL_DLL *GDALAlgorithmArgGetDescription(GDALAlgorithmArgH);
139const char CPL_DLL *GDALAlgorithmArgGetShortName(GDALAlgorithmArgH);
141char CPL_DLL **GDALAlgorithmArgGetAliases(GDALAlgorithmArgH);
143const char CPL_DLL *GDALAlgorithmArgGetMetaVar(GDALAlgorithmArgH);
145const char CPL_DLL *GDALAlgorithmArgGetCategory(GDALAlgorithmArgH);
147bool CPL_DLL GDALAlgorithmArgIsPositional(GDALAlgorithmArgH);
149bool CPL_DLL GDALAlgorithmArgIsRequired(GDALAlgorithmArgH);
151int CPL_DLL GDALAlgorithmArgGetMinCount(GDALAlgorithmArgH);
153int CPL_DLL GDALAlgorithmArgGetMaxCount(GDALAlgorithmArgH);
155bool CPL_DLL GDALAlgorithmArgGetPackedValuesAllowed(GDALAlgorithmArgH);
157bool CPL_DLL GDALAlgorithmArgGetRepeatedArgAllowed(GDALAlgorithmArgH);
159char CPL_DLL **GDALAlgorithmArgGetChoices(GDALAlgorithmArgH);
161char CPL_DLL **GDALAlgorithmArgGetMetadataItem(GDALAlgorithmArgH,
const char *);
163bool CPL_DLL GDALAlgorithmArgIsExplicitlySet(GDALAlgorithmArgH);
165bool CPL_DLL GDALAlgorithmArgHasDefaultValue(GDALAlgorithmArgH);
167bool CPL_DLL GDALAlgorithmArgGetDefaultAsBoolean(GDALAlgorithmArgH);
169const char CPL_DLL *GDALAlgorithmArgGetDefaultAsString(GDALAlgorithmArgH);
171int CPL_DLL GDALAlgorithmArgGetDefaultAsInteger(GDALAlgorithmArgH);
173double CPL_DLL GDALAlgorithmArgGetDefaultAsDouble(GDALAlgorithmArgH);
175char CPL_DLL **GDALAlgorithmArgGetDefaultAsStringList(GDALAlgorithmArgH);
177const int CPL_DLL *GDALAlgorithmArgGetDefaultAsIntegerList(GDALAlgorithmArgH,
180const double CPL_DLL *GDALAlgorithmArgGetDefaultAsDoubleList(GDALAlgorithmArgH,
183bool CPL_DLL GDALAlgorithmArgIsHidden(GDALAlgorithmArgH);
185bool CPL_DLL GDALAlgorithmArgIsHiddenForCLI(GDALAlgorithmArgH);
187bool CPL_DLL GDALAlgorithmArgIsHiddenForAPI(GDALAlgorithmArgH);
190bool CPL_DLL GDALAlgorithmArgIsOnlyForCLI(GDALAlgorithmArgH)
191 CPL_WARN_DEPRECATED(
"Use GDALAlgorithmArgIsHiddenForAPI() instead");
194bool CPL_DLL GDALAlgorithmArgIsInput(GDALAlgorithmArgH);
196bool CPL_DLL GDALAlgorithmArgIsOutput(GDALAlgorithmArgH);
198const char CPL_DLL *GDALAlgorithmArgGetMutualExclusionGroup(GDALAlgorithmArgH);
200bool CPL_DLL GDALAlgorithmArgGetAsBoolean(GDALAlgorithmArgH);
202const char CPL_DLL *GDALAlgorithmArgGetAsString(GDALAlgorithmArgH);
205 CPL_DLL GDALAlgorithmArgGetAsDatasetValue(GDALAlgorithmArgH);
207int CPL_DLL GDALAlgorithmArgGetAsInteger(GDALAlgorithmArgH);
209double CPL_DLL GDALAlgorithmArgGetAsDouble(GDALAlgorithmArgH);
211char CPL_DLL **GDALAlgorithmArgGetAsStringList(GDALAlgorithmArgH);
213const int CPL_DLL *GDALAlgorithmArgGetAsIntegerList(GDALAlgorithmArgH,
216const double CPL_DLL *GDALAlgorithmArgGetAsDoubleList(GDALAlgorithmArgH,
219bool CPL_DLL GDALAlgorithmArgSetAsBoolean(GDALAlgorithmArgH,
bool);
221bool CPL_DLL GDALAlgorithmArgSetAsString(GDALAlgorithmArgH,
const char *);
223bool CPL_DLL GDALAlgorithmArgSetAsDatasetValue(GDALAlgorithmArgH hArg,
224 GDALArgDatasetValueH value);
226bool CPL_DLL GDALAlgorithmArgSetDataset(GDALAlgorithmArgH hArg,
GDALDatasetH);
228bool CPL_DLL GDALAlgorithmArgSetDatasets(GDALAlgorithmArgH hArg,
size_t nCount,
231bool CPL_DLL GDALAlgorithmArgSetDatasetNames(GDALAlgorithmArgH hArg,
234bool CPL_DLL GDALAlgorithmArgSetAsInteger(GDALAlgorithmArgH,
int);
236bool CPL_DLL GDALAlgorithmArgSetAsDouble(GDALAlgorithmArgH,
double);
238bool CPL_DLL GDALAlgorithmArgSetAsStringList(GDALAlgorithmArgH,
CSLConstList);
240bool CPL_DLL GDALAlgorithmArgSetAsIntegerList(GDALAlgorithmArgH,
size_t nCount,
241 const int *pnValues);
243bool CPL_DLL GDALAlgorithmArgSetAsDoubleList(GDALAlgorithmArgH,
size_t nCount,
244 const double *pnValues);
249typedef int GDALArgDatasetType;
251GDALArgDatasetType CPL_DLL GDALAlgorithmArgGetDatasetType(GDALAlgorithmArgH);
254#define GADV_NAME (1 << 0)
256#define GADV_OBJECT (1 << 1)
258int CPL_DLL GDALAlgorithmArgGetDatasetInputFlags(GDALAlgorithmArgH);
260int CPL_DLL GDALAlgorithmArgGetDatasetOutputFlags(GDALAlgorithmArgH);
266GDALArgDatasetValueH CPL_DLL GDALArgDatasetValueCreate(
void);
268void CPL_DLL GDALArgDatasetValueRelease(GDALArgDatasetValueH);
270const char CPL_DLL *GDALArgDatasetValueGetName(GDALArgDatasetValueH);
272GDALDatasetH CPL_DLL GDALArgDatasetValueGetDatasetRef(GDALArgDatasetValueH);
275 CPL_DLL GDALArgDatasetValueGetDatasetIncreaseRefCount(GDALArgDatasetValueH);
277void CPL_DLL GDALArgDatasetValueSetName(GDALArgDatasetValueH,
const char *);
279void 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:289
#define CPL_C_START
Macro to start a block of C symbols.
Definition cpl_port.h:285
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1087
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