GDAL
gdal_utils_priv.h
1/******************************************************************************
2 *
3 * Project: GDAL Utilities
4 * Purpose: GDAL Utilities Private Declarations.
5 * Author: Even Rouault <even.rouault at spatialys.com>
6 *
7 * ****************************************************************************
8 * Copyright (c) 2015, Even Rouault <even.rouault at spatialys.com>
9 *
10 * SPDX-License-Identifier: MIT
11 ****************************************************************************/
12
13#ifndef GDAL_UTILS_PRIV_H_INCLUDED
14#define GDAL_UTILS_PRIV_H_INCLUDED
15
16#ifndef DOXYGEN_SKIP
17
18#include "cpl_port.h"
19#include "cpl_string.h"
20#include "gdal_utils.h"
21
22/* This file is only meant at being used by the XXXX_bin.cpp and XXXX_lib.cpp */
23
25
27{
28 /* Filename to open. */
29 std::string osFilename{};
30
31 /* Open options. */
32 CPLStringList aosOpenOptions{};
33
34 /* For reporting on a particular subdataset */
35 int nSubdataset = 0;
36
37 /* Allowed input drivers. */
38 CPLStringList aosAllowedInputDrivers{};
39};
40
42{
43 std::string osProcessing{};
44 std::string osSrcFilename{};
45 std::string osColorFilename{};
46 std::string osDstFilename{};
47 bool bQuiet = false;
48};
49
51
52/* Access modes */
53typedef enum
54{
55 ACCESS_CREATION,
56 ACCESS_UPDATE, /* open existing output datasource in update mode rather than
57 trying to create a new one */
58 ACCESS_APPEND, /* append to existing layer instead of creating new */
59 ACCESS_OVERWRITE /* delete the output layer and recreate it empty */
60} GDALVectorTranslateAccessMode;
61
63{
64 std::string osDataSource{};
65 std::string osDestDataSource{};
66 bool bQuiet = false;
67 CPLStringList aosOpenOptions{};
68 std::string osFormat{};
69 GDALVectorTranslateAccessMode eAccessMode = ACCESS_CREATION;
70 bool bShowUsageIfError = false;
71
72 /* Allowed input drivers. */
73 CPLStringList aosAllowInputDrivers{};
74};
75
77{
78 CPLStringList aosOpenOptions{};
79 CPLStringList aosCreationOptions{};
80 bool bQuiet = false;
81 std::string osDestDataSource{};
82 std::string osSrcDataSource{};
83};
84
86{
87 /* Filename to open. */
88 std::string osFilename{};
89
90 /* Allowed input drivers. */
91 CPLStringList aosAllowInputDrivers{};
92
93 /* Open options. */
94 CPLStringList aosOpenOptions{};
95};
96
98{
99 std::string osSource{};
100 std::string osDest{};
101 std::string osFormat{};
102 bool bQuiet = false;
103 bool bUpdate = false;
104
105 /* Allowed input drivers. */
106 CPLStringList aosAllowInputDrivers{};
107
108 /* Open options. */
109 CPLStringList aosOpenOptions{};
110};
111
113{
114 /* Filename to open. */
115 std::string osFilename{};
116
117 bool bVerbose = true;
118
119 bool bReadOnly = false;
120
121 bool bUpdate = false;
122
123 std::string osSQLStatement{};
124
125 /* Open options. */
126 CPLStringList aosOpenOptions{};
127
128 /* Allowed input drivers. */
129 CPLStringList aosAllowInputDrivers{};
130};
131
133{
134 std::string osSource{};
135 std::string osDest{};
136 bool bQuiet = false;
137 CPLStringList aosOpenOptions{};
138};
139
141{
142 std::string osSource{};
143 bool bDestSpecified = false;
144 std::string osDest{};
145 bool bQuiet = false;
146 CPLStringList aosOpenOptions{};
147 bool bCreateOutput = false;
148 std::string osFormat{};
149};
150
152{
153 std::string osSource{};
154 bool bDestSpecified = false;
155 std::string osDest{};
156 bool bQuiet = false;
157 CPLStringList aosOpenOptions{};
158 bool bCreateOutput = false;
159 std::string osFormat{};
160
162 bool bOverwrite = false;
163
164 std::string osDestLayerName{};
165};
166
168{
169 CPLStringList aosSrcFiles{};
170 bool bDestSpecified = false;
171 std::string osDest{};
172 bool bQuiet = false;
173};
174
176{
177 std::string osInFile{};
178 std::string osOutFile{};
179 bool bQuiet = false;
180};
181
183{
184 std::string osSource{};
185 std::string osDest{};
186 bool bQuiet = false;
187 bool bCopySubDatasets = false;
188 CPLStringList aosOpenOptions{};
189 CPLStringList aosCreateOptions{};
190 std::string osFormat{};
191
192 /* Allowed input drivers. */
193 CPLStringList aosAllowedInputDrivers{};
194};
195
197{
198 CPLStringList aosSrcFiles{};
199 std::string osDstFilename{};
200 bool bQuiet = false;
201 CPLStringList aosOpenOptions{};
202
204 CPLStringList aosDestOpenOptions{};
205
206 CPLStringList aosCreateOptions{};
207
208 bool bOverwrite = false;
209 bool bCreateOutput = false;
210
211 /* Allowed input drivers. */
212 CPLStringList aosAllowedInputDrivers{};
213};
214
216{
217 CPLStringList aosSrcFiles{};
218 std::string osDstFilename{};
219 bool bQuiet = false;
220 bool bOverwrite = false;
221};
222
223std::string CPL_DLL GDALNearblackGetParserUsage();
224
225std::string CPL_DLL GDALVectorInfoGetParserUsage();
226
227std::string CPL_DLL GDALTranslateGetParserUsage();
228
229std::string CPL_DLL GDALMultiDimTranslateAppGetParserUsage();
230
231std::string CPL_DLL GDALVectorTranslateGetParserUsage();
232
233std::string CPL_DLL GDALWarpAppGetParserUsage();
234
235std::string CPL_DLL GDALInfoAppGetParserUsage();
236
237std::string CPL_DLL GDALMultiDimInfoAppGetParserUsage();
238
239std::string CPL_DLL GDALGridGetParserUsage();
240
241std::string CPL_DLL GDALContourGetParserUsage();
242
243std::string CPL_DLL GDALBuildVRTGetParserUsage();
244
245std::string CPL_DLL GDALTileIndexAppGetParserUsage();
246
247std::string CPL_DLL GDALFootprintAppGetParserUsage();
248
249std::string CPL_DLL GDALRasterizeAppGetParserUsage();
250
256std::string CPL_DLL
257GDALDEMAppGetParserUsage(const std::string &osProcessingMode);
258
259GDALDatasetH GDALTileIndexInternal(const char *pszDest,
260 GDALDatasetH hTileIndexDS, OGRLayerH hLayer,
261 int nSrcCount,
262 const char *const *papszSrcDSNames,
263 const GDALTileIndexOptions *psOptionsIn,
264 int *pbUsageError);
265
266#endif /* #ifndef DOXYGEN_SKIP */
267
268#endif /* GDAL_UTILS_PRIV_H_INCLUDED */
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
Various convenience functions for working with strings and string lists.
void * GDALDatasetH
Opaque type used for the C bindings of the C++ GDALDataset class.
Definition gdal_fwd.h:42
void * OGRLayerH
Opaque type for a layer (OGRLayer).
Definition gdal_fwd.h:157
Public (C callable) GDAL Utilities entry points.
struct GDALBuildVRTOptionsForBinary GDALBuildVRTOptionsForBinary
Opaque type.
Definition gdal_utils.h:256
struct GDALInfoOptionsForBinary GDALInfoOptionsForBinary
Opaque type.
Definition gdal_utils.h:35
struct GDALFootprintOptionsForBinary GDALFootprintOptionsForBinary
Opaque type.
Definition gdal_utils.h:235
struct GDALMultiDimTranslateOptionsForBinary GDALMultiDimTranslateOptionsForBinary
Opaque type.
Definition gdal_utils.h:293
struct GDALVectorTranslateOptionsForBinary GDALVectorTranslateOptionsForBinary
Opaque type.
Definition gdal_utils.h:96
struct GDALVectorInfoOptionsForBinary GDALVectorInfoOptionsForBinary
Opaque type.
Definition gdal_utils.h:316
struct GDALWarpAppOptionsForBinary GDALWarpAppOptionsForBinary
Opaque type.
Definition gdal_utils.h:70
struct GDALDEMProcessingOptionsForBinary GDALDEMProcessingOptionsForBinary
Opaque type.
Definition gdal_utils.h:118
struct GDALNearblackOptionsForBinary GDALNearblackOptionsForBinary
Opaque type.
Definition gdal_utils.h:139
struct GDALGridOptionsForBinary GDALGridOptionsForBinary
Opaque type.
Definition gdal_utils.h:160
struct GDALTileIndexOptionsForBinary GDALTileIndexOptionsForBinary
Opaque type.
Definition gdal_utils.h:331
struct GDALMultiDimInfoOptionsForBinary GDALMultiDimInfoOptionsForBinary
Opaque type.
Definition gdal_utils.h:278
struct GDALTranslateOptionsForBinary GDALTranslateOptionsForBinary
Opaque type.
Definition gdal_utils.h:49
struct GDALContourOptionsForBinary GDALContourOptionsForBinary
Opaque type.
Definition gdal_utils.h:180
struct GDALRasterizeOptionsForBinary GDALRasterizeOptionsForBinary
Opaque type.
Definition gdal_utils.h:214