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 files */
40 
42 
44 {
45  /* Filename to open. */
46  char* pszFilename;
47 
48  /* Open options. */
49  char** papszOpenOptions;
50 
51  /* > for reporting on a particular subdataset */
52  int nSubdataset;
53 
54  /* Allowed input drivers. */
55  char** papszAllowInputDrivers;
56 };
57 
59 {
60  char* pszSource;
61  char* pszDest;
62  int bQuiet;
63  int bCopySubDatasets;
64  char** papszOpenOptions;
65  char* pszFormat;
66 
67  /* Allowed input drivers. */
68  char** papszAllowInputDrivers;
69 };
70 
72 {
73  char** papszSrcFiles;
74  char* pszDstFilename;
75  int bQuiet;
76  char** papszOpenOptions;
77 
79  char **papszDestOpenOptions;
80 
81  char **papszCreateOptions;
82 
83  int bOverwrite;
84  int bCreateOutput;
85 
86  /* Allowed input drivers. */
87  char** papszAllowInputDrivers;
88 };
89 
90 /* Access modes */
91 typedef enum
92 {
93  ACCESS_CREATION,
94  ACCESS_UPDATE, /* open existing output datasource in update mode rather than trying to create a new one */
95  ACCESS_APPEND, /* append to existing layer instead of creating new */
96  ACCESS_OVERWRITE /* delete the output layer and recreate it empty */
97 } GDALVectorTranslateAccessMode;
98 
100 {
101  char* pszDataSource;
102  char* pszDestDataSource;
103  int bQuiet;
104  char** papszOpenOptions;
105  char* pszFormat;
106  GDALVectorTranslateAccessMode eAccessMode;
107 };
108 
110 {
111  char* pszProcessing;
112  char* pszSrcFilename;
113  char* pszColorFilename;
114  char* pszDstFilename;
115  int bQuiet;
116 };
117 
119 {
120  char* pszInFile;
121  char* pszOutFile;
122  int bQuiet;
123 };
124 
126 {
127  char* pszSource;
128  char* pszDest;
129  int bQuiet;
130  char* pszFormat;
131 };
132 
134 {
135  char* pszSource;
136  char* pszDest;
137  int bQuiet;
138  char* pszFormat;
139  int bCreateOutput;
140 };
141 
143 {
144  int nSrcFiles;
145  char** papszSrcFiles;
146  char* pszDstFilename;
147  int bQuiet;
148  int bOverwrite;
149 };
150 
151 CPL_C_END
152 
154 {
155  /* Filename to open. */
156  std::string osFilename{};
157 
158  /* Allowed input drivers. */
159  CPLStringList aosAllowInputDrivers{};
160 
161  /* Open options. */
162  CPLStringList aosOpenOptions{};
163 };
164 
166 {
167  std::string osSource{};
168  std::string osDest{};
169  std::string osFormat{};
170  bool bQuiet = false;
171  bool bUpdate = false;
172 
173  /* Allowed input drivers. */
174  CPLStringList aosAllowInputDrivers{};
175 
176  /* Open options. */
177  CPLStringList aosOpenOptions{};
178 };
179 
180 #endif /* #ifndef DOXYGEN_SKIP */
181 
182 #endif /* GDAL_UTILS_PRIV_H_INCLUDED */
CPLStringList
String list class designed around our use of C "char**" string lists.
Definition: cpl_string.h:429
gdal_utils.h
GDALDEMProcessingOptionsForBinary
struct GDALDEMProcessingOptionsForBinary GDALDEMProcessingOptionsForBinary
Opaque type.
Definition: gdal_utils.h:127
GDALTranslateOptionsForBinary
struct GDALTranslateOptionsForBinary GDALTranslateOptionsForBinary
Opaque type.
Definition: gdal_utils.h:64
GDALInfoOptionsForBinary
struct GDALInfoOptionsForBinary GDALInfoOptionsForBinary
Opaque type.
Definition: gdal_utils.h:52
GDALMultiDimInfoOptionsForBinary
struct GDALMultiDimInfoOptionsForBinary GDALMultiDimInfoOptionsForBinary
Opaque type.
Definition: gdal_utils.h:226
CPL_C_START
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:304
GDALMultiDimTranslateOptionsForBinary
struct GDALMultiDimTranslateOptionsForBinary GDALMultiDimTranslateOptionsForBinary
Opaque type.
Definition: gdal_utils.h:239
CPL_C_END
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:306
cpl_string.h
GDALWarpAppOptionsForBinary
struct GDALWarpAppOptionsForBinary GDALWarpAppOptionsForBinary
Opaque type.
Definition: gdal_utils.h:84
GDALRasterizeOptionsForBinary
struct GDALRasterizeOptionsForBinary GDALRasterizeOptionsForBinary
Opaque type.
Definition: gdal_utils.h:187
GDALBuildVRTOptionsForBinary
struct GDALBuildVRTOptionsForBinary GDALBuildVRTOptionsForBinary
Opaque type.
Definition: gdal_utils.h:206
cpl_port.h
GDALGridOptionsForBinary
struct GDALGridOptionsForBinary GDALGridOptionsForBinary
Opaque type.
Definition: gdal_utils.h:168
GDALVectorTranslateOptionsForBinary
struct GDALVectorTranslateOptionsForBinary GDALVectorTranslateOptionsForBinary
Opaque type.
Definition: gdal_utils.h:108
GDALNearblackOptionsForBinary
struct GDALNearblackOptionsForBinary GDALNearblackOptionsForBinary
Opaque type.
Definition: gdal_utils.h:149