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  * Permission is hereby granted, free of charge, to any person obtaining a
12  * copy of this software and associated documentation files (the "Software"),
13  * to deal in the Software without restriction, including without limitation
14  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15  * and/or sell copies of the Software, and to permit persons to whom the
16  * Software is furnished to do so, subject to the following conditions:
17  *
18  * The above copyright notice and this permission notice shall be included
19  * in all copies or substantial portions of the Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27  * DEALINGS IN THE SOFTWARE.
28  ****************************************************************************/
29 
30 #ifndef GDAL_UTILS_PRIV_H_INCLUDED
31 #define GDAL_UTILS_PRIV_H_INCLUDED
32 
33 #ifndef DOXYGEN_SKIP
34 
35 #include "cpl_port.h"
36 #include "cpl_string.h"
37 #include "gdal_utils.h"
38 
39 /* This file is only meant at being used by the XXXX_bin.cpp and XXXX_lib.cpp
40  * files */
41 
43 
45 {
46  /* Filename to open. */
47  char *pszFilename;
48 
49  /* Open options. */
50  char **papszOpenOptions;
51 
52  /* > for reporting on a particular subdataset */
53  int nSubdataset;
54 
55  /* Allowed input drivers. */
56  char **papszAllowInputDrivers;
57 };
58 
60 {
61  char *pszSource;
62  char *pszDest;
63  int bQuiet;
64  int bCopySubDatasets;
65  char **papszOpenOptions;
66  char *pszFormat;
67 
68  /* Allowed input drivers. */
69  char **papszAllowInputDrivers;
70 };
71 
73 {
74  char **papszSrcFiles;
75  char *pszDstFilename;
76  int bQuiet;
77  char **papszOpenOptions;
78 
80  char **papszDestOpenOptions;
81 
82  char **papszCreateOptions;
83 
84  int bOverwrite;
85  int bCreateOutput;
86 
87  /* Allowed input drivers. */
88  char **papszAllowInputDrivers;
89 };
90 
91 /* Access modes */
92 typedef enum
93 {
94  ACCESS_CREATION,
95  ACCESS_UPDATE, /* open existing output datasource in update mode rather than
96  trying to create a new one */
97  ACCESS_APPEND, /* append to existing layer instead of creating new */
98  ACCESS_OVERWRITE /* delete the output layer and recreate it empty */
99 } GDALVectorTranslateAccessMode;
100 
102 {
103  char *pszDataSource;
104  char *pszDestDataSource;
105  int bQuiet;
106  char **papszOpenOptions;
107  char *pszFormat;
108  GDALVectorTranslateAccessMode eAccessMode;
109 };
110 
112 {
113  char *pszProcessing;
114  char *pszSrcFilename;
115  char *pszColorFilename;
116  char *pszDstFilename;
117  int bQuiet;
118 };
119 
121 {
122  char *pszInFile;
123  char *pszOutFile;
124  int bQuiet;
125 };
126 
128 {
129  int nSrcFiles;
130  char **papszSrcFiles;
131  char *pszDstFilename;
132  int bQuiet;
133  int bOverwrite;
134 };
135 
136 CPL_C_END
137 
139 {
140  /* Filename to open. */
141  std::string osFilename{};
142 
143  /* Allowed input drivers. */
144  CPLStringList aosAllowInputDrivers{};
145 
146  /* Open options. */
147  CPLStringList aosOpenOptions{};
148 };
149 
151 {
152  std::string osSource{};
153  std::string osDest{};
154  std::string osFormat{};
155  bool bQuiet = false;
156  bool bUpdate = false;
157 
158  /* Allowed input drivers. */
159  CPLStringList aosAllowInputDrivers{};
160 
161  /* Open options. */
162  CPLStringList aosOpenOptions{};
163 };
164 
166 {
167  /* Filename to open. */
168  std::string osFilename{};
169 
170  bool bVerbose = true;
171 
172  bool bReadOnly = false;
173 
174  bool bUpdate = false;
175 
176  std::string osSQLStatement{};
177 
178  /* Open options. */
179  CPLStringList aosOpenOptions{};
180 
181  /* Allowed input drivers. */
182  CPLStringList aosAllowInputDrivers{};
183 };
184 
186 {
187  std::string osSource{};
188  bool bDestSpecified = false;
189  std::string osDest{};
190  bool bQuiet = false;
191  CPLStringList aosOpenOptions{};
192 };
193 
195 {
196  std::string osSource{};
197  bool bDestSpecified = false;
198  std::string osDest{};
199  bool bQuiet = false;
200  CPLStringList aosOpenOptions{};
201  bool bCreateOutput = false;
202  std::string osFormat{};
203 };
204 
206 {
207  std::string osSource{};
208  bool bDestSpecified = false;
209  std::string osDest{};
210  bool bQuiet = false;
211  CPLStringList aosOpenOptions{};
212  bool bCreateOutput = false;
213  std::string osFormat{};
214 
216  bool bOverwrite = false;
217 
218  std::string osDestLayerName{};
219 };
220 
221 #endif /* #ifndef DOXYGEN_SKIP */
222 
223 #endif /* GDAL_UTILS_PRIV_H_INCLUDED */
GDALVectorInfoOptionsForBinary
struct GDALVectorInfoOptionsForBinary GDALVectorInfoOptionsForBinary
Opaque type.
Definition: gdal_utils.h:299
CPLStringList
String list class designed around our use of C "char**" string lists.
Definition: cpl_string.h:437
gdal_utils.h
GDALDEMProcessingOptionsForBinary
struct GDALDEMProcessingOptionsForBinary GDALDEMProcessingOptionsForBinary
Opaque type.
Definition: gdal_utils.h:135
GDALTranslateOptionsForBinary
struct GDALTranslateOptionsForBinary GDALTranslateOptionsForBinary
Opaque type.
Definition: gdal_utils.h:66
GDALInfoOptionsForBinary
struct GDALInfoOptionsForBinary GDALInfoOptionsForBinary
Opaque type.
Definition: gdal_utils.h:52
GDALMultiDimInfoOptionsForBinary
struct GDALMultiDimInfoOptionsForBinary GDALMultiDimInfoOptionsForBinary
Opaque type.
Definition: gdal_utils.h:261
CPL_C_START
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:306
GDALMultiDimTranslateOptionsForBinary
struct GDALMultiDimTranslateOptionsForBinary GDALMultiDimTranslateOptionsForBinary
Opaque type.
Definition: gdal_utils.h:276
CPL_C_END
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:310
cpl_string.h
GDALWarpAppOptionsForBinary
struct GDALWarpAppOptionsForBinary GDALWarpAppOptionsForBinary
Opaque type.
Definition: gdal_utils.h:87
GDALRasterizeOptionsForBinary
struct GDALRasterizeOptionsForBinary GDALRasterizeOptionsForBinary
Opaque type.
Definition: gdal_utils.h:197
GDALBuildVRTOptionsForBinary
struct GDALBuildVRTOptionsForBinary GDALBuildVRTOptionsForBinary
Opaque type.
Definition: gdal_utils.h:239
cpl_port.h
GDALGridOptionsForBinary
struct GDALGridOptionsForBinary GDALGridOptionsForBinary
Opaque type.
Definition: gdal_utils.h:177
GDALFootprintOptionsForBinary
struct GDALFootprintOptionsForBinary GDALFootprintOptionsForBinary
Opaque type.
Definition: gdal_utils.h:218
GDALVectorTranslateOptionsForBinary
struct GDALVectorTranslateOptionsForBinary GDALVectorTranslateOptionsForBinary
Opaque type.
Definition: gdal_utils.h:113
GDALNearblackOptionsForBinary
struct GDALNearblackOptionsForBinary GDALNearblackOptionsForBinary
Opaque type.
Definition: gdal_utils.h:156