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 */
92typedef 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 char *pszSource;
130 char *pszDest;
131 int bQuiet;
132 char *pszFormat;
133};
134
136{
137 char *pszSource;
138 char *pszDest;
139 int bQuiet;
140 char *pszFormat;
141 int bCreateOutput;
142};
143
145{
146 int nSrcFiles;
147 char **papszSrcFiles;
148 char *pszDstFilename;
149 int bQuiet;
150 int bOverwrite;
151};
152
154
156{
157 /* Filename to open. */
158 std::string osFilename{};
159
160 /* Allowed input drivers. */
161 CPLStringList aosAllowInputDrivers{};
162
163 /* Open options. */
164 CPLStringList aosOpenOptions{};
165};
166
168{
169 std::string osSource{};
170 std::string osDest{};
171 std::string osFormat{};
172 bool bQuiet = false;
173 bool bUpdate = false;
174
175 /* Allowed input drivers. */
176 CPLStringList aosAllowInputDrivers{};
177
178 /* Open options. */
179 CPLStringList aosOpenOptions{};
180};
181
182#endif /* #ifndef DOXYGEN_SKIP */
183
184#endif /* GDAL_UTILS_PRIV_H_INCLUDED */
String list class designed around our use of C "char**" string lists.
Definition cpl_string.h:438
Core portability definitions for CPL.
#define CPL_C_END
Macro to end a block of C symbols.
Definition cpl_port.h:317
#define CPL_C_START
Macro to start a block of C symbols.
Definition cpl_port.h:313
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:218
struct GDALInfoOptionsForBinary GDALInfoOptionsForBinary
Opaque type.
Definition gdal_utils.h:52
struct GDALMultiDimTranslateOptionsForBinary GDALMultiDimTranslateOptionsForBinary
Opaque type.
Definition gdal_utils.h:255
struct GDALVectorTranslateOptionsForBinary GDALVectorTranslateOptionsForBinary
Opaque type.
Definition gdal_utils.h:113
struct GDALWarpAppOptionsForBinary GDALWarpAppOptionsForBinary
Opaque type.
Definition gdal_utils.h:87
struct GDALDEMProcessingOptionsForBinary GDALDEMProcessingOptionsForBinary
Opaque type.
Definition gdal_utils.h:135
struct GDALNearblackOptionsForBinary GDALNearblackOptionsForBinary
Opaque type.
Definition gdal_utils.h:156
struct GDALGridOptionsForBinary GDALGridOptionsForBinary
Opaque type.
Definition gdal_utils.h:177
struct GDALMultiDimInfoOptionsForBinary GDALMultiDimInfoOptionsForBinary
Opaque type.
Definition gdal_utils.h:240
struct GDALTranslateOptionsForBinary GDALTranslateOptionsForBinary
Opaque type.
Definition gdal_utils.h:66
struct GDALRasterizeOptionsForBinary GDALRasterizeOptionsForBinary
Opaque type.
Definition gdal_utils.h:197