GDAL
gdal_utils_priv.h
1/******************************************************************************
2 * $Id$
3 *
4 * Project: GDAL Utilities
5 * Purpose: GDAL Utilities Private Declarations.
6 * Author: Even Rouault <even.rouault at spatialys.com>
7 *
8 * ****************************************************************************
9 * Copyright (c) 2015, Even Rouault <even.rouault at spatialys.com>
10 *
11 * SPDX-License-Identifier: MIT
12 ****************************************************************************/
13
14#ifndef GDAL_UTILS_PRIV_H_INCLUDED
15#define GDAL_UTILS_PRIV_H_INCLUDED
16
17#ifndef DOXYGEN_SKIP
18
19#include "cpl_port.h"
20#include "cpl_string.h"
21#include "gdal_utils.h"
22
23/* This file is only meant at being used by the XXXX_bin.cpp and XXXX_lib.cpp
24 * files */
25
27
29{
30 /* Filename to open. */
31 std::string osFilename{};
32
33 /* Open options. */
34 CPLStringList aosOpenOptions{};
35
36 /* For reporting on a particular subdataset */
37 int nSubdataset = 0;
38
39 /* Allowed input drivers. */
40 CPLStringList aosAllowedInputDrivers{};
41};
42
44{
45 std::string osProcessing{};
46 std::string osSrcFilename{};
47 std::string osColorFilename{};
48 std::string osDstFilename{};
49 bool bQuiet = false;
50};
51
53
54/* Access modes */
55typedef enum
56{
57 ACCESS_CREATION,
58 ACCESS_UPDATE, /* open existing output datasource in update mode rather than
59 trying to create a new one */
60 ACCESS_APPEND, /* append to existing layer instead of creating new */
61 ACCESS_OVERWRITE /* delete the output layer and recreate it empty */
62} GDALVectorTranslateAccessMode;
63
65{
66 std::string osDataSource{};
67 std::string osDestDataSource{};
68 bool bQuiet = false;
69 CPLStringList aosOpenOptions{};
70 std::string osFormat{};
71 GDALVectorTranslateAccessMode eAccessMode = ACCESS_CREATION;
72 bool bShowUsageIfError = false;
73
74 /* Allowed input drivers. */
75 CPLStringList aosAllowInputDrivers{};
76};
77
79{
80 /* Filename to open. */
81 std::string osFilename{};
82
83 /* Allowed input drivers. */
84 CPLStringList aosAllowInputDrivers{};
85
86 /* Open options. */
87 CPLStringList aosOpenOptions{};
88};
89
91{
92 std::string osSource{};
93 std::string osDest{};
94 std::string osFormat{};
95 bool bQuiet = false;
96 bool bUpdate = false;
97
98 /* Allowed input drivers. */
99 CPLStringList aosAllowInputDrivers{};
100
101 /* Open options. */
102 CPLStringList aosOpenOptions{};
103};
104
106{
107 /* Filename to open. */
108 std::string osFilename{};
109
110 bool bVerbose = true;
111
112 bool bReadOnly = false;
113
114 bool bUpdate = false;
115
116 std::string osSQLStatement{};
117
118 /* Open options. */
119 CPLStringList aosOpenOptions{};
120
121 /* Allowed input drivers. */
122 CPLStringList aosAllowInputDrivers{};
123};
124
126{
127 std::string osSource{};
128 std::string osDest{};
129 bool bQuiet = false;
130 CPLStringList aosOpenOptions{};
131};
132
134{
135 std::string osSource{};
136 bool bDestSpecified = false;
137 std::string osDest{};
138 bool bQuiet = false;
139 CPLStringList aosOpenOptions{};
140 bool bCreateOutput = false;
141 std::string osFormat{};
142};
143
145{
146 std::string osSource{};
147 bool bDestSpecified = false;
148 std::string osDest{};
149 bool bQuiet = false;
150 CPLStringList aosOpenOptions{};
151 bool bCreateOutput = false;
152 std::string osFormat{};
153
155 bool bOverwrite = false;
156
157 std::string osDestLayerName{};
158};
159
161{
162 CPLStringList aosSrcFiles{};
163 bool bDestSpecified = false;
164 std::string osDest{};
165 bool bQuiet = false;
166};
167
169{
170 std::string osInFile{};
171 std::string osOutFile{};
172 bool bQuiet = false;
173};
174
176{
177 std::string osSource{};
178 std::string osDest{};
179 bool bQuiet = false;
180 bool bCopySubDatasets = false;
181 CPLStringList aosOpenOptions{};
182 std::string osFormat{};
183
184 /* Allowed input drivers. */
185 CPLStringList aosAllowedInputDrivers{};
186};
187
189{
190 CPLStringList aosSrcFiles{};
191 std::string osDstFilename{};
192 bool bQuiet = false;
193 CPLStringList aosOpenOptions{};
194
196 CPLStringList aosDestOpenOptions{};
197
198 CPLStringList aosCreateOptions{};
199
200 bool bOverwrite = false;
201 bool bCreateOutput = false;
202
203 /* Allowed input drivers. */
204 CPLStringList aosAllowedInputDrivers{};
205};
206
208{
209 CPLStringList aosSrcFiles{};
210 std::string osDstFilename{};
211 bool bQuiet = false;
212 bool bOverwrite = false;
213};
214
215std::string CPL_DLL GDALNearblackGetParserUsage();
216
217std::string CPL_DLL GDALVectorInfoGetParserUsage();
218
219std::string CPL_DLL GDALTranslateGetParserUsage();
220
221std::string CPL_DLL GDALMultiDimTranslateAppGetParserUsage();
222
223std::string CPL_DLL GDALVectorTranslateGetParserUsage();
224
225std::string CPL_DLL GDALWarpAppGetParserUsage();
226
227std::string CPL_DLL GDALInfoAppGetParserUsage();
228
229std::string CPL_DLL GDALMultiDimInfoAppGetParserUsage();
230
231std::string CPL_DLL GDALGridGetParserUsage();
232
233std::string CPL_DLL GDALBuildVRTGetParserUsage();
234
235std::string CPL_DLL GDALTileIndexAppGetParserUsage();
236
237std::string CPL_DLL GDALFootprintAppGetParserUsage();
238
239std::string CPL_DLL GDALRasterizeAppGetParserUsage();
240
246std::string CPL_DLL
247GDALDEMAppGetParserUsage(const std::string &osProcessingMode);
248
249#endif /* #ifndef DOXYGEN_SKIP */
250
251#endif /* GDAL_UTILS_PRIV_H_INCLUDED */
String list class designed around our use of C "char**" string lists.
Definition: cpl_string.h:436
Core portability definitions for CPL.
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:283
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:279
Various convenience functions for working with strings and string lists.
Public (C callable) GDAL Utilities entry points.
struct GDALBuildVRTOptionsForBinary GDALBuildVRTOptionsForBinary
Opaque type.
Definition: gdal_utils.h:223
struct GDALInfoOptionsForBinary GDALInfoOptionsForBinary
Opaque type.
Definition: gdal_utils.h:36
struct GDALFootprintOptionsForBinary GDALFootprintOptionsForBinary
Opaque type.
Definition: gdal_utils.h:202
struct GDALMultiDimTranslateOptionsForBinary GDALMultiDimTranslateOptionsForBinary
Opaque type.
Definition: gdal_utils.h:260
struct GDALVectorTranslateOptionsForBinary GDALVectorTranslateOptionsForBinary
Opaque type.
Definition: gdal_utils.h:97
struct GDALVectorInfoOptionsForBinary GDALVectorInfoOptionsForBinary
Opaque type.
Definition: gdal_utils.h:283
struct GDALWarpAppOptionsForBinary GDALWarpAppOptionsForBinary
Opaque type.
Definition: gdal_utils.h:71
struct GDALDEMProcessingOptionsForBinary GDALDEMProcessingOptionsForBinary
Opaque type.
Definition: gdal_utils.h:119
struct GDALNearblackOptionsForBinary GDALNearblackOptionsForBinary
Opaque type.
Definition: gdal_utils.h:140
struct GDALGridOptionsForBinary GDALGridOptionsForBinary
Opaque type.
Definition: gdal_utils.h:161
struct GDALTileIndexOptionsForBinary GDALTileIndexOptionsForBinary
Opaque type.
Definition: gdal_utils.h:298
struct GDALMultiDimInfoOptionsForBinary GDALMultiDimInfoOptionsForBinary
Opaque type.
Definition: gdal_utils.h:245
struct GDALTranslateOptionsForBinary GDALTranslateOptionsForBinary
Opaque type.
Definition: gdal_utils.h:50
struct GDALRasterizeOptionsForBinary GDALRasterizeOptionsForBinary
Opaque type.
Definition: gdal_utils.h:181