Line data Source code
1 : /******************************************************************************
2 : *
3 : * Project: GDAL Core
4 : * Purpose: GDAL Core C/Public declarations.
5 : * Author: Frank Warmerdam, warmerdam@pobox.com
6 : *
7 : ******************************************************************************
8 : * Copyright (c) 1998, 2002 Frank Warmerdam
9 : * Copyright (c) 2007-2014, Even Rouault <even dot rouault at spatialys.com>
10 : *
11 : * SPDX-License-Identifier: MIT
12 : ****************************************************************************/
13 :
14 : #ifndef GDAL_H_INCLUDED
15 : #define GDAL_H_INCLUDED
16 :
17 : /**
18 : * \file gdal.h
19 : *
20 : * Public (C callable) GDAL entry points.
21 : */
22 :
23 : #ifndef DOXYGEN_SKIP
24 : #if defined(GDAL_COMPILATION)
25 : #define DO_NOT_DEFINE_GDAL_DATE_NAME
26 : #endif
27 : #include "gdal_fwd.h"
28 : #include "gdal_version.h"
29 : #include "cpl_port.h"
30 : #include "cpl_error.h"
31 : #include "cpl_progress.h"
32 : #include "cpl_virtualmem.h"
33 : #include "cpl_minixml.h"
34 : #include "ogr_api.h"
35 : #endif
36 :
37 : #include <stdbool.h>
38 : #include <stdint.h>
39 :
40 : /* -------------------------------------------------------------------- */
41 : /* Significant constants. */
42 : /* -------------------------------------------------------------------- */
43 :
44 : CPL_C_START
45 :
46 : /*! Pixel data types */
47 : typedef enum
48 : {
49 : /*! Unknown or unspecified type */ GDT_Unknown = 0,
50 : /*! 8-bit unsigned integer (GDT_Byte in GDAL < 3.13) */ GDT_UInt8 = 1,
51 : /*! 8-bit signed integer (GDAL >= 3.7) */ GDT_Int8 = 14,
52 : /*! 16-bit unsigned integer */ GDT_UInt16 = 2,
53 : /*! 16-bit signed integer */ GDT_Int16 = 3,
54 : /*! 32-bit unsigned integer */ GDT_UInt32 = 4,
55 : /*! 32-bit signed integer */ GDT_Int32 = 5,
56 : /*! 64 bit unsigned integer (GDAL >= 3.5)*/ GDT_UInt64 = 12,
57 : /*! 64 bit signed integer (GDAL >= 3.5)*/ GDT_Int64 = 13,
58 : /*! 16-bit floating point */ GDT_Float16 = 15,
59 : /*! 32-bit floating point */ GDT_Float32 = 6,
60 : /*! 64-bit floating point */ GDT_Float64 = 7,
61 : /*! Complex Int16 */ GDT_CInt16 = 8,
62 : /*! Complex Int32 */ GDT_CInt32 = 9,
63 : /*! Complex Float16 */ GDT_CFloat16 = 16,
64 : /*! Complex Float32 */ GDT_CFloat32 = 10,
65 : /*! Complex Float64 */ GDT_CFloat64 = 11,
66 : GDT_TypeCount = 17 /* maximum type # + 1 */
67 : } GDALDataType;
68 :
69 : /** GDT_Byte is the name used before GDAL 3.13 for GDT_UInt8 */
70 : #define GDT_Byte GDT_UInt8
71 :
72 : int CPL_DLL CPL_STDCALL GDALGetDataTypeSize(GDALDataType)
73 : /*! @cond Doxygen_Suppress */
74 : CPL_WARN_DEPRECATED("Use GDALGetDataTypeSizeBits() or "
75 : "GDALGetDataTypeSizeBytes() * 8 instead")
76 : /*! @endcond */
77 : ;
78 : int CPL_DLL CPL_STDCALL GDALGetDataTypeSizeBits(GDALDataType eDataType);
79 : int CPL_DLL CPL_STDCALL GDALGetDataTypeSizeBytes(GDALDataType);
80 : int CPL_DLL CPL_STDCALL GDALDataTypeIsComplex(GDALDataType);
81 : int CPL_DLL CPL_STDCALL GDALDataTypeIsInteger(GDALDataType);
82 : int CPL_DLL CPL_STDCALL GDALDataTypeIsFloating(GDALDataType);
83 : int CPL_DLL CPL_STDCALL GDALDataTypeIsSigned(GDALDataType);
84 : const char CPL_DLL *CPL_STDCALL GDALGetDataTypeName(GDALDataType);
85 : GDALDataType CPL_DLL CPL_STDCALL GDALGetDataTypeByName(const char *);
86 : GDALDataType CPL_DLL CPL_STDCALL GDALDataTypeUnion(GDALDataType, GDALDataType);
87 : GDALDataType CPL_DLL CPL_STDCALL GDALDataTypeUnionWithValue(GDALDataType eDT,
88 : double dValue,
89 : int bComplex);
90 : GDALDataType CPL_DLL CPL_STDCALL GDALFindDataType(int nBits, int bSigned,
91 : int bFloating, int bComplex);
92 : GDALDataType CPL_DLL CPL_STDCALL GDALFindDataTypeForValue(double dValue,
93 : int bComplex);
94 : double CPL_DLL GDALAdjustValueToDataType(GDALDataType eDT, double dfValue,
95 : int *pbClamped, int *pbRounded);
96 : bool CPL_DLL GDALIsValueExactAs(double dfValue, GDALDataType eDT);
97 : bool CPL_DLL GDALIsValueInRangeOf(double dfValue, GDALDataType eDT);
98 : GDALDataType CPL_DLL CPL_STDCALL GDALGetNonComplexDataType(GDALDataType);
99 : int CPL_DLL CPL_STDCALL GDALDataTypeIsConversionLossy(GDALDataType eTypeFrom,
100 : GDALDataType eTypeTo);
101 :
102 : /**
103 : * status of the asynchronous stream
104 : */
105 : typedef enum
106 : {
107 : GARIO_PENDING = 0,
108 : GARIO_UPDATE = 1,
109 : GARIO_ERROR = 2,
110 : GARIO_COMPLETE = 3,
111 : GARIO_TypeCount = 4
112 : } GDALAsyncStatusType;
113 :
114 : const char CPL_DLL *CPL_STDCALL GDALGetAsyncStatusTypeName(GDALAsyncStatusType);
115 : GDALAsyncStatusType CPL_DLL CPL_STDCALL
116 : GDALGetAsyncStatusTypeByName(const char *);
117 :
118 : /*! Flag indicating read/write, or read-only access to data. */
119 : typedef enum
120 : {
121 : /*! Read only (no update) access */ GA_ReadOnly = 0,
122 : /*! Read/write access. */ GA_Update = 1
123 : } GDALAccess;
124 :
125 : /*! Read/Write flag for RasterIO() method */
126 : typedef enum
127 : {
128 : /*! Read data */ GF_Read = 0,
129 : /*! Write data */ GF_Write = 1
130 : } GDALRWFlag;
131 :
132 : /* NOTE: values are selected to be consistent with GDALResampleAlg of
133 : * alg/gdalwarper.h */
134 : /** RasterIO() resampling method.
135 : */
136 : typedef enum
137 : {
138 : /*! Nearest neighbour */ GRIORA_NearestNeighbour = 0,
139 : /*! Bilinear (2x2 kernel) */ GRIORA_Bilinear = 1,
140 : /*! Cubic Convolution Approximation (4x4 kernel) */ GRIORA_Cubic = 2,
141 : /*! Cubic B-Spline Approximation (4x4 kernel) */ GRIORA_CubicSpline = 3,
142 : /*! Lanczos windowed sinc interpolation (6x6 kernel) */ GRIORA_Lanczos = 4,
143 : /*! Average */ GRIORA_Average = 5,
144 : /*! Mode (selects the value which appears most often of all the sampled
145 : points) */
146 : GRIORA_Mode = 6,
147 : /*! Gauss blurring */ GRIORA_Gauss = 7,
148 : /* NOTE: values 8 to 13 are reserved for max,min,med,Q1,Q3,sum */
149 : /*! @cond Doxygen_Suppress */
150 : GRIORA_RESERVED_START = 8,
151 : GRIORA_RESERVED_END = 13,
152 : /*! @endcond */
153 : /** RMS: Root Mean Square / Quadratic Mean.
154 : * For complex numbers, applies on the real and imaginary part
155 : * independently.
156 : */
157 : GRIORA_RMS = 14,
158 : /*! @cond Doxygen_Suppress */
159 : GRIORA_LAST = GRIORA_RMS
160 : /*! @endcond */
161 : } GDALRIOResampleAlg;
162 :
163 : /* NOTE to developers: if required, only add members at the end of the
164 : * structure, and when doing so increase RASTERIO_EXTRA_ARG_CURRENT_VERSION
165 : */
166 : /** Structure to pass extra arguments to RasterIO() method,
167 : * must be initialized with INIT_RASTERIO_EXTRA_ARG
168 : */
169 : typedef struct
170 : {
171 : /*! Version of structure (to allow future extensions of the structure) */
172 : int nVersion;
173 :
174 : /*! Resampling algorithm */
175 : GDALRIOResampleAlg eResampleAlg;
176 :
177 : /*! Progress callback */
178 : GDALProgressFunc pfnProgress;
179 : /*! Progress callback user data */
180 : void *pProgressData;
181 :
182 : /*! Indicate if dfXOff, dfYOff, dfXSize and dfYSize are set.
183 : Mostly reserved from the VRT driver to communicate a more precise
184 : source window. Must be such that dfXOff - nXOff < 1.0 and
185 : dfYOff - nYOff < 1.0 and nXSize - dfXSize < 1.0 and nYSize - dfYSize
186 : < 1.0 */
187 : int bFloatingPointWindowValidity;
188 : /*! Pixel offset to the top left corner. Only valid if
189 : * bFloatingPointWindowValidity = TRUE */
190 : double dfXOff;
191 : /*! Line offset to the top left corner. Only valid if
192 : * bFloatingPointWindowValidity = TRUE */
193 : double dfYOff;
194 : /*! Width in pixels of the area of interest. Only valid if
195 : * bFloatingPointWindowValidity = TRUE */
196 : double dfXSize;
197 : /*! Height in pixels of the area of interest. Only valid if
198 : * bFloatingPointWindowValidity = TRUE */
199 : double dfYSize;
200 : /*! Indicate if overviews should be considered. Tested in
201 : GDALBandGetBestOverviewLevel(), mostly reserved for use by
202 : GDALRegenerateOverviewsMultiBand()
203 : Only available if RASTERIO_EXTRA_ARG_CURRENT_VERSION >= 2
204 : */
205 : int bUseOnlyThisScale;
206 : } GDALRasterIOExtraArg;
207 :
208 : #ifndef DOXYGEN_SKIP
209 : #define RASTERIO_EXTRA_ARG_CURRENT_VERSION 2
210 : #endif
211 :
212 : /** Macro to initialize an instance of GDALRasterIOExtraArg structure.
213 : */
214 : #define INIT_RASTERIO_EXTRA_ARG(s) \
215 : do \
216 : { \
217 : (s).nVersion = RASTERIO_EXTRA_ARG_CURRENT_VERSION; \
218 : (s).eResampleAlg = GRIORA_NearestNeighbour; \
219 : (s).pfnProgress = CPL_NULLPTR; \
220 : (s).pProgressData = CPL_NULLPTR; \
221 : (s).bFloatingPointWindowValidity = FALSE; \
222 : (s).bUseOnlyThisScale = FALSE; \
223 : } while (0)
224 :
225 : /** Value indicating the start of the range for color interpretations belonging
226 : * to the InfraRed (IR) domain. All constants of the GDALColorInterp enumeration
227 : * in the IR domain are in the [GCI_IR_Start, GCI_IR_End] range.
228 : *
229 : * @since 3.10
230 : */
231 : #define GCI_IR_Start 20
232 :
233 : /** Value indicating the end of the range for color interpretations belonging
234 : * to the InfraRed (IR) domain. All constants of the GDALColorInterp enumeration
235 : * in the IR domain are in the [GCI_IR_Start, GCI_IR_End] range.
236 : *
237 : * @since 3.10
238 : */
239 : #define GCI_IR_End 29
240 :
241 : /** Value indicating the start of the range for color interpretations belonging
242 : * to the Synthetic Aperture Radar (SAR) domain.
243 : * All constants of the GDALColorInterp enumeration
244 : * in the SAR domain are in the [GCI_SAR_Start, GCI_SAR_End] range.
245 : *
246 : * @since 3.10
247 : */
248 : #define GCI_SAR_Start 30
249 :
250 : /** Value indicating the end of the range for color interpretations belonging
251 : * to the Synthetic Aperture Radar (SAR) domain.
252 : * All constants of the GDALColorInterp enumeration
253 : * in the SAR domain are in the [GCI_SAR_Start, GCI_SAR_End] range.
254 : *
255 : * @since 3.10
256 : */
257 : #define GCI_SAR_End 39
258 :
259 : /** Types of color interpretation for raster bands.
260 : *
261 : * For spectral bands, the wavelength ranges are indicative only, and may vary
262 : * depending on sensors. The CENTRAL_WAVELENGTH_UM and FWHM_UM metadata
263 : * items in the IMAGERY metadata domain of the raster band, when present, will
264 : * give more accurate characteristics.
265 : *
266 : * Values belonging to the IR domain are in the [GCI_IR_Start, GCI_IR_End] range.
267 : * Values belonging to the SAR domain are in the [GCI_SAR_Start, GCI_SAR_End] range.
268 : *
269 : * Values between GCI_PanBand to GCI_SAR_Reserved_2 have been added in GDAL 3.10.
270 : */
271 : typedef enum
272 : {
273 : /*! Undefined */ GCI_Undefined = 0,
274 : /*! Greyscale */ GCI_GrayIndex = 1,
275 : /*! Paletted (see associated color table) */ GCI_PaletteIndex = 2,
276 : /*! Red band of RGBA image, or red spectral band [0.62 - 0.69 um]*/
277 : GCI_RedBand = 3,
278 : /*! Green band of RGBA image, or green spectral band [0.51 - 0.60 um]*/
279 : GCI_GreenBand = 4,
280 : /*! Blue band of RGBA image, or blue spectral band [0.45 - 0.53 um] */
281 : GCI_BlueBand = 5,
282 : /*! Alpha (0=transparent, 255=opaque) */ GCI_AlphaBand = 6,
283 : /*! Hue band of HLS image */ GCI_HueBand = 7,
284 : /*! Saturation band of HLS image */ GCI_SaturationBand = 8,
285 : /*! Lightness band of HLS image */ GCI_LightnessBand = 9,
286 : /*! Cyan band of CMYK image */ GCI_CyanBand = 10,
287 : /*! Magenta band of CMYK image */ GCI_MagentaBand = 11,
288 : /*! Yellow band of CMYK image, or yellow spectral band [0.58 - 0.62 um] */
289 : GCI_YellowBand = 12,
290 : /*! Black band of CMYK image */ GCI_BlackBand = 13,
291 : /*! Y Luminance */ GCI_YCbCr_YBand = 14,
292 : /*! Cb Chroma */ GCI_YCbCr_CbBand = 15,
293 : /*! Cr Chroma */ GCI_YCbCr_CrBand = 16,
294 :
295 : /* GDAL 3.10 addition: begin */
296 : /*! Panchromatic band [0.40 - 1.00 um] */ GCI_PanBand = 17,
297 : /*! Coastal band [0.40 - 0.45 um] */ GCI_CoastalBand = 18,
298 : /*! Red-edge band [0.69 - 0.79 um] */ GCI_RedEdgeBand = 19,
299 :
300 : /*! Near-InfraRed (NIR) band [0.75 - 1.40 um] */ GCI_NIRBand =
301 : GCI_IR_Start + 0,
302 : /*! Short-Wavelength InfraRed (SWIR) band [1.40 - 3.00 um] */ GCI_SWIRBand =
303 : GCI_IR_Start + 1,
304 : /*! Mid-Wavelength InfraRed (MWIR) band [3.00 - 8.00 um] */ GCI_MWIRBand =
305 : GCI_IR_Start + 2,
306 : /*! Long-Wavelength InfraRed (LWIR) band [8.00 - 15 um] */ GCI_LWIRBand =
307 : GCI_IR_Start + 3,
308 : /*! Thermal InfraRed (TIR) band (MWIR or LWIR) [3 - 15 um] */ GCI_TIRBand =
309 : GCI_IR_Start + 4,
310 : /*! Other infrared band [0.75 - 1000 um] */ GCI_OtherIRBand =
311 : GCI_IR_Start + 5,
312 : /*! Reserved value. Do not set it ! */
313 : GCI_IR_Reserved_1 = GCI_IR_Start + 6,
314 : /*! Reserved value. Do not set it ! */
315 : GCI_IR_Reserved_2 = GCI_IR_Start + 7,
316 : /*! Reserved value. Do not set it ! */
317 : GCI_IR_Reserved_3 = GCI_IR_Start + 8,
318 : /*! Reserved value. Do not set it ! */
319 : GCI_IR_Reserved_4 = GCI_IR_Start + 9,
320 :
321 : /*! Synthetic Aperture Radar (SAR) Ka band [0.8 - 1.1 cm / 27 - 40 GHz] */
322 : GCI_SAR_Ka_Band = GCI_SAR_Start + 0,
323 : /*! Synthetic Aperture Radar (SAR) K band [1.1 - 1.7 cm / 18 - 27 GHz] */
324 : GCI_SAR_K_Band = GCI_SAR_Start + 1,
325 : /*! Synthetic Aperture Radar (SAR) Ku band [1.7 - 2.4 cm / 12 - 18 GHz] */
326 : GCI_SAR_Ku_Band = GCI_SAR_Start + 2,
327 : /*! Synthetic Aperture Radar (SAR) X band [2.4 - 3.8 cm / 8 - 12 GHz] */
328 : GCI_SAR_X_Band = GCI_SAR_Start + 3,
329 : /*! Synthetic Aperture Radar (SAR) C band [3.8 - 7.5 cm / 4 - 8 GHz] */
330 : GCI_SAR_C_Band = GCI_SAR_Start + 4,
331 : /*! Synthetic Aperture Radar (SAR) S band [7.5 - 15 cm / 2 - 4 GHz] */
332 : GCI_SAR_S_Band = GCI_SAR_Start + 5,
333 : /*! Synthetic Aperture Radar (SAR) L band [15 - 30 cm / 1 - 2 GHz] */
334 : GCI_SAR_L_Band = GCI_SAR_Start + 6,
335 : /*! Synthetic Aperture Radar (SAR) P band [30 - 100 cm / 0.3 - 1 GHz] */
336 : GCI_SAR_P_Band = GCI_SAR_Start + 7,
337 : /*! Reserved value. Do not set it ! */
338 : GCI_SAR_Reserved_1 = GCI_SAR_Start + 8,
339 : /*! Reserved value. Do not set it ! */
340 : GCI_SAR_Reserved_2 = GCI_SAR_Start + 9,
341 :
342 : /* GDAL 3.10 addition: end */
343 :
344 : /*! Max current value (equals to GCI_SAR_Reserved_2 currently) */ GCI_Max =
345 : GCI_SAR_Reserved_2
346 : } GDALColorInterp;
347 :
348 : const char CPL_DLL *GDALGetColorInterpretationName(GDALColorInterp);
349 : GDALColorInterp CPL_DLL GDALGetColorInterpretationByName(const char *pszName);
350 :
351 : /*! Types of color interpretations for a GDALColorTable. */
352 : typedef enum
353 : {
354 : /*! Grayscale (in GDALColorEntry.c1) */ GPI_Gray = 0,
355 : /*! Red, Green, Blue and Alpha in (in c1, c2, c3 and c4) */ GPI_RGB = 1,
356 : /*! Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4)*/ GPI_CMYK = 2,
357 : /*! Hue, Lightness and Saturation (in c1, c2, and c3) */ GPI_HLS = 3
358 : } GDALPaletteInterp;
359 :
360 : const char CPL_DLL *GDALGetPaletteInterpretationName(GDALPaletteInterp);
361 :
362 : /* "well known" metadata items. */
363 :
364 : /** Metadata item for dataset that indicates the spatial interpretation of a
365 : * pixel */
366 : #define GDALMD_AREA_OR_POINT "AREA_OR_POINT"
367 : /** Value for GDALMD_AREA_OR_POINT that indicates that a pixel represents an
368 : * area */
369 : #define GDALMD_AOP_AREA "Area"
370 : /** Value for GDALMD_AREA_OR_POINT that indicates that a pixel represents a
371 : * point */
372 : #define GDALMD_AOP_POINT "Point"
373 :
374 : /* -------------------------------------------------------------------- */
375 : /* GDAL Specific error codes. */
376 : /* */
377 : /* error codes 100 to 299 reserved for GDAL. */
378 : /* -------------------------------------------------------------------- */
379 : #ifndef DOXYGEN_SKIP
380 : #define CPLE_WrongFormat CPL_STATIC_CAST(CPLErrorNum, 200)
381 : #endif
382 :
383 : /* -------------------------------------------------------------------- */
384 : /* Types, enumerations. */
385 : /* -------------------------------------------------------------------- */
386 :
387 : /** Type to express pixel, line or band spacing. Signed 64 bit integer. */
388 : typedef GIntBig GSpacing;
389 :
390 : /** Enumeration giving the class of a GDALExtendedDataType.
391 : * @since GDAL 3.1
392 : */
393 : typedef enum
394 : {
395 : /** Numeric value. Based on GDALDataType enumeration */
396 : GEDTC_NUMERIC,
397 : /** String value. */
398 : GEDTC_STRING,
399 : /** Compound data type. */
400 : GEDTC_COMPOUND
401 : } GDALExtendedDataTypeClass;
402 :
403 : /** Enumeration giving the subtype of a GDALExtendedDataType.
404 : * @since GDAL 3.4
405 : */
406 : typedef enum
407 : {
408 : /** None. */
409 : GEDTST_NONE,
410 : /** JSon. Only applies to GEDTC_STRING */
411 : GEDTST_JSON
412 : } GDALExtendedDataTypeSubType;
413 :
414 : /* ==================================================================== */
415 : /* Registration/driver related. */
416 : /* ==================================================================== */
417 :
418 : /** Long name of the driver */
419 : #define GDAL_DMD_LONGNAME "DMD_LONGNAME"
420 :
421 : /** URL (relative to http://gdal.org/) to the help page of the driver */
422 : #define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
423 :
424 : /** MIME type handled by the driver. */
425 : #define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
426 :
427 : /** Extension handled by the driver. */
428 : #define GDAL_DMD_EXTENSION "DMD_EXTENSION"
429 :
430 : /** Connection prefix to provide as the file name of the open function.
431 : * Typically set for non-file based drivers. Generally used with open options.
432 : */
433 : #define GDAL_DMD_CONNECTION_PREFIX "DMD_CONNECTION_PREFIX"
434 :
435 : /** List of (space separated) extensions handled by the driver.
436 : */
437 : #define GDAL_DMD_EXTENSIONS "DMD_EXTENSIONS"
438 :
439 : /** XML snippet with creation options. */
440 : #define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST"
441 :
442 : /** XML snippet with overview creation options.
443 : * @since GDAL 3.12
444 : */
445 : #define GDAL_DMD_OVERVIEW_CREATIONOPTIONLIST "DMD_OVERVIEW_CREATIONOPTIONLIST"
446 :
447 : /** XML snippet with multidimensional dataset creation options.
448 : * @since GDAL 3.1
449 : */
450 : #define GDAL_DMD_MULTIDIM_DATASET_CREATIONOPTIONLIST \
451 : "DMD_MULTIDIM_DATASET_CREATIONOPTIONLIST"
452 :
453 : /** XML snippet with multidimensional group creation options.
454 : * @since GDAL 3.1
455 : */
456 : #define GDAL_DMD_MULTIDIM_GROUP_CREATIONOPTIONLIST \
457 : "DMD_MULTIDIM_GROUP_CREATIONOPTIONLIST"
458 :
459 : /** XML snippet with multidimensional dimension creation options.
460 : * @since GDAL 3.1
461 : */
462 : #define GDAL_DMD_MULTIDIM_DIMENSION_CREATIONOPTIONLIST \
463 : "DMD_MULTIDIM_DIMENSION_CREATIONOPTIONLIST"
464 :
465 : /** XML snippet with multidimensional array creation options.
466 : * @since GDAL 3.1
467 : */
468 : #define GDAL_DMD_MULTIDIM_ARRAY_CREATIONOPTIONLIST \
469 : "DMD_MULTIDIM_ARRAY_CREATIONOPTIONLIST"
470 :
471 : /** XML snippet with multidimensional array open options.
472 : * @since GDAL 3.6
473 : */
474 : #define GDAL_DMD_MULTIDIM_ARRAY_OPENOPTIONLIST \
475 : "DMD_MULTIDIM_ARRAY_OPENOPTIONLIST"
476 :
477 : /** XML snippet with multidimensional attribute creation options.
478 : * @since GDAL 3.1
479 : */
480 : #define GDAL_DMD_MULTIDIM_ATTRIBUTE_CREATIONOPTIONLIST \
481 : "DMD_MULTIDIM_ATTRIBUTE_CREATIONOPTIONLIST"
482 :
483 : /** XML snippet with open options.
484 : */
485 : #define GDAL_DMD_OPENOPTIONLIST "DMD_OPENOPTIONLIST"
486 :
487 : /** List of (space separated) raster data types supported by the
488 : * Create()/CreateCopy() API. */
489 : #define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES"
490 :
491 : /** List of (space separated) vector field types supported by the CreateField()
492 : * API.
493 : * */
494 : #define GDAL_DMD_CREATIONFIELDDATATYPES "DMD_CREATIONFIELDDATATYPES"
495 :
496 : /** List of (space separated) vector field sub-types supported by the
497 : * CreateField() API.
498 : * */
499 : #define GDAL_DMD_CREATIONFIELDDATASUBTYPES "DMD_CREATIONFIELDDATASUBTYPES"
500 :
501 : /** Maximum size of a String field that can be created (OGRFieldDefn.GetWidth()).
502 : *
503 : * It is undefined whether this is a number of bytes or Unicode character count.
504 : * Most of the time, this will be a number of bytes, so a Unicode string whose
505 : * character count is the maximum size could not fit.
506 : *
507 : * This metadata item is set only on a small number of drivers, in particular
508 : * "ESRI Shapefile" and "MapInfo File", which use fixed-width storage of strings.
509 : *
510 : * @since GDAL 3.12
511 : */
512 : #define GDAL_DMD_MAX_STRING_LENGTH "DMD_MAX_STRING_LENGTH"
513 :
514 : /** List of (space separated) capability flags supported by the CreateField() API.
515 : *
516 : * Supported values are:
517 : *
518 : * - "WidthPrecision": field width and precision is supported.
519 : * - "Nullable": field (non-)nullable status is supported.
520 : * - "Unique": field unique constraint is supported.
521 : * - "Default": field default value is supported.
522 : * - "AlternativeName": field alternative name is supported.
523 : * - "Comment": field comment is supported.
524 : * - "Domain": field can be associated with a domain.
525 : *
526 : * @see GDAL_DMD_ALTER_FIELD_DEFN_FLAGS for capabilities supported when altering
527 : * existing fields.
528 : *
529 : * @since GDAL 3.7
530 : */
531 : #define GDAL_DMD_CREATION_FIELD_DEFN_FLAGS "DMD_CREATION_FIELD_DEFN_FLAGS"
532 :
533 : /** Capability set by a driver that exposes Subdatasets.
534 : *
535 : * This capability reflects that a raster driver supports child layers, such as
536 : * NetCDF or multi-table raster Geopackages.
537 : *
538 : * See GDAL_DCAP_MULTIPLE_VECTOR_LAYERS for a similar capability flag
539 : * for vector drivers.
540 : */
541 : #define GDAL_DMD_SUBDATASETS "DMD_SUBDATASETS"
542 :
543 : /** Capability set by a driver that can create subdatasets with the
544 : * APPEND_SUBDATASET=YES creation option.
545 : *
546 : * @since 3.11
547 : */
548 : #define GDAL_DCAP_CREATE_SUBDATASETS "DCAP_CREATE_SUBDATASETS"
549 :
550 : /** Capability set by a vector driver that supports field width and precision.
551 : *
552 : * This capability reflects that a vector driver includes the decimal separator
553 : * in the field width of fields of type OFTReal.
554 : *
555 : * See GDAL_DMD_NUMERIC_FIELD_WIDTH_INCLUDES_SIGN for a related capability flag.
556 : * @since GDAL 3.7
557 : */
558 : #define GDAL_DMD_NUMERIC_FIELD_WIDTH_INCLUDES_DECIMAL_SEPARATOR \
559 : "DMD_NUMERIC_FIELD_WIDTH_INCLUDES_DECIMAL_SEPARATOR"
560 :
561 : /** Capability set by a vector driver that supports field width and precision.
562 : *
563 : * This capability reflects that a vector driver includes the sign
564 : * in the field width of fields of type OFTReal.
565 : *
566 : * See GDAL_DMD_NUMERIC_FIELD_WIDTH_INCLUDES_DECIMAL_SEPARATOR for a related capability flag.
567 : * @since GDAL 3.7
568 : */
569 : #define GDAL_DMD_NUMERIC_FIELD_WIDTH_INCLUDES_SIGN \
570 : "DMD_NUMERIC_FIELD_WIDTH_INCLUDES_SIGN"
571 :
572 : /** Capability set by a driver that implements the Open() API. */
573 : #define GDAL_DCAP_OPEN "DCAP_OPEN"
574 :
575 : /** Capability set by a driver that implements the Create() API.
576 : *
577 : * If GDAL_DCAP_CREATE is set, but GDAL_DCAP_CREATECOPY not, a generic
578 : * CreateCopy() implementation is available and will use the Create() API of
579 : * the driver.
580 : * So to test if some CreateCopy() implementation is available, generic or
581 : * specialize, test for both GDAL_DCAP_CREATE and GDAL_DCAP_CREATECOPY.
582 : */
583 : #define GDAL_DCAP_CREATE "DCAP_CREATE"
584 :
585 : /** Capability set by a driver that implements the CreateMultiDimensional() API.
586 : *
587 : * @since GDAL 3.1
588 : */
589 : #define GDAL_DCAP_CREATE_MULTIDIMENSIONAL "DCAP_CREATE_MULTIDIMENSIONAL"
590 :
591 : /** Capability set by a driver that implements the CreateCopy() API.
592 : *
593 : * If GDAL_DCAP_CREATECOPY is not defined, but GDAL_DCAP_CREATE is set, a
594 : * generic CreateCopy() implementation is available and will use the Create()
595 : * API of the driver. So to test if some CreateCopy() implementation is
596 : * available, generic or specialize, test for both GDAL_DCAP_CREATE and
597 : * GDAL_DCAP_CREATECOPY.
598 : */
599 : #define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
600 :
601 : /** Capability set by a driver that supports the \@CREATE_ONLY_VISIBLE_AT_CLOSE_TIME
602 : * hidden creation option.
603 : *
604 : * @since GDAL 3.12
605 : */
606 : #define GDAL_DCAP_CREATE_ONLY_VISIBLE_AT_CLOSE_TIME \
607 : "DCAP_CREATE_ONLY_VISIBLE_AT_CLOSE_TIME"
608 :
609 : /** Capability set by a driver that implements the VectorTranslateFrom() API.
610 : *
611 : * @since GDAL 3.8
612 : */
613 : #define GDAL_DCAP_VECTOR_TRANSLATE_FROM "DCAP_VECTOR_TRANSLATE_FROM"
614 :
615 : /** Capability set by a driver that implements the CreateCopy() API, but with
616 : * multidimensional raster as input and output.
617 : *
618 : * @since GDAL 3.1
619 : */
620 : #define GDAL_DCAP_CREATECOPY_MULTIDIMENSIONAL "DCAP_CREATECOPY_MULTIDIMENSIONAL"
621 :
622 : /** Capability set by a driver that supports multidimensional data.
623 : * @since GDAL 3.1
624 : */
625 : #define GDAL_DCAP_MULTIDIM_RASTER "DCAP_MULTIDIM_RASTER"
626 :
627 : /** Capability set by a driver that can copy over subdatasets. */
628 : #define GDAL_DCAP_SUBCREATECOPY "DCAP_SUBCREATECOPY"
629 :
630 : /** Capability set by a driver that supports the GDAL_OF_UPDATE flag and offers
631 : * feature appending capabilities.
632 : *
633 : * Note: feature appending capability is also implied if GDAL_DCAP_UPDATE or
634 : * GDAL_DCAP_CREATE_LAYER is set, in which case GDAL_DCAP_APPEND is not set.
635 : *
636 : * @since GDAL 3.12.
637 : */
638 : #define GDAL_DCAP_APPEND "DCAP_APPEND"
639 :
640 : /** Capability set by a driver that supports the GDAL_OF_UPDATE flag and offers
641 : * at least some update capabilities.
642 : * Exact update capabilities can be determined by the GDAL_DMD_UPDATE_ITEMS
643 : * metadata item
644 : * @since GDAL 3.11
645 : */
646 : #define GDAL_DCAP_UPDATE "DCAP_UPDATE"
647 :
648 : /** Capability set by a driver that can read/create datasets through the VSI*L
649 : * API. */
650 : #define GDAL_DCAP_VIRTUALIO "DCAP_VIRTUALIO"
651 :
652 : /** Capability set by a driver having raster capability.
653 : */
654 : #define GDAL_DCAP_RASTER "DCAP_RASTER"
655 :
656 : /** Capability set by a driver having vector capability.
657 : */
658 : #define GDAL_DCAP_VECTOR "DCAP_VECTOR"
659 :
660 : /** Capability set by a driver having geographical network model capability.
661 : */
662 : #define GDAL_DCAP_GNM "DCAP_GNM"
663 :
664 : /** Capability set by a driver that can create layers.
665 : * @since GDAL 3.6
666 : */
667 : #define GDAL_DCAP_CREATE_LAYER "DCAP_CREATE_LAYER"
668 :
669 : /** Capability set by a driver that can delete layers.
670 : * @since GDAL 3.6
671 : */
672 : #define GDAL_DCAP_DELETE_LAYER "DCAP_DELETE_LAYER"
673 :
674 : /** Capability set by a driver that can create fields.
675 : * @since GDAL 3.6
676 : */
677 : #define GDAL_DCAP_CREATE_FIELD "DCAP_CREATE_FIELD"
678 :
679 : /** Capability set by a driver that can delete fields.
680 : * @since GDAL 3.6
681 : */
682 : #define GDAL_DCAP_DELETE_FIELD "DCAP_DELETE_FIELD"
683 :
684 : /** Capability set by a driver that can reorder fields.
685 : * @since GDAL 3.6
686 : */
687 : #define GDAL_DCAP_REORDER_FIELDS "DCAP_REORDER_FIELDS"
688 :
689 : /** List of (space separated) flags supported by the OGRLayer::AlterFieldDefn()
690 : * API.
691 : *
692 : * Supported values are "Name", "Type", "WidthPrecision", "Nullable", "Default",
693 : * "Unique", "Domain", "AlternativeName" and "Comment", corresponding respectively
694 : * to the ALTER_NAME_FLAG, ALTER_TYPE_FLAG, ALTER_WIDTH_PRECISION_FLAG, ALTER_NULLABLE_FLAG,
695 : * ALTER_DEFAULT_FLAG, ALTER_UNIQUE_FLAG, ALTER_DOMAIN_FLAG,
696 : * ALTER_ALTERNATIVE_NAME_FLAG and ALTER_COMMENT_FLAG flags.
697 : *
698 : * Note that advertizing one of these flags doesn't necessarily mean that
699 : * all modifications of the corresponding property can be made. For example,
700 : * altering the field type may be restricted by the current type of the field,
701 : * etc.
702 : *
703 : * @see GDAL_DMD_CREATION_FIELD_DEFN_FLAGS for capabilities supported
704 : * when creating new fields.
705 : *
706 : * @since GDAL 3.6
707 : */
708 : #define GDAL_DMD_ALTER_FIELD_DEFN_FLAGS "GDAL_DMD_ALTER_FIELD_DEFN_FLAGS"
709 :
710 : /** List of (space separated) field names which are considered illegal by the
711 : * driver and should not be used when creating/altering fields.
712 : *
713 : * @since GDAL 3.7
714 : */
715 : #define GDAL_DMD_ILLEGAL_FIELD_NAMES "GDAL_DMD_ILLEGAL_FIELD_NAMES"
716 :
717 : /** Capability set by a driver that can create fields with NOT NULL constraint.
718 : */
719 : #define GDAL_DCAP_NOTNULL_FIELDS "DCAP_NOTNULL_FIELDS"
720 :
721 : /** Capability set by a driver that can create fields with UNIQUE constraint.
722 : * @since GDAL 3.2
723 : */
724 : #define GDAL_DCAP_UNIQUE_FIELDS "DCAP_UNIQUE_FIELDS"
725 :
726 : /** Capability set by a driver that can create fields with DEFAULT values.
727 : */
728 : #define GDAL_DCAP_DEFAULT_FIELDS "DCAP_DEFAULT_FIELDS"
729 :
730 : /** Capability set by a driver that can create geometry fields with NOT NULL
731 : * constraint.
732 : */
733 : #define GDAL_DCAP_NOTNULL_GEOMFIELDS "DCAP_NOTNULL_GEOMFIELDS"
734 :
735 : /** Capability set by a non-spatial driver having no support for geometries.
736 : * E.g. non-spatial vector drivers (e.g. spreadsheet format drivers) do not
737 : * support geometries, and accordingly will have this capability present.
738 : */
739 : #define GDAL_DCAP_NONSPATIAL "DCAP_NONSPATIAL"
740 :
741 : /** Capability set by a driver that can support curved geometries.
742 : * @since GDAL 3.6
743 : */
744 : #define GDAL_DCAP_CURVE_GEOMETRIES "DCAP_CURVE_GEOMETRIES"
745 :
746 : /** Capability set by a driver that can support measured geometries.
747 : *
748 : * @since GDAL 3.6
749 : */
750 : #define GDAL_DCAP_MEASURED_GEOMETRIES "DCAP_MEASURED_GEOMETRIES"
751 :
752 : /** Capability set by a driver that can support the Z dimension for geometries.
753 : *
754 : * @since GDAL 3.6
755 : */
756 : #define GDAL_DCAP_Z_GEOMETRIES "DCAP_Z_GEOMETRIES"
757 :
758 : /** List of (space separated) flags which reflect the geometry handling behavior
759 : * of a driver.
760 : *
761 : * Supported values are currently:
762 : *
763 : * - "EquatesMultiAndSingleLineStringDuringWrite" and
764 : * "EquatesMultiAndSinglePolygonDuringWrite". These flags indicate that the
765 : * driver does not differentiate between single-part and multi-part linestring
766 : * and polygon geometries when writing features respectively.
767 : *
768 : * @since GDAL 3.6
769 : */
770 : #define GDAL_DMD_GEOMETRY_FLAGS "GDAL_DMD_GEOMETRY_FLAGS"
771 :
772 : /** Capability set by drivers which support either reading or writing feature
773 : * styles.
774 : *
775 : * Consider using the more granular GDAL_DCAP_FEATURE_STYLES_READ or
776 : * GDAL_DCAP_FEATURE_STYLES_WRITE capabilities instead.
777 : *
778 : */
779 : #define GDAL_DCAP_FEATURE_STYLES "DCAP_FEATURE_STYLES"
780 :
781 : /** Capability set by drivers which support reading feature styles.
782 : * @since GDAL 3.7
783 : */
784 : #define GDAL_DCAP_FEATURE_STYLES_READ "DCAP_FEATURE_STYLES_READ"
785 :
786 : /** Capability set by drivers which support writing feature styles.
787 : * @since GDAL 3.7
788 : */
789 : #define GDAL_DCAP_FEATURE_STYLES_WRITE "DCAP_FEATURE_STYLES_WRITE"
790 :
791 : /** Capability set by drivers which support storing/retrieving coordinate epoch
792 : * for dynamic CRS
793 : * @since GDAL 3.4
794 : */
795 : #define GDAL_DCAP_COORDINATE_EPOCH "DCAP_COORDINATE_EPOCH"
796 :
797 : /** Capability set by drivers for formats which support multiple vector layers.
798 : *
799 : * Note: some GDAL drivers expose "virtual" layer support while the underlying
800 : * formats themselves do not. This capability is only set for drivers of formats
801 : * which have a native concept of multiple vector layers (such as GeoPackage).
802 : *
803 : * @since GDAL 3.4
804 : */
805 : #define GDAL_DCAP_MULTIPLE_VECTOR_LAYERS "DCAP_MULTIPLE_VECTOR_LAYERS"
806 :
807 : /** Capability set by drivers for formats which support reading field domains.
808 : *
809 : * @since GDAL 3.5
810 : */
811 : #define GDAL_DCAP_FIELD_DOMAINS "DCAP_FIELD_DOMAINS"
812 :
813 : /** Capability set by drivers for formats which support reading table
814 : * relationships.
815 : *
816 : * @since GDAL 3.6
817 : */
818 : #define GDAL_DCAP_RELATIONSHIPS "DCAP_RELATIONSHIPS"
819 :
820 : /** Capability set by drivers for formats which support creating table
821 : * relationships.
822 : * @since GDAL 3.6
823 : */
824 : #define GDAL_DCAP_CREATE_RELATIONSHIP "DCAP_CREATE_RELATIONSHIP"
825 :
826 : /** Capability set by drivers for formats which support deleting table
827 : * relationships.
828 : * @since GDAL 3.6
829 : */
830 : #define GDAL_DCAP_DELETE_RELATIONSHIP "DCAP_DELETE_RELATIONSHIP"
831 :
832 : /** Capability set by drivers for formats which support updating existing table
833 : * relationships.
834 : * @since GDAL 3.6
835 : */
836 : #define GDAL_DCAP_UPDATE_RELATIONSHIP "DCAP_UPDATE_RELATIONSHIP"
837 :
838 : /** Capability set by drivers whose FlushCache() implementation returns a
839 : * dataset that can be opened afterwards and seen in a consistent state, without
840 : * requiring the dataset on which FlushCache() has been called to be closed.
841 : * @since GDAL 3.8
842 : */
843 : #define GDAL_DCAP_FLUSHCACHE_CONSISTENT_STATE "DCAP_FLUSHCACHE_CONSISTENT_STATE"
844 :
845 : /** Capability set by drivers which honor the OGRCoordinatePrecision settings
846 : * of geometry fields at layer creation and/or for OGRLayer::CreateGeomField().
847 : * Note that while those drivers honor the settings at feature writing time,
848 : * they might not be able to store the precision settings in layer metadata,
849 : * hence on reading it might not be possible to recover the precision with
850 : * which coordinates have been written.
851 : * @since GDAL 3.9
852 : */
853 : #define GDAL_DCAP_HONOR_GEOM_COORDINATE_PRECISION \
854 : "DCAP_HONOR_GEOM_COORDINATE_PRECISION"
855 :
856 : /** Capability set by drivers that implements OGRLayer::UpsertTeature().
857 : * @since GDAL 3.12
858 : */
859 : #define GDAL_DCAP_UPSERT "DCAP_UPSERT"
860 :
861 : /** List of (space separated) flags indicating the features of relationships are
862 : * supported by the driver.
863 : *
864 : * Supported values are:
865 : *
866 : * - "OneToOne": supports one-to-one relationships, see
867 : * GDALRelationshipCardinality::GRC_ONE_TO_ONE
868 : * - "OneToMany": supports one-to-many relationships, see
869 : * GDALRelationshipCardinality::GRC_ONE_TO_MANY
870 : * - "ManyToOne": supports many-to-one relationships, see
871 : * GDALRelationshipCardinality::GRC_MANY_TO_ONE
872 : * - "ManyToMany": supports many-to-many relationships, see
873 : * GDALRelationshipCardinality::GRC_MANY_TO_MANY
874 : * - "Composite": supports composite relationship types, see
875 : * GDALRelationshipType::GRT_COMPOSITE
876 : * - "Association": supports association relationship types, see
877 : * GDALRelationshipType::GRT_ASSOCIATION
878 : * - "Aggregation": supports aggregation relationship types, see
879 : * GDALRelationshipType::GRT_AGGREGATION
880 : * - "MultipleFieldKeys": multiple fields can be used for relationship keys. If
881 : * not present then only a single field name can be used.
882 : * - "ForwardPathLabel": supports forward path labels
883 : * - "BackwardPathLabel": supports backward path labels
884 : *
885 : * @since GDAL 3.6
886 : */
887 : #define GDAL_DMD_RELATIONSHIP_FLAGS "GDAL_DMD_RELATIONSHIP_FLAGS"
888 :
889 : /** List of (space separated) standard related table types which are recognised
890 : * by the driver.
891 : *
892 : * See GDALRelationshipGetRelatedTableType/GDALRelationshipSetRelatedTableType
893 : *
894 : * @since GDAL 3.7
895 : */
896 : #define GDAL_DMD_RELATIONSHIP_RELATED_TABLE_TYPES \
897 : "GDAL_DMD_RELATIONSHIP_RELATED_TABLE_TYPES"
898 :
899 : /** Capability set by drivers for formats which support renaming vector layers.
900 : *
901 : * @since GDAL 3.5
902 : */
903 : #define GDAL_DCAP_RENAME_LAYERS "DCAP_RENAME_LAYERS"
904 :
905 : /** List of (space separated) field domain types supported by the AddFieldDomain()
906 : * API.
907 : *
908 : * Supported values are Coded, Range and Glob, corresponding to the
909 : * OGRFieldDomainType::OFDT_CODED, OGRFieldDomainType::OFDT_RANGE, and
910 : * OGRFieldDomainType::OFDT_GLOB field domain types respectively.
911 : *
912 : * @since GDAL 3.5
913 : */
914 : #define GDAL_DMD_CREATION_FIELD_DOMAIN_TYPES "DMD_CREATION_FIELD_DOMAIN_TYPES"
915 :
916 : /** List of (space separated) flags supported by the
917 : * OGRLayer::AlterGeomFieldDefn() API.
918 : *
919 : * Supported values are "Name", "Type", "Nullable", "SRS", "CoordinateEpoch",
920 : * corresponding respectively to the ALTER_GEOM_FIELD_DEFN_NAME_FLAG,
921 : * ALTER_GEOM_FIELD_DEFN_TYPE_FLAG, ALTER_GEOM_FIELD_DEFN_NULLABLE_FLAG,
922 : * ALTER_GEOM_FIELD_DEFN_SRS_FLAG, ALTER_GEOM_FIELD_DEFN_SRS_COORD_EPOCH_FLAG
923 : * flags. Note that advertizing one of these flags doesn't necessarily mean that
924 : * all modifications of the corresponding property can be made. For example,
925 : * altering the geometry type may be restricted by the type of the geometries in
926 : * the field, or changing the nullable state to non-nullable is not possible if
927 : * null geometries are present, etc.
928 : *
929 : * @since GDAL 3.6
930 : */
931 : #define GDAL_DMD_ALTER_GEOM_FIELD_DEFN_FLAGS "DMD_ALTER_GEOM_FIELD_DEFN_FLAGS"
932 :
933 : /** List of (space separated) SQL dialects supported by the driver.
934 : *
935 : * The default SQL dialect for the driver will always be the first listed value.
936 : *
937 : * Standard values are:
938 : *
939 : * - "OGRSQL": the OGR SQL dialect, see
940 : * https://gdal.org/user/ogr_sql_dialect.html
941 : * - "SQLITE": the SQLite dialect, see
942 : * https://gdal.org/user/sql_sqlite_dialect.html
943 : * - "NATIVE": for drivers with an RDBMS backend this value indicates that the
944 : * SQL will be passed directly to that database backend, and therefore the
945 : * RDBMS' native dialect will be used
946 : *
947 : * Other dialect values may also be present for some drivers (for some of them,
948 : * the query string to use might not even by SQL but a dedicated query
949 : * language). For further details on their interpretation, see the documentation
950 : * for the respective driver.
951 : *
952 : * @since GDAL 3.6
953 : */
954 : #define GDAL_DMD_SUPPORTED_SQL_DIALECTS "DMD_SUPPORTED_SQL_DIALECTS"
955 :
956 : /*! @cond Doxygen_Suppress */
957 : #define GDAL_DMD_PLUGIN_INSTALLATION_MESSAGE "DMD_PLUGIN_INSTALLATION_MESSAGE"
958 : /*! @endcond */
959 :
960 : /** List of (space separated) items that a dataset opened in update mode supports
961 : * updating. Possible values are:
962 : * - for raster: "GeoTransform" (through GDALDataset::SetGeoTransform),
963 : * "SRS" (GDALDataset::SetSpatialRef), "GCPs" (GDALDataset::SetGCPs()),
964 : * "NoData" (GDALRasterBand::SetNoDataValue),
965 : * "ColorInterpretation" (GDALRasterBand::SetColorInterpretation()),
966 : * "RasterValues" (GF_Write flag of GDALDataset::RasterIO() and GDALRasterBand::RasterIO()),
967 : * "DatasetMetadata" (GDALDataset::SetMetadata/SetMetadataItem), "BandMetadata"
968 : * (GDALRasterBand::SetMetadata/SetMetadataItem)
969 : * - for vector: "Features" (OGRLayer::SetFeature()), "DatasetMetadata",
970 : * "LayerMetadata"
971 : *
972 : * No distinction is made if the update is done in the native format,
973 : * or in a Persistent Auxiliary Metadata .aux.xml side car file.
974 : *
975 : * @since GDAL 3.11
976 : */
977 : #define GDAL_DMD_UPDATE_ITEMS "DMD_UPDATE_ITEMS"
978 :
979 : /** Value for GDALDimension::GetType() specifying the X axis of a horizontal
980 : * CRS.
981 : * @since GDAL 3.1
982 : */
983 : #define GDAL_DIM_TYPE_HORIZONTAL_X "HORIZONTAL_X"
984 :
985 : /** Value for GDALDimension::GetType() specifying the Y axis of a horizontal
986 : * CRS.
987 : * @since GDAL 3.1
988 : */
989 : #define GDAL_DIM_TYPE_HORIZONTAL_Y "HORIZONTAL_Y"
990 :
991 : /** Value for GDALDimension::GetType() specifying a vertical axis.
992 : * @since GDAL 3.1
993 : */
994 : #define GDAL_DIM_TYPE_VERTICAL "VERTICAL"
995 :
996 : /** Value for GDALDimension::GetType() specifying a temporal axis.
997 : * @since GDAL 3.1
998 : */
999 : #define GDAL_DIM_TYPE_TEMPORAL "TEMPORAL"
1000 :
1001 : /** Value for GDALDimension::GetType() specifying a parametric axis.
1002 : * @since GDAL 3.1
1003 : */
1004 : #define GDAL_DIM_TYPE_PARAMETRIC "PARAMETRIC"
1005 :
1006 : /** "Capability" set by drivers that require re-opening the dataset to be able
1007 : * to read its content if it has just been created previously
1008 : *
1009 : * @since GDAL 3.12
1010 : */
1011 : #define GDAL_DCAP_REOPEN_AFTER_WRITE_REQUIRED "DCAP_REOPEN_AFTER_WRITE_REQUIRED"
1012 :
1013 : /** Capability set by drivers that can read from a dataset, even if it deleted
1014 : * from disk after it has been opened (i.e. such drivers do not need to reopen
1015 : * or test the existence of the file at that point)
1016 : *
1017 : * @since GDAL 3.12
1018 : */
1019 : #define GDAL_DCAP_CAN_READ_AFTER_DELETE "DCAP_CAN_READ_AFTER_DELETE"
1020 :
1021 : #define GDsCAddRelationship \
1022 : "AddRelationship" /**< Dataset capability for supporting AddRelationship() \
1023 : (at least partially) */
1024 : #define GDsCDeleteRelationship \
1025 : "DeleteRelationship" /**< Dataset capability for supporting \
1026 : DeleteRelationship()*/
1027 : #define GDsCUpdateRelationship \
1028 : "UpdateRelationship" /**< Dataset capability for supporting \
1029 : UpdateRelationship()*/
1030 :
1031 : /** Dataset capability if GDALDataset::GetExtent() is fast.
1032 : *
1033 : * @since 3.12
1034 : */
1035 : #define GDsCFastGetExtent "FastGetExtent"
1036 :
1037 : /** Dataset capability if GDALDataset::GetExtentWGS84LongLat() is fast.
1038 : *
1039 : * @since 3.12
1040 : */
1041 : #define GDsCFastGetExtentWGS84LongLat "FastGetExtentWGS84LongLat"
1042 :
1043 : void CPL_DLL CPL_STDCALL GDALAllRegister(void);
1044 : void CPL_DLL GDALRegisterPlugins(void);
1045 : CPLErr CPL_DLL GDALRegisterPlugin(const char *name);
1046 :
1047 : GDALDatasetH CPL_DLL CPL_STDCALL
1048 : GDALCreate(GDALDriverH hDriver, const char *, int, int, int, GDALDataType,
1049 : CSLConstList) CPL_WARN_UNUSED_RESULT;
1050 : GDALDatasetH CPL_DLL CPL_STDCALL GDALCreateCopy(GDALDriverH, const char *,
1051 : GDALDatasetH, int, CSLConstList,
1052 : GDALProgressFunc,
1053 : void *) CPL_WARN_UNUSED_RESULT;
1054 :
1055 : GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriver(const char *pszFilename,
1056 : CSLConstList papszFileList);
1057 :
1058 : GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriverEx(
1059 : const char *pszFilename, unsigned int nIdentifyFlags,
1060 : const char *const *papszAllowedDrivers, const char *const *papszFileList);
1061 :
1062 : GDALDatasetH CPL_DLL CPL_STDCALL
1063 : GDALOpen(const char *pszFilename, GDALAccess eAccess) CPL_WARN_UNUSED_RESULT;
1064 : GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenShared(const char *, GDALAccess)
1065 : CPL_WARN_UNUSED_RESULT;
1066 :
1067 : /* Note: we define GDAL_OF_READONLY and GDAL_OF_UPDATE to be on purpose */
1068 : /* equals to GA_ReadOnly and GA_Update */
1069 :
1070 : /** Open in read-only mode.
1071 : * Used by GDALOpenEx().
1072 : */
1073 : #define GDAL_OF_READONLY 0x00
1074 :
1075 : /** Open in update mode.
1076 : * Used by GDALOpenEx().
1077 : */
1078 : #define GDAL_OF_UPDATE 0x01
1079 :
1080 : /** Allow raster and vector drivers to be used.
1081 : * Used by GDALOpenEx().
1082 : */
1083 : #define GDAL_OF_ALL 0x00
1084 :
1085 : /** Allow raster drivers to be used.
1086 : * Used by GDALOpenEx().
1087 : */
1088 : #define GDAL_OF_RASTER 0x02
1089 :
1090 : /** Allow vector drivers to be used.
1091 : * Used by GDALOpenEx().
1092 : */
1093 : #define GDAL_OF_VECTOR 0x04
1094 :
1095 : /** Allow gnm drivers to be used.
1096 : * Used by GDALOpenEx().
1097 : */
1098 : #define GDAL_OF_GNM 0x08
1099 :
1100 : /** Allow multidimensional raster drivers to be used.
1101 : * Used by GDALOpenEx().
1102 : * @since GDAL 3.1
1103 : */
1104 : #define GDAL_OF_MULTIDIM_RASTER 0x10
1105 :
1106 : #ifndef DOXYGEN_SKIP
1107 : #define GDAL_OF_KIND_MASK 0x1E
1108 : #endif
1109 :
1110 : /** Open in shared mode.
1111 : * Used by GDALOpenEx().
1112 : */
1113 : #define GDAL_OF_SHARED 0x20
1114 :
1115 : /** Emit error message in case of failed open.
1116 : * Used by GDALOpenEx().
1117 : */
1118 : #define GDAL_OF_VERBOSE_ERROR 0x40
1119 :
1120 : /** Open as internal dataset. Such dataset isn't registered in the global list
1121 : * of opened dataset. Cannot be used with GDAL_OF_SHARED.
1122 : *
1123 : * Used by GDALOpenEx().
1124 : */
1125 : #define GDAL_OF_INTERNAL 0x80
1126 :
1127 : /** Let GDAL decide if a array-based or hashset-based storage strategy for
1128 : * cached blocks must be used.
1129 : *
1130 : * GDAL_OF_DEFAULT_BLOCK_ACCESS, GDAL_OF_ARRAY_BLOCK_ACCESS and
1131 : * GDAL_OF_HASHSET_BLOCK_ACCESS are mutually exclusive.
1132 : *
1133 : * Used by GDALOpenEx().
1134 : */
1135 : #define GDAL_OF_DEFAULT_BLOCK_ACCESS 0
1136 :
1137 : /** Use a array-based storage strategy for cached blocks.
1138 : *
1139 : * GDAL_OF_DEFAULT_BLOCK_ACCESS, GDAL_OF_ARRAY_BLOCK_ACCESS and
1140 : * GDAL_OF_HASHSET_BLOCK_ACCESS are mutually exclusive.
1141 : *
1142 : * Used by GDALOpenEx().
1143 : */
1144 : #define GDAL_OF_ARRAY_BLOCK_ACCESS 0x100
1145 :
1146 : /** Use a hashset-based storage strategy for cached blocks.
1147 : *
1148 : * GDAL_OF_DEFAULT_BLOCK_ACCESS, GDAL_OF_ARRAY_BLOCK_ACCESS and
1149 : * GDAL_OF_HASHSET_BLOCK_ACCESS are mutually exclusive.
1150 : *
1151 : * Used by GDALOpenEx().
1152 : */
1153 : #define GDAL_OF_HASHSET_BLOCK_ACCESS 0x200
1154 :
1155 : #ifndef DOXYGEN_SKIP
1156 : /* Reserved for a potential future alternative to GDAL_OF_ARRAY_BLOCK_ACCESS
1157 : * and GDAL_OF_HASHSET_BLOCK_ACCESS */
1158 : #define GDAL_OF_RESERVED_1 0x300
1159 :
1160 : /** Mask to detect the block access method */
1161 : #define GDAL_OF_BLOCK_ACCESS_MASK 0x300
1162 : #endif
1163 :
1164 : #ifndef DOXYGEN_SKIP
1165 : /** Set by GDALOpenEx() to indicate to Identify() method that they are called
1166 : * from it */
1167 : #define GDAL_OF_FROM_GDALOPEN 0x400
1168 : #endif
1169 :
1170 : /** Open in thread-safe mode. Not compatible with
1171 : * GDAL_OF_VECTOR, GDAL_OF_MULTIDIM_RASTER or GDAL_OF_UPDATE
1172 : *
1173 : * Used by GDALOpenEx().
1174 : * @since GDAL 3.10
1175 : */
1176 : #define GDAL_OF_THREAD_SAFE 0x800
1177 :
1178 : GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenEx(
1179 : const char *pszFilename, unsigned int nOpenFlags,
1180 : const char *const *papszAllowedDrivers, const char *const *papszOpenOptions,
1181 : const char *const *papszSiblingFiles) CPL_WARN_UNUSED_RESULT;
1182 :
1183 : int CPL_DLL CPL_STDCALL GDALDumpOpenDatasets(FILE *);
1184 :
1185 : GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriverByName(const char *);
1186 : int CPL_DLL CPL_STDCALL GDALGetDriverCount(void);
1187 : GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriver(int);
1188 : GDALDriverH CPL_DLL CPL_STDCALL GDALCreateDriver(void);
1189 : void CPL_DLL CPL_STDCALL GDALDestroyDriver(GDALDriverH);
1190 : int CPL_DLL CPL_STDCALL GDALRegisterDriver(GDALDriverH);
1191 : void CPL_DLL CPL_STDCALL GDALDeregisterDriver(GDALDriverH);
1192 : void CPL_DLL CPL_STDCALL GDALDestroyDriverManager(void);
1193 : void CPL_DLL GDALClearMemoryCaches(void);
1194 : void CPL_DLL GDALDestroy(void);
1195 : CPLErr CPL_DLL CPL_STDCALL GDALDeleteDataset(GDALDriverH, const char *);
1196 : CPLErr CPL_DLL CPL_STDCALL GDALRenameDataset(GDALDriverH,
1197 : const char *pszNewName,
1198 : const char *pszOldName);
1199 : CPLErr CPL_DLL CPL_STDCALL GDALCopyDatasetFiles(GDALDriverH,
1200 : const char *pszNewName,
1201 : const char *pszOldName);
1202 : int CPL_DLL CPL_STDCALL
1203 : GDALValidateCreationOptions(GDALDriverH, CSLConstList papszCreationOptions);
1204 : char CPL_DLL **GDALGetOutputDriversForDatasetName(const char *pszDestFilename,
1205 : int nFlagRasterVector,
1206 : bool bSingleMatch,
1207 : bool bEmitWarning);
1208 :
1209 : bool CPL_DLL GDALDriverHasOpenOption(GDALDriverH,
1210 : const char *pszOpenOptionName);
1211 :
1212 : /* The following are deprecated */
1213 : const char CPL_DLL *CPL_STDCALL GDALGetDriverShortName(GDALDriverH);
1214 : const char CPL_DLL *CPL_STDCALL GDALGetDriverLongName(GDALDriverH);
1215 : const char CPL_DLL *CPL_STDCALL GDALGetDriverHelpTopic(GDALDriverH);
1216 : const char CPL_DLL *CPL_STDCALL GDALGetDriverCreationOptionList(GDALDriverH);
1217 :
1218 : /* ==================================================================== */
1219 : /* GDAL_GCP */
1220 : /* ==================================================================== */
1221 :
1222 : /** Ground Control Point */
1223 : typedef struct
1224 : {
1225 : /** Unique identifier, often numeric */
1226 : char *pszId;
1227 :
1228 : /** Informational message or "" */
1229 : char *pszInfo;
1230 :
1231 : /** Pixel (x) location of GCP on raster */
1232 : double dfGCPPixel;
1233 : /** Line (y) location of GCP on raster */
1234 : double dfGCPLine;
1235 :
1236 : /** X position of GCP in georeferenced space */
1237 : double dfGCPX;
1238 :
1239 : /** Y position of GCP in georeferenced space */
1240 : double dfGCPY;
1241 :
1242 : /** Elevation of GCP, or zero if not known */
1243 : double dfGCPZ;
1244 : } GDAL_GCP;
1245 :
1246 : void CPL_DLL CPL_STDCALL GDALInitGCPs(int, GDAL_GCP *);
1247 : void CPL_DLL CPL_STDCALL GDALDeinitGCPs(int, GDAL_GCP *);
1248 : GDAL_GCP CPL_DLL *CPL_STDCALL GDALDuplicateGCPs(int, const GDAL_GCP *);
1249 :
1250 : int CPL_DLL CPL_STDCALL GDALGCPsToGeoTransform(
1251 : int nGCPCount, const GDAL_GCP *pasGCPs, double *padfGeoTransform,
1252 : int bApproxOK) CPL_WARN_UNUSED_RESULT;
1253 : int CPL_DLL CPL_STDCALL GDALInvGeoTransform(const double *padfGeoTransformIn,
1254 : double *padfInvGeoTransformOut)
1255 : CPL_WARN_UNUSED_RESULT;
1256 : void CPL_DLL CPL_STDCALL GDALApplyGeoTransform(const double *, double, double,
1257 : double *, double *);
1258 : void CPL_DLL GDALComposeGeoTransforms(const double *padfGeoTransform1,
1259 : const double *padfGeoTransform2,
1260 : double *padfGeoTransformOut);
1261 : int CPL_DLL GDALGCPsToHomography(int nGCPCount, const GDAL_GCP *pasGCPs,
1262 : double *padfHomography) CPL_WARN_UNUSED_RESULT;
1263 : int CPL_DLL GDALInvHomography(const double *padfHomographyIn,
1264 : double *padfInvHomographyOut)
1265 : CPL_WARN_UNUSED_RESULT;
1266 : int CPL_DLL GDALApplyHomography(const double *, double, double, double *,
1267 : double *) CPL_WARN_UNUSED_RESULT;
1268 : void CPL_DLL GDALComposeHomographies(const double *padfHomography1,
1269 : const double *padfHomography2,
1270 : double *padfHomographyOut);
1271 :
1272 : /* ==================================================================== */
1273 : /* major objects (dataset, and, driver, drivermanager). */
1274 : /* ==================================================================== */
1275 :
1276 : char CPL_DLL **CPL_STDCALL GDALGetMetadataDomainList(GDALMajorObjectH hObject);
1277 : CSLConstList CPL_DLL CPL_STDCALL GDALGetMetadata(GDALMajorObjectH,
1278 : const char *);
1279 : CPLErr CPL_DLL CPL_STDCALL GDALSetMetadata(GDALMajorObjectH, CSLConstList,
1280 : const char *);
1281 : const char CPL_DLL *CPL_STDCALL GDALGetMetadataItem(GDALMajorObjectH,
1282 : const char *, const char *);
1283 : CPLErr CPL_DLL CPL_STDCALL GDALSetMetadataItem(GDALMajorObjectH, const char *,
1284 : const char *, const char *);
1285 : const char CPL_DLL *CPL_STDCALL GDALGetDescription(GDALMajorObjectH);
1286 : void CPL_DLL CPL_STDCALL GDALSetDescription(GDALMajorObjectH, const char *);
1287 :
1288 : /* ==================================================================== */
1289 : /* GDALDataset class ... normally this represents one file. */
1290 : /* ==================================================================== */
1291 :
1292 : /** Name of driver metadata item for layer creation option list */
1293 : #define GDAL_DS_LAYER_CREATIONOPTIONLIST "DS_LAYER_CREATIONOPTIONLIST"
1294 :
1295 : GDALDriverH CPL_DLL CPL_STDCALL GDALGetDatasetDriver(GDALDatasetH);
1296 : char CPL_DLL **CPL_STDCALL GDALGetFileList(GDALDatasetH);
1297 : void CPL_DLL GDALDatasetMarkSuppressOnClose(GDALDatasetH);
1298 : CPLErr CPL_DLL CPL_STDCALL GDALClose(GDALDatasetH);
1299 : CPLErr CPL_DLL GDALCloseEx(GDALDatasetH hDS, GDALProgressFunc pfnProgress,
1300 : void *pProgressData);
1301 : bool CPL_DLL GDALDatasetGetCloseReportsProgress(GDALDatasetH hDS);
1302 : CPLErr CPL_DLL GDALDatasetRunCloseWithoutDestroying(GDALDatasetH hDS);
1303 : CPLErr CPL_DLL GDALDatasetRunCloseWithoutDestroyingEx(
1304 : GDALDatasetH hDS, GDALProgressFunc pfnProgress, void *pProgressData);
1305 : int CPL_DLL CPL_STDCALL GDALGetRasterXSize(GDALDatasetH);
1306 : int CPL_DLL CPL_STDCALL GDALGetRasterYSize(GDALDatasetH);
1307 : int CPL_DLL CPL_STDCALL GDALGetRasterCount(GDALDatasetH);
1308 : GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetRasterBand(GDALDatasetH, int);
1309 :
1310 : bool CPL_DLL GDALDatasetIsThreadSafe(GDALDatasetH, int nScopeFlags,
1311 : CSLConstList papszOptions);
1312 : GDALDatasetH CPL_DLL GDALGetThreadSafeDataset(GDALDatasetH, int nScopeFlags,
1313 : CSLConstList papszOptions);
1314 :
1315 : CPLErr CPL_DLL CPL_STDCALL GDALAddBand(GDALDatasetH hDS, GDALDataType eType,
1316 : CSLConstList papszOptions);
1317 :
1318 : GDALAsyncReaderH CPL_DLL CPL_STDCALL GDALBeginAsyncReader(
1319 : GDALDatasetH hDS, int nXOff, int nYOff, int nXSize, int nYSize, void *pBuf,
1320 : int nBufXSize, int nBufYSize, GDALDataType eBufType, int nBandCount,
1321 : int *panBandMap, int nPixelSpace, int nLineSpace, int nBandSpace,
1322 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1323 :
1324 : void CPL_DLL CPL_STDCALL GDALEndAsyncReader(GDALDatasetH hDS,
1325 : GDALAsyncReaderH hAsynchReaderH);
1326 :
1327 : CPLErr CPL_DLL CPL_STDCALL GDALDatasetRasterIO(
1328 : GDALDatasetH hDS, GDALRWFlag eRWFlag, int nDSXOff, int nDSYOff,
1329 : int nDSXSize, int nDSYSize, void *pBuffer, int nBXSize, int nBYSize,
1330 : GDALDataType eBDataType, int nBandCount, const int *panBandCount,
1331 : int nPixelSpace, int nLineSpace, int nBandSpace) CPL_WARN_UNUSED_RESULT;
1332 :
1333 : CPLErr CPL_DLL CPL_STDCALL GDALDatasetRasterIOEx(
1334 : GDALDatasetH hDS, GDALRWFlag eRWFlag, int nDSXOff, int nDSYOff,
1335 : int nDSXSize, int nDSYSize, void *pBuffer, int nBXSize, int nBYSize,
1336 : GDALDataType eBDataType, int nBandCount, const int *panBandCount,
1337 : GSpacing nPixelSpace, GSpacing nLineSpace, GSpacing nBandSpace,
1338 : GDALRasterIOExtraArg *psExtraArg) CPL_WARN_UNUSED_RESULT;
1339 :
1340 : CPLErr CPL_DLL CPL_STDCALL GDALDatasetAdviseRead(
1341 : GDALDatasetH hDS, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
1342 : int nBXSize, int nBYSize, GDALDataType eBDataType, int nBandCount,
1343 : int *panBandCount, CSLConstList papszOptions);
1344 :
1345 : char CPL_DLL **
1346 : GDALDatasetGetCompressionFormats(GDALDatasetH hDS, int nXOff, int nYOff,
1347 : int nXSize, int nYSize, int nBandCount,
1348 : const int *panBandList) CPL_WARN_UNUSED_RESULT;
1349 : CPLErr CPL_DLL GDALDatasetReadCompressedData(
1350 : GDALDatasetH hDS, const char *pszFormat, int nXOff, int nYOff, int nXSize,
1351 : int nYSize, int nBandCount, const int *panBandList, void **ppBuffer,
1352 : size_t *pnBufferSize, char **ppszDetailedFormat);
1353 :
1354 : const char CPL_DLL *CPL_STDCALL GDALGetProjectionRef(GDALDatasetH);
1355 : OGRSpatialReferenceH CPL_DLL GDALGetSpatialRef(GDALDatasetH);
1356 : CPLErr CPL_DLL CPL_STDCALL GDALSetProjection(GDALDatasetH, const char *);
1357 : CPLErr CPL_DLL GDALSetSpatialRef(GDALDatasetH, OGRSpatialReferenceH);
1358 : CPLErr CPL_DLL CPL_STDCALL GDALGetGeoTransform(GDALDatasetH, double *);
1359 : CPLErr CPL_DLL CPL_STDCALL GDALSetGeoTransform(GDALDatasetH, const double *);
1360 :
1361 : CPLErr CPL_DLL GDALGetExtent(GDALDatasetH, OGREnvelope *,
1362 : OGRSpatialReferenceH hCRS);
1363 : CPLErr CPL_DLL GDALGetExtentWGS84LongLat(GDALDatasetH, OGREnvelope *);
1364 :
1365 : CPLErr CPL_DLL GDALDatasetGeolocationToPixelLine(
1366 : GDALDatasetH, double dfGeolocX, double dfGeolocY, OGRSpatialReferenceH hSRS,
1367 : double *pdfPixel, double *pdfLine, CSLConstList papszTransformerOptions);
1368 :
1369 : CPLErr CPL_DLL GDALDatasetGetInterBandCovarianceMatrix(
1370 : GDALDatasetH hDS, double *padfCovMatrix, size_t nSize, int nBandCount,
1371 : const int *panBandList, bool bApproxOK, bool bForce,
1372 : bool bWriteIntoMetadata, int nDeltaDegreeOfFreedom,
1373 : GDALProgressFunc pfnProgress, void *pProgressData);
1374 :
1375 : CPLErr CPL_DLL GDALDatasetComputeInterBandCovarianceMatrix(
1376 : GDALDatasetH hDS, double *padfCovMatrix, size_t nSize, int nBandCount,
1377 : const int *panBandList, bool bApproxOK, bool bWriteIntoMetadata,
1378 : int nDeltaDegreeOfFreedom, GDALProgressFunc pfnProgress,
1379 : void *pProgressData);
1380 :
1381 : int CPL_DLL CPL_STDCALL GDALGetGCPCount(GDALDatasetH);
1382 : const char CPL_DLL *CPL_STDCALL GDALGetGCPProjection(GDALDatasetH);
1383 : OGRSpatialReferenceH CPL_DLL GDALGetGCPSpatialRef(GDALDatasetH);
1384 : const GDAL_GCP CPL_DLL *CPL_STDCALL GDALGetGCPs(GDALDatasetH);
1385 : CPLErr CPL_DLL CPL_STDCALL GDALSetGCPs(GDALDatasetH, int, const GDAL_GCP *,
1386 : const char *);
1387 : CPLErr CPL_DLL GDALSetGCPs2(GDALDatasetH, int, const GDAL_GCP *,
1388 : OGRSpatialReferenceH);
1389 :
1390 : void CPL_DLL *CPL_STDCALL GDALGetInternalHandle(GDALDatasetH, const char *);
1391 : int CPL_DLL CPL_STDCALL GDALReferenceDataset(GDALDatasetH);
1392 : int CPL_DLL CPL_STDCALL GDALDereferenceDataset(GDALDatasetH);
1393 : int CPL_DLL CPL_STDCALL GDALReleaseDataset(GDALDatasetH);
1394 :
1395 : CPLErr CPL_DLL CPL_STDCALL GDALBuildOverviews(GDALDatasetH, const char *, int,
1396 : const int *, int, const int *,
1397 : GDALProgressFunc,
1398 : void *) CPL_WARN_UNUSED_RESULT;
1399 : CPLErr CPL_DLL CPL_STDCALL GDALBuildOverviewsEx(
1400 : GDALDatasetH, const char *, int, const int *, int, const int *,
1401 : GDALProgressFunc, void *, CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1402 : void CPL_DLL CPL_STDCALL GDALGetOpenDatasets(GDALDatasetH **hDS, int *pnCount);
1403 : int CPL_DLL CPL_STDCALL GDALGetAccess(GDALDatasetH hDS);
1404 : CPLErr CPL_DLL CPL_STDCALL GDALFlushCache(GDALDatasetH hDS);
1405 : CPLErr CPL_DLL CPL_STDCALL GDALDropCache(GDALDatasetH hDS);
1406 :
1407 : CPLErr CPL_DLL CPL_STDCALL GDALCreateDatasetMaskBand(GDALDatasetH hDS,
1408 : int nFlags);
1409 :
1410 : CPLErr CPL_DLL CPL_STDCALL GDALDatasetCopyWholeRaster(
1411 : GDALDatasetH hSrcDS, GDALDatasetH hDstDS, CSLConstList papszOptions,
1412 : GDALProgressFunc pfnProgress, void *pProgressData) CPL_WARN_UNUSED_RESULT;
1413 :
1414 : CPLErr CPL_DLL CPL_STDCALL GDALRasterBandCopyWholeRaster(
1415 : GDALRasterBandH hSrcBand, GDALRasterBandH hDstBand,
1416 : const char *const *constpapszOptions, GDALProgressFunc pfnProgress,
1417 : void *pProgressData) CPL_WARN_UNUSED_RESULT;
1418 :
1419 : CPLErr CPL_DLL GDALRegenerateOverviews(GDALRasterBandH hSrcBand,
1420 : int nOverviewCount,
1421 : GDALRasterBandH *pahOverviewBands,
1422 : const char *pszResampling,
1423 : GDALProgressFunc pfnProgress,
1424 : void *pProgressData);
1425 :
1426 : CPLErr CPL_DLL GDALRegenerateOverviewsEx(GDALRasterBandH hSrcBand,
1427 : int nOverviewCount,
1428 : GDALRasterBandH *pahOverviewBands,
1429 : const char *pszResampling,
1430 : GDALProgressFunc pfnProgress,
1431 : void *pProgressData,
1432 : CSLConstList papszOptions);
1433 :
1434 : int CPL_DLL GDALDatasetGetLayerCount(GDALDatasetH);
1435 : OGRLayerH CPL_DLL GDALDatasetGetLayer(GDALDatasetH, int);
1436 :
1437 : /* Defined here to avoid circular dependency with ogr_api.h */
1438 : GDALDatasetH CPL_DLL OGR_L_GetDataset(OGRLayerH hLayer);
1439 :
1440 : OGRLayerH CPL_DLL GDALDatasetGetLayerByName(GDALDatasetH, const char *);
1441 : int CPL_DLL GDALDatasetIsLayerPrivate(GDALDatasetH, int);
1442 : OGRErr CPL_DLL GDALDatasetDeleteLayer(GDALDatasetH, int);
1443 : OGRLayerH CPL_DLL GDALDatasetCreateLayer(GDALDatasetH, const char *,
1444 : OGRSpatialReferenceH,
1445 : OGRwkbGeometryType, CSLConstList);
1446 : OGRLayerH CPL_DLL GDALDatasetCreateLayerFromGeomFieldDefn(GDALDatasetH,
1447 : const char *,
1448 : OGRGeomFieldDefnH,
1449 : CSLConstList);
1450 : OGRLayerH CPL_DLL GDALDatasetCopyLayer(GDALDatasetH, OGRLayerH, const char *,
1451 : CSLConstList);
1452 : void CPL_DLL GDALDatasetResetReading(GDALDatasetH);
1453 : OGRFeatureH CPL_DLL GDALDatasetGetNextFeature(GDALDatasetH hDS,
1454 : OGRLayerH *phBelongingLayer,
1455 : double *pdfProgressPct,
1456 : GDALProgressFunc pfnProgress,
1457 : void *pProgressData);
1458 : int CPL_DLL GDALDatasetTestCapability(GDALDatasetH, const char *);
1459 : OGRLayerH CPL_DLL GDALDatasetExecuteSQL(GDALDatasetH, const char *,
1460 : OGRGeometryH, const char *);
1461 : OGRErr CPL_DLL GDALDatasetAbortSQL(GDALDatasetH);
1462 : void CPL_DLL GDALDatasetReleaseResultSet(GDALDatasetH, OGRLayerH);
1463 : OGRStyleTableH CPL_DLL GDALDatasetGetStyleTable(GDALDatasetH);
1464 : void CPL_DLL GDALDatasetSetStyleTableDirectly(GDALDatasetH, OGRStyleTableH);
1465 : void CPL_DLL GDALDatasetSetStyleTable(GDALDatasetH, OGRStyleTableH);
1466 : OGRErr CPL_DLL GDALDatasetStartTransaction(GDALDatasetH hDS, int bForce);
1467 : OGRErr CPL_DLL GDALDatasetCommitTransaction(GDALDatasetH hDS);
1468 : OGRErr CPL_DLL GDALDatasetRollbackTransaction(GDALDatasetH hDS);
1469 : void CPL_DLL GDALDatasetClearStatistics(GDALDatasetH hDS);
1470 :
1471 : GDALMDArrayH CPL_DLL GDALDatasetAsMDArray(
1472 : GDALDatasetH hDS, CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1473 :
1474 : char CPL_DLL **GDALDatasetGetFieldDomainNames(GDALDatasetH, CSLConstList)
1475 : CPL_WARN_UNUSED_RESULT;
1476 : OGRFieldDomainH CPL_DLL GDALDatasetGetFieldDomain(GDALDatasetH hDS,
1477 : const char *pszName);
1478 : bool CPL_DLL GDALDatasetAddFieldDomain(GDALDatasetH hDS,
1479 : OGRFieldDomainH hFieldDomain,
1480 : char **ppszFailureReason);
1481 : bool CPL_DLL GDALDatasetDeleteFieldDomain(GDALDatasetH hDS, const char *pszName,
1482 : char **ppszFailureReason);
1483 : bool CPL_DLL GDALDatasetUpdateFieldDomain(GDALDatasetH hDS,
1484 : OGRFieldDomainH hFieldDomain,
1485 : char **ppszFailureReason);
1486 :
1487 : char CPL_DLL **GDALDatasetGetRelationshipNames(GDALDatasetH, CSLConstList)
1488 : CPL_WARN_UNUSED_RESULT;
1489 : GDALRelationshipH CPL_DLL GDALDatasetGetRelationship(GDALDatasetH hDS,
1490 : const char *pszName);
1491 :
1492 : bool CPL_DLL GDALDatasetAddRelationship(GDALDatasetH hDS,
1493 : GDALRelationshipH hRelationship,
1494 : char **ppszFailureReason);
1495 : bool CPL_DLL GDALDatasetDeleteRelationship(GDALDatasetH hDS,
1496 : const char *pszName,
1497 : char **ppszFailureReason);
1498 : bool CPL_DLL GDALDatasetUpdateRelationship(GDALDatasetH hDS,
1499 : GDALRelationshipH hRelationship,
1500 : char **ppszFailureReason);
1501 :
1502 : /** Type of functions to pass to GDALDatasetSetQueryLoggerFunc
1503 : * @since GDAL 3.7 */
1504 : typedef void (*GDALQueryLoggerFunc)(const char *pszSQL, const char *pszError,
1505 : int64_t lNumRecords,
1506 : int64_t lExecutionTimeMilliseconds,
1507 : void *pQueryLoggerArg);
1508 :
1509 : /**
1510 : * Sets the SQL query logger callback.
1511 : *
1512 : * When supported by the driver, the callback will be called with
1513 : * the executed SQL text, the error message, the execution time in milliseconds,
1514 : * the number of records fetched/affected and the client status data.
1515 : *
1516 : * A value of -1 in the execution time or in the number of records indicates
1517 : * that the values are unknown.
1518 : *
1519 : * @param hDS Dataset handle.
1520 : * @param pfnQueryLoggerFunc Callback function
1521 : * @param poQueryLoggerArg Opaque client status data
1522 : * @return true in case of success.
1523 : * @since GDAL 3.7
1524 : */
1525 : bool CPL_DLL GDALDatasetSetQueryLoggerFunc(
1526 : GDALDatasetH hDS, GDALQueryLoggerFunc pfnQueryLoggerFunc,
1527 : void *poQueryLoggerArg);
1528 :
1529 : /* ==================================================================== */
1530 : /* Informational utilities about subdatasets in file names */
1531 : /* ==================================================================== */
1532 :
1533 : /**
1534 : * @brief Returns a new GDALSubdatasetInfo object with methods to extract
1535 : * and manipulate subdataset information.
1536 : * If the pszFileName argument is not recognized by any driver as
1537 : * a subdataset descriptor, NULL is returned.
1538 : * The returned object must be freed with GDALDestroySubdatasetInfo().
1539 : * @param pszFileName File name with subdataset information
1540 : * @note This method does not check if the subdataset actually exists.
1541 : * @return Opaque pointer to a GDALSubdatasetInfo object or NULL if no drivers accepted the file name.
1542 : * @since GDAL 3.8
1543 : */
1544 : GDALSubdatasetInfoH CPL_DLL GDALGetSubdatasetInfo(const char *pszFileName);
1545 :
1546 : /**
1547 : * @brief Returns the file path component of a
1548 : * subdataset descriptor effectively stripping the information about the subdataset
1549 : * and returning the "parent" dataset descriptor.
1550 : * The returned string must be freed with CPLFree().
1551 : * @param hInfo Pointer to GDALSubdatasetInfo object
1552 : * @note This method does not check if the subdataset actually exists.
1553 : * @return The original string with the subdataset information removed.
1554 : * @since GDAL 3.8
1555 : */
1556 : char CPL_DLL *GDALSubdatasetInfoGetPathComponent(GDALSubdatasetInfoH hInfo);
1557 :
1558 : /**
1559 : * @brief Returns the subdataset component of a subdataset descriptor descriptor.
1560 : * The returned string must be freed with CPLFree().
1561 : * @param hInfo Pointer to GDALSubdatasetInfo object
1562 : * @note This method does not check if the subdataset actually exists.
1563 : * @return The subdataset name.
1564 : * @since GDAL 3.8
1565 : */
1566 : char CPL_DLL *
1567 : GDALSubdatasetInfoGetSubdatasetComponent(GDALSubdatasetInfoH hInfo);
1568 :
1569 : /**
1570 : * @brief Replaces the path component of a subdataset descriptor.
1571 : * The returned string must be freed with CPLFree().
1572 : * @param hInfo Pointer to GDALSubdatasetInfo object
1573 : * @param pszNewPath New path.
1574 : * @note This method does not check if the subdataset actually exists.
1575 : * @return The original subdataset descriptor with the old path component replaced by newPath.
1576 : * @since GDAL 3.8
1577 : */
1578 : char CPL_DLL *GDALSubdatasetInfoModifyPathComponent(GDALSubdatasetInfoH hInfo,
1579 : const char *pszNewPath);
1580 :
1581 : /**
1582 : * @brief Destroys a GDALSubdatasetInfo object.
1583 : * @param hInfo Pointer to GDALSubdatasetInfo object
1584 : * @since GDAL 3.8
1585 : */
1586 : void CPL_DLL GDALDestroySubdatasetInfo(GDALSubdatasetInfoH hInfo);
1587 :
1588 : /* ==================================================================== */
1589 : /* GDALRasterBand ... one band/channel in a dataset. */
1590 : /* ==================================================================== */
1591 :
1592 : /* Note: the only user of SRCVAL() is alg/gdal_simplesurf.cpp */
1593 :
1594 : /* clang-format off */
1595 : /**
1596 : * SRCVAL - Macro which may be used by pixel functions to obtain
1597 : * a pixel from a source buffer.
1598 : */
1599 : #define SRCVAL(papoSource, eSrcType, ii) \
1600 : (eSrcType == GDT_UInt8 ? CPL_REINTERPRET_CAST(const GByte *, papoSource)[ii] : \
1601 : eSrcType == GDT_Int8 ? CPL_REINTERPRET_CAST(const GInt8 *, papoSource)[ii] : \
1602 : eSrcType == GDT_UInt16 ? CPL_REINTERPRET_CAST(const GUInt16 *, papoSource)[ii] : \
1603 : eSrcType == GDT_Int16 ? CPL_REINTERPRET_CAST(const GInt16 *, papoSource)[ii] : \
1604 : eSrcType == GDT_UInt32 ? CPL_REINTERPRET_CAST(const GUInt32 *, papoSource)[ii] : \
1605 : eSrcType == GDT_Int32 ? CPL_REINTERPRET_CAST(const GInt32 *, papoSource)[ii] : \
1606 : eSrcType == GDT_UInt64 ? CPL_STATIC_CAST(double, CPL_REINTERPRET_CAST(const GUInt64 *, papoSource)[ii]) : \
1607 : eSrcType == GDT_Int64 ? CPL_STATIC_CAST(double, CPL_REINTERPRET_CAST(const GUInt64 *, papoSource)[ii]) : \
1608 : eSrcType == GDT_Float32 ? CPL_STATIC_CAST(double, CPL_REINTERPRET_CAST(const float *, papoSource)[ii]) : \
1609 : eSrcType == GDT_Float64 ? CPL_REINTERPRET_CAST(const double *, papoSource)[ii] : \
1610 : eSrcType == GDT_CInt16 ? CPL_REINTERPRET_CAST(const GInt16 *, papoSource)[(ii)*2] : \
1611 : eSrcType == GDT_CInt32 ? CPL_REINTERPRET_CAST(const GInt32 *, papoSource)[(ii)*2] : \
1612 : eSrcType == GDT_CFloat32 ? CPL_STATIC_CAST(double, CPL_REINTERPRET_CAST(const float *, papoSource)[ii*2]) : \
1613 : eSrcType == GDT_CFloat64 ? CPL_REINTERPRET_CAST(const double *, papoSource)[ii*2] : \
1614 : 0)
1615 :
1616 : /* clang-format on */
1617 :
1618 : /** Type of functions to pass to GDALAddDerivedBandPixelFunc.
1619 : */
1620 : typedef CPLErr (*GDALDerivedPixelFunc)(void **papoSources, int nSources,
1621 : void *pData, int nBufXSize,
1622 : int nBufYSize, GDALDataType eSrcType,
1623 : GDALDataType eBufType, int nPixelSpace,
1624 : int nLineSpace);
1625 :
1626 : /** Type of functions to pass to GDALAddDerivedBandPixelFuncWithArgs.
1627 : * @since GDAL 3.4 */
1628 : typedef CPLErr (*GDALDerivedPixelFuncWithArgs)(
1629 : void **papoSources, int nSources, void *pData, int nBufXSize, int nBufYSize,
1630 : GDALDataType eSrcType, GDALDataType eBufType, int nPixelSpace,
1631 : int nLineSpace, CSLConstList papszFunctionArgs);
1632 :
1633 : GDALDataType CPL_DLL CPL_STDCALL GDALGetRasterDataType(GDALRasterBandH);
1634 : void CPL_DLL CPL_STDCALL GDALGetBlockSize(GDALRasterBandH, int *pnXSize,
1635 : int *pnYSize);
1636 :
1637 : CPLErr CPL_DLL CPL_STDCALL GDALGetActualBlockSize(GDALRasterBandH,
1638 : int nXBlockOff,
1639 : int nYBlockOff, int *pnXValid,
1640 : int *pnYValid);
1641 :
1642 : CPLErr CPL_DLL CPL_STDCALL GDALRasterAdviseRead(GDALRasterBandH hRB,
1643 : int nDSXOff, int nDSYOff,
1644 : int nDSXSize, int nDSYSize,
1645 : int nBXSize, int nBYSize,
1646 : GDALDataType eBDataType,
1647 : CSLConstList papszOptions);
1648 :
1649 : CPLErr CPL_DLL CPL_STDCALL GDALRasterIO(GDALRasterBandH hRBand,
1650 : GDALRWFlag eRWFlag, int nDSXOff,
1651 : int nDSYOff, int nDSXSize, int nDSYSize,
1652 : void *pBuffer, int nBXSize, int nBYSize,
1653 : GDALDataType eBDataType,
1654 : int nPixelSpace,
1655 : int nLineSpace) CPL_WARN_UNUSED_RESULT;
1656 : CPLErr CPL_DLL CPL_STDCALL GDALRasterIOEx(
1657 : GDALRasterBandH hRBand, GDALRWFlag eRWFlag, int nDSXOff, int nDSYOff,
1658 : int nDSXSize, int nDSYSize, void *pBuffer, int nBXSize, int nBYSize,
1659 : GDALDataType eBDataType, GSpacing nPixelSpace, GSpacing nLineSpace,
1660 : GDALRasterIOExtraArg *psExtraArg) CPL_WARN_UNUSED_RESULT;
1661 : CPLErr CPL_DLL CPL_STDCALL GDALReadBlock(GDALRasterBandH, int, int,
1662 : void *) CPL_WARN_UNUSED_RESULT;
1663 : CPLErr CPL_DLL CPL_STDCALL GDALWriteBlock(GDALRasterBandH, int, int,
1664 : void *) CPL_WARN_UNUSED_RESULT;
1665 : int CPL_DLL CPL_STDCALL GDALGetRasterBandXSize(GDALRasterBandH);
1666 : int CPL_DLL CPL_STDCALL GDALGetRasterBandYSize(GDALRasterBandH);
1667 : GDALAccess CPL_DLL CPL_STDCALL GDALGetRasterAccess(GDALRasterBandH);
1668 : int CPL_DLL CPL_STDCALL GDALGetBandNumber(GDALRasterBandH);
1669 : GDALDatasetH CPL_DLL CPL_STDCALL GDALGetBandDataset(GDALRasterBandH);
1670 :
1671 : GDALColorInterp
1672 : CPL_DLL CPL_STDCALL GDALGetRasterColorInterpretation(GDALRasterBandH);
1673 : CPLErr CPL_DLL CPL_STDCALL GDALSetRasterColorInterpretation(GDALRasterBandH,
1674 : GDALColorInterp);
1675 : GDALColorTableH CPL_DLL CPL_STDCALL GDALGetRasterColorTable(GDALRasterBandH);
1676 : CPLErr CPL_DLL CPL_STDCALL GDALSetRasterColorTable(GDALRasterBandH,
1677 : GDALColorTableH);
1678 : int CPL_DLL CPL_STDCALL GDALHasArbitraryOverviews(GDALRasterBandH);
1679 : int CPL_DLL CPL_STDCALL GDALGetOverviewCount(GDALRasterBandH);
1680 : GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetOverview(GDALRasterBandH, int);
1681 : double CPL_DLL CPL_STDCALL GDALGetRasterNoDataValue(GDALRasterBandH, int *);
1682 : int64_t CPL_DLL CPL_STDCALL GDALGetRasterNoDataValueAsInt64(GDALRasterBandH,
1683 : int *);
1684 : uint64_t CPL_DLL CPL_STDCALL GDALGetRasterNoDataValueAsUInt64(GDALRasterBandH,
1685 : int *);
1686 : CPLErr CPL_DLL CPL_STDCALL GDALSetRasterNoDataValue(GDALRasterBandH, double);
1687 : CPLErr CPL_DLL CPL_STDCALL GDALSetRasterNoDataValueAsInt64(GDALRasterBandH,
1688 : int64_t);
1689 : CPLErr CPL_DLL CPL_STDCALL GDALSetRasterNoDataValueAsUInt64(GDALRasterBandH,
1690 : uint64_t);
1691 : CPLErr CPL_DLL CPL_STDCALL GDALDeleteRasterNoDataValue(GDALRasterBandH);
1692 : char CPL_DLL **CPL_STDCALL GDALGetRasterCategoryNames(GDALRasterBandH);
1693 : CPLErr CPL_DLL CPL_STDCALL GDALSetRasterCategoryNames(GDALRasterBandH,
1694 : CSLConstList);
1695 : double CPL_DLL CPL_STDCALL GDALGetRasterMinimum(GDALRasterBandH,
1696 : int *pbSuccess);
1697 : double CPL_DLL CPL_STDCALL GDALGetRasterMaximum(GDALRasterBandH,
1698 : int *pbSuccess);
1699 : CPLErr CPL_DLL CPL_STDCALL GDALGetRasterStatistics(
1700 : GDALRasterBandH, int bApproxOK, int bForce, double *pdfMin, double *pdfMax,
1701 : double *pdfMean, double *pdfStdDev);
1702 : CPLErr CPL_DLL CPL_STDCALL
1703 : GDALComputeRasterStatistics(GDALRasterBandH, int bApproxOK, double *pdfMin,
1704 : double *pdfMax, double *pdfMean, double *pdfStdDev,
1705 : GDALProgressFunc pfnProgress, void *pProgressData);
1706 : CPLErr CPL_DLL CPL_STDCALL GDALSetRasterStatistics(GDALRasterBandH hBand,
1707 : double dfMin, double dfMax,
1708 : double dfMean,
1709 : double dfStdDev);
1710 :
1711 : GDALMDArrayH
1712 : CPL_DLL GDALRasterBandAsMDArray(GDALRasterBandH) CPL_WARN_UNUSED_RESULT;
1713 :
1714 : const char CPL_DLL *CPL_STDCALL GDALGetRasterUnitType(GDALRasterBandH);
1715 : CPLErr CPL_DLL CPL_STDCALL GDALSetRasterUnitType(GDALRasterBandH hBand,
1716 : const char *pszNewValue);
1717 : double CPL_DLL CPL_STDCALL GDALGetRasterOffset(GDALRasterBandH, int *pbSuccess);
1718 : CPLErr CPL_DLL CPL_STDCALL GDALSetRasterOffset(GDALRasterBandH hBand,
1719 : double dfNewOffset);
1720 : double CPL_DLL CPL_STDCALL GDALGetRasterScale(GDALRasterBandH, int *pbSuccess);
1721 : CPLErr CPL_DLL CPL_STDCALL GDALSetRasterScale(GDALRasterBandH hBand,
1722 : double dfNewOffset);
1723 : CPLErr CPL_DLL CPL_STDCALL GDALComputeRasterMinMax(GDALRasterBandH hBand,
1724 : int bApproxOK,
1725 : double adfMinMax[2]);
1726 : CPLErr CPL_DLL GDALComputeRasterMinMaxLocation(GDALRasterBandH hBand,
1727 : double *pdfMin, double *pdfMax,
1728 : int *pnMinX, int *pnMinY,
1729 : int *pnMaxX, int *pnMaxY);
1730 : CPLErr CPL_DLL CPL_STDCALL GDALFlushRasterCache(GDALRasterBandH hBand);
1731 : CPLErr CPL_DLL CPL_STDCALL GDALDropRasterCache(GDALRasterBandH hBand);
1732 : CPLErr CPL_DLL CPL_STDCALL GDALGetRasterHistogram(
1733 : GDALRasterBandH hBand, double dfMin, double dfMax, int nBuckets,
1734 : int *panHistogram, int bIncludeOutOfRange, int bApproxOK,
1735 : GDALProgressFunc pfnProgress, void *pProgressData)
1736 : /*! @cond Doxygen_Suppress */
1737 : CPL_WARN_DEPRECATED("Use GDALGetRasterHistogramEx() instead")
1738 : /*! @endcond */
1739 : ;
1740 : CPLErr CPL_DLL CPL_STDCALL GDALGetRasterHistogramEx(
1741 : GDALRasterBandH hBand, double dfMin, double dfMax, int nBuckets,
1742 : GUIntBig *panHistogram, int bIncludeOutOfRange, int bApproxOK,
1743 : GDALProgressFunc pfnProgress, void *pProgressData);
1744 : CPLErr CPL_DLL CPL_STDCALL
1745 : GDALGetDefaultHistogram(GDALRasterBandH hBand, double *pdfMin, double *pdfMax,
1746 : int *pnBuckets, int **ppanHistogram, int bForce,
1747 : GDALProgressFunc pfnProgress, void *pProgressData)
1748 : /*! @cond Doxygen_Suppress */
1749 : CPL_WARN_DEPRECATED("Use GDALGetDefaultHistogramEx() instead")
1750 : /*! @endcond */
1751 : ;
1752 : CPLErr CPL_DLL CPL_STDCALL
1753 : GDALGetDefaultHistogramEx(GDALRasterBandH hBand, double *pdfMin, double *pdfMax,
1754 : int *pnBuckets, GUIntBig **ppanHistogram, int bForce,
1755 : GDALProgressFunc pfnProgress, void *pProgressData);
1756 : CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultHistogram(GDALRasterBandH hBand,
1757 : double dfMin, double dfMax,
1758 : int nBuckets,
1759 : int *panHistogram)
1760 : /*! @cond Doxygen_Suppress */
1761 : CPL_WARN_DEPRECATED("Use GDALSetDefaultHistogramEx() instead")
1762 : /*! @endcond */
1763 : ;
1764 : CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultHistogramEx(GDALRasterBandH hBand,
1765 : double dfMin, double dfMax,
1766 : int nBuckets,
1767 : GUIntBig *panHistogram);
1768 : int CPL_DLL CPL_STDCALL GDALGetRandomRasterSample(GDALRasterBandH, int,
1769 : float *);
1770 : GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetRasterSampleOverview(GDALRasterBandH,
1771 : int);
1772 : GDALRasterBandH CPL_DLL CPL_STDCALL
1773 : GDALGetRasterSampleOverviewEx(GDALRasterBandH, GUIntBig);
1774 : CPLErr CPL_DLL CPL_STDCALL GDALFillRaster(GDALRasterBandH hBand,
1775 : double dfRealValue,
1776 : double dfImaginaryValue);
1777 : CPLErr CPL_DLL CPL_STDCALL GDALComputeBandStats(
1778 : GDALRasterBandH hBand, int nSampleStep, double *pdfMean, double *pdfStdDev,
1779 : GDALProgressFunc pfnProgress, void *pProgressData);
1780 : CPLErr CPL_DLL GDALOverviewMagnitudeCorrection(GDALRasterBandH hBaseBand,
1781 : int nOverviewCount,
1782 : GDALRasterBandH *pahOverviews,
1783 : GDALProgressFunc pfnProgress,
1784 : void *pProgressData);
1785 :
1786 : GDALRasterAttributeTableH CPL_DLL CPL_STDCALL
1787 : GDALGetDefaultRAT(GDALRasterBandH hBand);
1788 : CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultRAT(GDALRasterBandH,
1789 : GDALRasterAttributeTableH);
1790 : CPLErr CPL_DLL CPL_STDCALL GDALAddDerivedBandPixelFunc(
1791 : const char *pszName, GDALDerivedPixelFunc pfnPixelFunc);
1792 : CPLErr CPL_DLL CPL_STDCALL GDALAddDerivedBandPixelFuncWithArgs(
1793 : const char *pszName, GDALDerivedPixelFuncWithArgs pfnPixelFunc,
1794 : const char *pszMetadata);
1795 :
1796 : CPLErr CPL_DLL GDALRasterInterpolateAtPoint(GDALRasterBandH hBand,
1797 : double dfPixel, double dfLine,
1798 : GDALRIOResampleAlg eInterpolation,
1799 : double *pdfRealValue,
1800 : double *pdfImagValue);
1801 :
1802 : CPLErr CPL_DLL GDALRasterInterpolateAtGeolocation(
1803 : GDALRasterBandH hBand, double dfGeolocX, double dfGeolocY,
1804 : OGRSpatialReferenceH hSRS, GDALRIOResampleAlg eInterpolation,
1805 : double *pdfRealValue, double *pdfImagValue,
1806 : CSLConstList papszTransformerOptions);
1807 :
1808 : /** Generic pointer for the working structure of VRTProcessedDataset
1809 : * function. */
1810 : typedef void *VRTPDWorkingDataPtr;
1811 :
1812 : /** Initialization function to pass to GDALVRTRegisterProcessedDatasetFunc.
1813 : *
1814 : * This initialization function is called for each step of a VRTProcessedDataset
1815 : * that uses the related algorithm.
1816 : * The initialization function returns the output data type, output band count
1817 : * and potentially initializes a working structure, typically parsing arguments.
1818 : *
1819 : * @param pszFuncName Function name. Must be unique and not null.
1820 : * @param pUserData User data. May be nullptr. Must remain valid during the
1821 : * lifetime of GDAL.
1822 : * @param papszFunctionArgs Function arguments as a list of key=value pairs.
1823 : * @param nInBands Number of input bands.
1824 : * @param eInDT Input data type.
1825 : * @param[in,out] padfInNoData Array of nInBands values for the input nodata
1826 : * value. The init function may also override them.
1827 : * @param[in,out] pnOutBands Pointer whose value must be set to the number of
1828 : * output bands. This will be set to 0 by the caller
1829 : * when calling the function, unless this is the
1830 : * final step, in which case it will be initialized
1831 : * with the number of expected output bands.
1832 : * @param[out] peOutDT Pointer whose value must be set to the output
1833 : * data type.
1834 : * @param[in,out] ppadfOutNoData Pointer to an array of *pnOutBands values
1835 : * for the output nodata value that the
1836 : * function must set.
1837 : * For non-final steps, *ppadfOutNoData
1838 : * will be nullptr and it is the responsibility
1839 : * of the function to CPLMalloc()'ate it.
1840 : * If this is the final step, it will be
1841 : * already allocated and initialized with the
1842 : * expected nodata values from the output
1843 : * dataset (if the init function need to
1844 : * reallocate it, it must use CPLRealloc())
1845 : * @param pszVRTPath Directory of the VRT
1846 : * @param[out] ppWorkingData Pointer whose value must be set to a working
1847 : * structure, or nullptr.
1848 : * @return CE_None in case of success, error otherwise.
1849 : * @since GDAL 3.9 */
1850 : typedef CPLErr (*GDALVRTProcessedDatasetFuncInit)(
1851 : const char *pszFuncName, void *pUserData, CSLConstList papszFunctionArgs,
1852 : int nInBands, GDALDataType eInDT, double *padfInNoData, int *pnOutBands,
1853 : GDALDataType *peOutDT, double **ppadfOutNoData, const char *pszVRTPath,
1854 : VRTPDWorkingDataPtr *ppWorkingData);
1855 :
1856 : /** Free function to pass to GDALVRTRegisterProcessedDatasetFunc.
1857 : *
1858 : * @param pszFuncName Function name. Must be unique and not null.
1859 : * @param pUserData User data. May be nullptr. Must remain valid during the
1860 : * lifetime of GDAL.
1861 : * @param pWorkingData Value of the *ppWorkingData output parameter of
1862 : * GDALVRTProcessedDatasetFuncInit.
1863 : * @since GDAL 3.9
1864 : */
1865 : typedef void (*GDALVRTProcessedDatasetFuncFree)(
1866 : const char *pszFuncName, void *pUserData, VRTPDWorkingDataPtr pWorkingData);
1867 :
1868 : /** Processing function to pass to GDALVRTRegisterProcessedDatasetFunc.
1869 : * @param pszFuncName Function name. Must be unique and not null.
1870 : * @param pUserData User data. May be nullptr. Must remain valid during the
1871 : * lifetime of GDAL.
1872 : * @param pWorkingData Value of the *ppWorkingData output parameter of
1873 : * GDALVRTProcessedDatasetFuncInit.
1874 : * @param papszFunctionArgs Function arguments as a list of key=value pairs.
1875 : * @param nBufXSize Width in pixels of pInBuffer and pOutBuffer
1876 : * @param nBufYSize Height in pixels of pInBuffer and pOutBuffer
1877 : * @param pInBuffer Input buffer. It is pixel-interleaved
1878 : * (i.e. R00,G00,B00,R01,G01,B01, etc.)
1879 : * @param nInBufferSize Size in bytes of pInBuffer
1880 : * @param eInDT Data type of pInBuffer
1881 : * @param nInBands Number of bands in pInBuffer.
1882 : * @param padfInNoData Input nodata values.
1883 : * @param pOutBuffer Output buffer. It is pixel-interleaved
1884 : * (i.e. R00,G00,B00,R01,G01,B01, etc.)
1885 : * @param nOutBufferSize Size in bytes of pOutBuffer
1886 : * @param eOutDT Data type of pOutBuffer
1887 : * @param nOutBands Number of bands in pOutBuffer.
1888 : * @param padfOutNoData Input nodata values.
1889 : * @param dfSrcXOff Source X coordinate in pixel of the top-left of the region
1890 : * @param dfSrcYOff Source Y coordinate in pixel of the top-left of the region
1891 : * @param dfSrcXSize Width in pixels of the region
1892 : * @param dfSrcYSize Height in pixels of the region
1893 : * @param adfSrcGT Source geotransform
1894 : * @param pszVRTPath Directory of the VRT
1895 : * @param papszExtra Extra arguments (unused for now)
1896 : * @since GDAL 3.9
1897 : */
1898 : typedef CPLErr (*GDALVRTProcessedDatasetFuncProcess)(
1899 : const char *pszFuncName, void *pUserData, VRTPDWorkingDataPtr pWorkingData,
1900 : CSLConstList papszFunctionArgs, int nBufXSize, int nBufYSize,
1901 : const void *pInBuffer, size_t nInBufferSize, GDALDataType eInDT,
1902 : int nInBands, const double *padfInNoData, void *pOutBuffer,
1903 : size_t nOutBufferSize, GDALDataType eOutDT, int nOutBands,
1904 : const double *padfOutNoData, double dfSrcXOff, double dfSrcYOff,
1905 : double dfSrcXSize, double dfSrcYSize, const double adfSrcGT[/*6*/],
1906 : const char *pszVRTPath, CSLConstList papszExtra);
1907 :
1908 : CPLErr CPL_DLL GDALVRTRegisterProcessedDatasetFunc(
1909 : const char *pszFuncName, void *pUserData, const char *pszXMLMetadata,
1910 : GDALDataType eRequestedInputDT, const GDALDataType *paeSupportedInputDT,
1911 : size_t nSupportedInputDTSize, const int *panSupportedInputBandCount,
1912 : size_t nSupportedInputBandCountSize,
1913 : GDALVRTProcessedDatasetFuncInit pfnInit,
1914 : GDALVRTProcessedDatasetFuncFree pfnFree,
1915 : GDALVRTProcessedDatasetFuncProcess pfnProcess, CSLConstList papszOptions);
1916 :
1917 : GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetMaskBand(GDALRasterBandH hBand);
1918 : int CPL_DLL CPL_STDCALL GDALGetMaskFlags(GDALRasterBandH hBand);
1919 : CPLErr CPL_DLL CPL_STDCALL GDALCreateMaskBand(GDALRasterBandH hBand,
1920 : int nFlags);
1921 : bool CPL_DLL GDALIsMaskBand(GDALRasterBandH hBand);
1922 :
1923 : /** Flag returned by GDALGetMaskFlags() to indicate that all pixels are valid */
1924 : #define GMF_ALL_VALID 0x01
1925 : /** Flag returned by GDALGetMaskFlags() to indicate that the mask band is
1926 : * valid for all bands */
1927 : #define GMF_PER_DATASET 0x02
1928 : /** Flag returned by GDALGetMaskFlags() to indicate that the mask band is
1929 : * an alpha band */
1930 : #define GMF_ALPHA 0x04
1931 : /** Flag returned by GDALGetMaskFlags() to indicate that the mask band is
1932 : * computed from nodata values */
1933 : #define GMF_NODATA 0x08
1934 :
1935 : /** Flag returned by GDALGetDataCoverageStatus() when the driver does not
1936 : * implement GetDataCoverageStatus(). This flag should be returned together
1937 : * with GDAL_DATA_COVERAGE_STATUS_DATA */
1938 : #define GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED 0x01
1939 :
1940 : /** Flag returned by GDALGetDataCoverageStatus() when there is (potentially)
1941 : * data in the queried window. Can be combined with the binary or operator
1942 : * with GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED or
1943 : * GDAL_DATA_COVERAGE_STATUS_EMPTY */
1944 : #define GDAL_DATA_COVERAGE_STATUS_DATA 0x02
1945 :
1946 : /** Flag returned by GDALGetDataCoverageStatus() when there is nodata in the
1947 : * queried window. This is typically identified by the concept of missing block
1948 : * in formats that supports it.
1949 : * Can be combined with the binary or operator with
1950 : * GDAL_DATA_COVERAGE_STATUS_DATA */
1951 : #define GDAL_DATA_COVERAGE_STATUS_EMPTY 0x04
1952 :
1953 : int CPL_DLL CPL_STDCALL GDALGetDataCoverageStatus(GDALRasterBandH hBand,
1954 : int nXOff, int nYOff,
1955 : int nXSize, int nYSize,
1956 : int nMaskFlagStop,
1957 : double *pdfDataPct);
1958 :
1959 : void CPL_DLL GDALComputedRasterBandRelease(GDALComputedRasterBandH hBand);
1960 :
1961 : /** Raster algebra unary operation */
1962 : typedef enum
1963 : {
1964 : /** Logical not */
1965 : GRAUO_LOGICAL_NOT,
1966 : /** Absolute value (module for complex data type) */
1967 : GRAUO_ABS,
1968 : /** Square root */
1969 : GRAUO_SQRT,
1970 : /** Natural logarithm (``ln``) */
1971 : GRAUO_LOG,
1972 : /** Logarithm base 10 */
1973 : GRAUO_LOG10,
1974 : } GDALRasterAlgebraUnaryOperation;
1975 :
1976 : GDALComputedRasterBandH CPL_DLL GDALRasterBandUnaryOp(
1977 : GDALRasterBandH hBand,
1978 : GDALRasterAlgebraUnaryOperation eOp) CPL_WARN_UNUSED_RESULT;
1979 :
1980 : /** Raster algebra binary operation */
1981 : typedef enum
1982 : {
1983 : /** Addition */
1984 : GRABO_ADD,
1985 : /** Subtraction */
1986 : GRABO_SUB,
1987 : /** Multiplication */
1988 : GRABO_MUL,
1989 : /** Division */
1990 : GRABO_DIV,
1991 : /** Power */
1992 : GRABO_POW,
1993 : /** Strictly greater than test*/
1994 : GRABO_GT,
1995 : /** Greater or equal to test */
1996 : GRABO_GE,
1997 : /** Strictly lesser than test */
1998 : GRABO_LT,
1999 : /** Lesser or equal to test */
2000 : GRABO_LE,
2001 : /** Equality test */
2002 : GRABO_EQ,
2003 : /** Non-equality test */
2004 : GRABO_NE,
2005 : /** Logical and */
2006 : GRABO_LOGICAL_AND,
2007 : /** Logical or */
2008 : GRABO_LOGICAL_OR
2009 : } GDALRasterAlgebraBinaryOperation;
2010 :
2011 : GDALComputedRasterBandH CPL_DLL GDALRasterBandBinaryOpBand(
2012 : GDALRasterBandH hBand, GDALRasterAlgebraBinaryOperation eOp,
2013 : GDALRasterBandH hOtherBand) CPL_WARN_UNUSED_RESULT;
2014 : GDALComputedRasterBandH CPL_DLL GDALRasterBandBinaryOpDouble(
2015 : GDALRasterBandH hBand, GDALRasterAlgebraBinaryOperation eOp,
2016 : double constant) CPL_WARN_UNUSED_RESULT;
2017 : GDALComputedRasterBandH CPL_DLL GDALRasterBandBinaryOpDoubleToBand(
2018 : double constant, GDALRasterAlgebraBinaryOperation eOp,
2019 : GDALRasterBandH hBand) CPL_WARN_UNUSED_RESULT;
2020 :
2021 : GDALComputedRasterBandH CPL_DLL
2022 : GDALRasterBandIfThenElse(GDALRasterBandH hCondBand, GDALRasterBandH hThenBand,
2023 : GDALRasterBandH hElseBand) CPL_WARN_UNUSED_RESULT;
2024 :
2025 : GDALComputedRasterBandH CPL_DLL GDALRasterBandAsDataType(
2026 : GDALRasterBandH hBand, GDALDataType eDT) CPL_WARN_UNUSED_RESULT;
2027 :
2028 : GDALComputedRasterBandH CPL_DLL GDALMaximumOfNBands(
2029 : size_t nBandCount, GDALRasterBandH *pahBands) CPL_WARN_UNUSED_RESULT;
2030 : GDALComputedRasterBandH CPL_DLL GDALRasterBandMaxConstant(
2031 : GDALRasterBandH hBand, double dfConstant) CPL_WARN_UNUSED_RESULT;
2032 : GDALComputedRasterBandH CPL_DLL GDALMinimumOfNBands(
2033 : size_t nBandCount, GDALRasterBandH *pahBands) CPL_WARN_UNUSED_RESULT;
2034 : GDALComputedRasterBandH CPL_DLL GDALRasterBandMinConstant(
2035 : GDALRasterBandH hBand, double dfConstant) CPL_WARN_UNUSED_RESULT;
2036 : GDALComputedRasterBandH CPL_DLL GDALMeanOfNBands(
2037 : size_t nBandCount, GDALRasterBandH *pahBands) CPL_WARN_UNUSED_RESULT;
2038 :
2039 : /* ==================================================================== */
2040 : /* GDALAsyncReader */
2041 : /* ==================================================================== */
2042 :
2043 : GDALAsyncStatusType CPL_DLL CPL_STDCALL GDALARGetNextUpdatedRegion(
2044 : GDALAsyncReaderH hARIO, double dfTimeout, int *pnXBufOff, int *pnYBufOff,
2045 : int *pnXBufSize, int *pnYBufSize);
2046 : int CPL_DLL CPL_STDCALL GDALARLockBuffer(GDALAsyncReaderH hARIO,
2047 : double dfTimeout);
2048 : void CPL_DLL CPL_STDCALL GDALARUnlockBuffer(GDALAsyncReaderH hARIO);
2049 :
2050 : /* -------------------------------------------------------------------- */
2051 : /* Helper functions. */
2052 : /* -------------------------------------------------------------------- */
2053 : int CPL_DLL CPL_STDCALL GDALGeneralCmdLineProcessor(int nArgc,
2054 : char ***ppapszArgv,
2055 : int nOptions);
2056 : void CPL_DLL CPL_STDCALL GDALSwapWords(void *pData, int nWordSize,
2057 : int nWordCount, int nWordSkip);
2058 : void CPL_DLL CPL_STDCALL GDALSwapWordsEx(void *pData, int nWordSize,
2059 : size_t nWordCount, int nWordSkip);
2060 :
2061 : void CPL_DLL CPL_STDCALL GDALCopyWords(const void *CPL_RESTRICT pSrcData,
2062 : GDALDataType eSrcType,
2063 : int nSrcPixelOffset,
2064 : void *CPL_RESTRICT pDstData,
2065 : GDALDataType eDstType,
2066 : int nDstPixelOffset, int nWordCount);
2067 :
2068 : void CPL_DLL CPL_STDCALL GDALCopyWords64(
2069 : const void *CPL_RESTRICT pSrcData, GDALDataType eSrcType,
2070 : int nSrcPixelOffset, void *CPL_RESTRICT pDstData, GDALDataType eDstType,
2071 : int nDstPixelOffset, GPtrDiff_t nWordCount);
2072 :
2073 : void CPL_DLL GDALCopyBits(const GByte *pabySrcData, int nSrcOffset,
2074 : int nSrcStep, GByte *pabyDstData, int nDstOffset,
2075 : int nDstStep, int nBitCount, int nStepCount);
2076 :
2077 : void CPL_DLL GDALDeinterleave(const void *pSourceBuffer, GDALDataType eSourceDT,
2078 : int nComponents, void **ppDestBuffer,
2079 : GDALDataType eDestDT, size_t nIters);
2080 :
2081 : void CPL_DLL GDALTranspose2D(const void *pSrc, GDALDataType eSrcType,
2082 : void *pDst, GDALDataType eDstType,
2083 : size_t nSrcWidth, size_t nSrcHeight);
2084 :
2085 : double CPL_DLL GDALGetNoDataReplacementValue(GDALDataType, double);
2086 :
2087 : int CPL_DLL CPL_STDCALL GDALLoadWorldFile(const char *, double *);
2088 : int CPL_DLL CPL_STDCALL GDALReadWorldFile(const char *, const char *, double *);
2089 : int CPL_DLL CPL_STDCALL GDALWriteWorldFile(const char *, const char *,
2090 : double *);
2091 : int CPL_DLL CPL_STDCALL GDALLoadTabFile(const char *, double *, char **, int *,
2092 : GDAL_GCP **);
2093 : int CPL_DLL CPL_STDCALL GDALReadTabFile(const char *, double *, char **, int *,
2094 : GDAL_GCP **);
2095 : int CPL_DLL CPL_STDCALL GDALLoadOziMapFile(const char *, double *, char **,
2096 : int *, GDAL_GCP **);
2097 : int CPL_DLL CPL_STDCALL GDALReadOziMapFile(const char *, double *, char **,
2098 : int *, GDAL_GCP **);
2099 :
2100 : const char CPL_DLL *CPL_STDCALL GDALDecToDMS(double, const char *, int);
2101 : double CPL_DLL CPL_STDCALL GDALPackedDMSToDec(double);
2102 : double CPL_DLL CPL_STDCALL GDALDecToPackedDMS(double);
2103 :
2104 : /* Note to developers : please keep this section in sync with ogr_core.h */
2105 :
2106 : #ifndef GDAL_VERSION_INFO_DEFINED
2107 : #ifndef DOXYGEN_SKIP
2108 : #define GDAL_VERSION_INFO_DEFINED
2109 : #endif
2110 : const char CPL_DLL *CPL_STDCALL GDALVersionInfo(const char *);
2111 : #endif
2112 :
2113 : #ifndef GDAL_CHECK_VERSION
2114 :
2115 : int CPL_DLL CPL_STDCALL GDALCheckVersion(int nVersionMajor, int nVersionMinor,
2116 : const char *pszCallingComponentName);
2117 :
2118 : /** Helper macro for GDALCheckVersion()
2119 : @see GDALCheckVersion()
2120 : */
2121 : #define GDAL_CHECK_VERSION(pszCallingComponentName) \
2122 : GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, \
2123 : pszCallingComponentName)
2124 :
2125 : #endif
2126 :
2127 : /*! @cond Doxygen_Suppress */
2128 : #ifdef GDAL_COMPILATION
2129 : #define GDALExtractRPCInfoV1 GDALExtractRPCInfo
2130 : #else
2131 : #define GDALRPCInfo GDALRPCInfoV2
2132 : #define GDALExtractRPCInfo GDALExtractRPCInfoV2
2133 : #endif
2134 :
2135 : /* Deprecated: use GDALRPCInfoV2 */
2136 : typedef struct
2137 : {
2138 : double dfLINE_OFF; /*!< Line offset */
2139 : double dfSAMP_OFF; /*!< Sample/Pixel offset */
2140 : double dfLAT_OFF; /*!< Latitude offset */
2141 : double dfLONG_OFF; /*!< Longitude offset */
2142 : double dfHEIGHT_OFF; /*!< Height offset */
2143 :
2144 : double dfLINE_SCALE; /*!< Line scale */
2145 : double dfSAMP_SCALE; /*!< Sample/Pixel scale */
2146 : double dfLAT_SCALE; /*!< Latitude scale */
2147 : double dfLONG_SCALE; /*!< Longitude scale */
2148 : double dfHEIGHT_SCALE; /*!< Height scale */
2149 :
2150 : double adfLINE_NUM_COEFF[20]; /*!< Line Numerator Coefficients */
2151 : double adfLINE_DEN_COEFF[20]; /*!< Line Denominator Coefficients */
2152 : double adfSAMP_NUM_COEFF[20]; /*!< Sample/Pixel Numerator Coefficients */
2153 : double adfSAMP_DEN_COEFF[20]; /*!< Sample/Pixel Denominator Coefficients */
2154 :
2155 : double dfMIN_LONG; /*!< Minimum longitude */
2156 : double dfMIN_LAT; /*!< Minimum latitude */
2157 : double dfMAX_LONG; /*!< Maximum longitude */
2158 : double dfMAX_LAT; /*!< Maximum latitude */
2159 : } GDALRPCInfoV1;
2160 :
2161 : /*! @endcond */
2162 :
2163 : /** Structure to store Rational Polynomial Coefficients / Rigorous Projection
2164 : * Model. See http://geotiff.maptools.org/rpc_prop.html */
2165 : typedef struct
2166 : {
2167 : double dfLINE_OFF; /*!< Line offset */
2168 : double dfSAMP_OFF; /*!< Sample/Pixel offset */
2169 : double dfLAT_OFF; /*!< Latitude offset */
2170 : double dfLONG_OFF; /*!< Longitude offset */
2171 : double dfHEIGHT_OFF; /*!< Height offset */
2172 :
2173 : double dfLINE_SCALE; /*!< Line scale */
2174 : double dfSAMP_SCALE; /*!< Sample/Pixel scale */
2175 : double dfLAT_SCALE; /*!< Latitude scale */
2176 : double dfLONG_SCALE; /*!< Longitude scale */
2177 : double dfHEIGHT_SCALE; /*!< Height scale */
2178 :
2179 : double adfLINE_NUM_COEFF[20]; /*!< Line Numerator Coefficients */
2180 : double adfLINE_DEN_COEFF[20]; /*!< Line Denominator Coefficients */
2181 : double adfSAMP_NUM_COEFF[20]; /*!< Sample/Pixel Numerator Coefficients */
2182 : double adfSAMP_DEN_COEFF[20]; /*!< Sample/Pixel Denominator Coefficients */
2183 :
2184 : double dfMIN_LONG; /*!< Minimum longitude */
2185 : double dfMIN_LAT; /*!< Minimum latitude */
2186 : double dfMAX_LONG; /*!< Maximum longitude */
2187 : double dfMAX_LAT; /*!< Maximum latitude */
2188 :
2189 : /* Those fields should be at the end. And all above fields should be the
2190 : * same as in GDALRPCInfoV1 */
2191 : double dfERR_BIAS; /*!< Bias error */
2192 : double dfERR_RAND; /*!< Random error */
2193 : } GDALRPCInfoV2;
2194 :
2195 : /*! @cond Doxygen_Suppress */
2196 : int CPL_DLL CPL_STDCALL GDALExtractRPCInfoV1(CSLConstList, GDALRPCInfoV1 *);
2197 : /*! @endcond */
2198 : int CPL_DLL CPL_STDCALL GDALExtractRPCInfoV2(CSLConstList, GDALRPCInfoV2 *);
2199 :
2200 : /* ==================================================================== */
2201 : /* Color tables. */
2202 : /* ==================================================================== */
2203 :
2204 : /** Color tuple */
2205 : typedef struct
2206 : {
2207 : /*! gray, red, cyan or hue */
2208 : short c1;
2209 :
2210 : /*! green, magenta, or lightness */
2211 : short c2;
2212 :
2213 : /*! blue, yellow, or saturation */
2214 : short c3;
2215 :
2216 : /*! alpha or blackband */
2217 : short c4;
2218 : } GDALColorEntry;
2219 :
2220 : GDALColorTableH CPL_DLL CPL_STDCALL GDALCreateColorTable(GDALPaletteInterp)
2221 : CPL_WARN_UNUSED_RESULT;
2222 : void CPL_DLL CPL_STDCALL GDALDestroyColorTable(GDALColorTableH);
2223 : GDALColorTableH CPL_DLL CPL_STDCALL GDALCloneColorTable(GDALColorTableH);
2224 : GDALPaletteInterp
2225 : CPL_DLL CPL_STDCALL GDALGetPaletteInterpretation(GDALColorTableH);
2226 : int CPL_DLL CPL_STDCALL GDALGetColorEntryCount(GDALColorTableH);
2227 : const GDALColorEntry CPL_DLL *CPL_STDCALL GDALGetColorEntry(GDALColorTableH,
2228 : int);
2229 : int CPL_DLL CPL_STDCALL GDALGetColorEntryAsRGB(GDALColorTableH, int,
2230 : GDALColorEntry *);
2231 : void CPL_DLL CPL_STDCALL GDALSetColorEntry(GDALColorTableH, int,
2232 : const GDALColorEntry *);
2233 : void CPL_DLL CPL_STDCALL GDALCreateColorRamp(GDALColorTableH hTable,
2234 : int nStartIndex,
2235 : const GDALColorEntry *psStartColor,
2236 : int nEndIndex,
2237 : const GDALColorEntry *psEndColor);
2238 :
2239 : /* ==================================================================== */
2240 : /* Raster Attribute Table */
2241 : /* ==================================================================== */
2242 :
2243 : /** Field type of raster attribute table */
2244 : typedef enum
2245 : {
2246 : /*! Integer field */ GFT_Integer,
2247 : /*! Floating point (double) field */ GFT_Real,
2248 : /*! String field */ GFT_String,
2249 : /*! Boolean field (GDAL >= 3.12) */ GFT_Boolean,
2250 : /*! DateTime field (GDAL >= 3.12) */ GFT_DateTime,
2251 : /*! Geometry field, as WKB (GDAL >= 3.12) */ GFT_WKBGeometry
2252 : } GDALRATFieldType;
2253 :
2254 : /** First invalid value for the GDALRATFieldType enumeration */
2255 : #define GFT_MaxCount (GFT_WKBGeometry + 1)
2256 :
2257 : /** Field usage of raster attribute table */
2258 : typedef enum
2259 : {
2260 : /*! General purpose field. */ GFU_Generic = 0,
2261 : /*! Histogram pixel count */ GFU_PixelCount = 1,
2262 : /*! Class name */ GFU_Name = 2,
2263 : /*! Class range minimum */ GFU_Min = 3,
2264 : /*! Class range maximum */ GFU_Max = 4,
2265 : /*! Class value (min=max) */ GFU_MinMax = 5,
2266 : /*! Red class color (0-255) */ GFU_Red = 6,
2267 : /*! Green class color (0-255) */ GFU_Green = 7,
2268 : /*! Blue class color (0-255) */ GFU_Blue = 8,
2269 : /*! Alpha (0=transparent,255=opaque)*/ GFU_Alpha = 9,
2270 : /*! Color Range Red Minimum */ GFU_RedMin = 10,
2271 : /*! Color Range Green Minimum */ GFU_GreenMin = 11,
2272 : /*! Color Range Blue Minimum */ GFU_BlueMin = 12,
2273 : /*! Color Range Alpha Minimum */ GFU_AlphaMin = 13,
2274 : /*! Color Range Red Maximum */ GFU_RedMax = 14,
2275 : /*! Color Range Green Maximum */ GFU_GreenMax = 15,
2276 : /*! Color Range Blue Maximum */ GFU_BlueMax = 16,
2277 : /*! Color Range Alpha Maximum */ GFU_AlphaMax = 17,
2278 : /*! Maximum GFU value (equals to GFU_AlphaMax+1 currently) */ GFU_MaxCount
2279 : } GDALRATFieldUsage;
2280 :
2281 : /** RAT table type (thematic or athematic)
2282 : */
2283 : typedef enum
2284 : {
2285 : /*! Thematic table type */ GRTT_THEMATIC,
2286 : /*! Athematic table type */ GRTT_ATHEMATIC
2287 : } GDALRATTableType;
2288 :
2289 : GDALRasterAttributeTableH CPL_DLL CPL_STDCALL
2290 : GDALCreateRasterAttributeTable(void) CPL_WARN_UNUSED_RESULT;
2291 :
2292 : void CPL_DLL CPL_STDCALL
2293 : GDALDestroyRasterAttributeTable(GDALRasterAttributeTableH);
2294 :
2295 : int CPL_DLL CPL_STDCALL GDALRATGetColumnCount(GDALRasterAttributeTableH);
2296 :
2297 : const char CPL_DLL *CPL_STDCALL GDALRATGetNameOfCol(GDALRasterAttributeTableH,
2298 : int);
2299 : GDALRATFieldUsage CPL_DLL CPL_STDCALL
2300 : GDALRATGetUsageOfCol(GDALRasterAttributeTableH, int);
2301 : GDALRATFieldType CPL_DLL CPL_STDCALL
2302 : GDALRATGetTypeOfCol(GDALRasterAttributeTableH, int);
2303 :
2304 : const char CPL_DLL *GDALGetRATFieldTypeName(GDALRATFieldType);
2305 : const char CPL_DLL *GDALGetRATFieldUsageName(GDALRATFieldUsage);
2306 :
2307 : int CPL_DLL CPL_STDCALL GDALRATGetColOfUsage(GDALRasterAttributeTableH,
2308 : GDALRATFieldUsage);
2309 : int CPL_DLL CPL_STDCALL GDALRATGetRowCount(GDALRasterAttributeTableH);
2310 :
2311 : const char CPL_DLL *CPL_STDCALL
2312 : GDALRATGetValueAsString(GDALRasterAttributeTableH, int iRow, int iField);
2313 : int CPL_DLL CPL_STDCALL GDALRATGetValueAsInt(GDALRasterAttributeTableH,
2314 : int iRow, int iField);
2315 : double CPL_DLL CPL_STDCALL GDALRATGetValueAsDouble(GDALRasterAttributeTableH,
2316 : int iRow, int iField);
2317 : bool CPL_DLL GDALRATGetValueAsBoolean(GDALRasterAttributeTableH, int iRow,
2318 : int iField);
2319 :
2320 : #ifdef __cplusplus
2321 : extern "C++"
2322 : {
2323 : #endif
2324 :
2325 : /** Structure encoding a DateTime field for a GDAL Raster Attribute Table.
2326 : *
2327 : * @since 3.12
2328 : */
2329 : struct GDALRATDateTime
2330 : {
2331 : /*! Year */ int nYear;
2332 : /*! Month [1, 12] */ int nMonth;
2333 : /*! Day [1, 31] */ int nDay;
2334 : /*! Hour [0, 23] */ int nHour;
2335 : /*! Minute [0, 59] */ int nMinute;
2336 : /*! Second [0, 61) */ float fSecond;
2337 : /*! Time zone hour [0, 23] */ int nTimeZoneHour;
2338 : /*! Time zone minute: 0, 15, 30, 45 */ int nTimeZoneMinute;
2339 : /*! Whether time zone is positive (or null) */ bool bPositiveTimeZone;
2340 : /*! Whether this object is valid */ bool bIsValid;
2341 :
2342 : #ifdef __cplusplus
2343 137 : GDALRATDateTime()
2344 137 : : nYear(0), nMonth(0), nDay(0), nHour(0), nMinute(0), fSecond(0),
2345 : nTimeZoneHour(0), nTimeZoneMinute(0), bPositiveTimeZone(false),
2346 137 : bIsValid(false)
2347 : {
2348 69 : }
2349 : #endif
2350 : };
2351 :
2352 : #ifdef __cplusplus
2353 : }
2354 : #endif
2355 :
2356 : /*! @cond Doxygen_Suppress */
2357 : typedef struct GDALRATDateTime GDALRATDateTime;
2358 : /*! @endcond */
2359 :
2360 : CPLErr CPL_DLL GDALRATGetValueAsDateTime(GDALRasterAttributeTableH, int iRow,
2361 : int iField,
2362 : GDALRATDateTime *psDateTime);
2363 : const GByte CPL_DLL *GDALRATGetValueAsWKBGeometry(GDALRasterAttributeTableH,
2364 : int iRow, int iField,
2365 : size_t *pnWKBSize);
2366 :
2367 : void CPL_DLL CPL_STDCALL GDALRATSetValueAsString(GDALRasterAttributeTableH,
2368 : int iRow, int iField,
2369 : const char *);
2370 : void CPL_DLL CPL_STDCALL GDALRATSetValueAsInt(GDALRasterAttributeTableH,
2371 : int iRow, int iField, int);
2372 : void CPL_DLL CPL_STDCALL GDALRATSetValueAsDouble(GDALRasterAttributeTableH,
2373 : int iRow, int iField, double);
2374 : CPLErr CPL_DLL GDALRATSetValueAsBoolean(GDALRasterAttributeTableH, int iRow,
2375 : int iField, bool);
2376 : CPLErr CPL_DLL GDALRATSetValueAsDateTime(GDALRasterAttributeTableH, int iRow,
2377 : int iField,
2378 : const GDALRATDateTime *psDateTime);
2379 : CPLErr CPL_DLL GDALRATSetValueAsWKBGeometry(GDALRasterAttributeTableH, int iRow,
2380 : int iField, const void *pabyWKB,
2381 : size_t nWKBSize);
2382 :
2383 : int CPL_DLL CPL_STDCALL
2384 : GDALRATChangesAreWrittenToFile(GDALRasterAttributeTableH hRAT);
2385 :
2386 : CPLErr CPL_DLL CPL_STDCALL GDALRATValuesIOAsDouble(
2387 : GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag, int iField,
2388 : int iStartRow, int iLength, double *pdfData);
2389 : CPLErr CPL_DLL CPL_STDCALL
2390 : GDALRATValuesIOAsInteger(GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag,
2391 : int iField, int iStartRow, int iLength, int *pnData);
2392 : CPLErr CPL_DLL CPL_STDCALL GDALRATValuesIOAsString(
2393 : GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag, int iField,
2394 : int iStartRow, int iLength, char **papszStrList);
2395 : CPLErr CPL_DLL GDALRATValuesIOAsBoolean(GDALRasterAttributeTableH hRAT,
2396 : GDALRWFlag eRWFlag, int iField,
2397 : int iStartRow, int iLength,
2398 : bool *pbData);
2399 : CPLErr CPL_DLL GDALRATValuesIOAsDateTime(GDALRasterAttributeTableH hRAT,
2400 : GDALRWFlag eRWFlag, int iField,
2401 : int iStartRow, int iLength,
2402 : GDALRATDateTime *pasDateTime);
2403 : CPLErr CPL_DLL GDALRATValuesIOAsWKBGeometry(GDALRasterAttributeTableH hRAT,
2404 : GDALRWFlag eRWFlag, int iField,
2405 : int iStartRow, int iLength,
2406 : GByte **ppabyWKB,
2407 : size_t *pnWKBSize);
2408 :
2409 : void CPL_DLL CPL_STDCALL GDALRATSetRowCount(GDALRasterAttributeTableH, int);
2410 : CPLErr CPL_DLL CPL_STDCALL GDALRATCreateColumn(GDALRasterAttributeTableH,
2411 : const char *, GDALRATFieldType,
2412 : GDALRATFieldUsage);
2413 : CPLErr CPL_DLL CPL_STDCALL GDALRATSetLinearBinning(GDALRasterAttributeTableH,
2414 : double, double);
2415 : int CPL_DLL CPL_STDCALL GDALRATGetLinearBinning(GDALRasterAttributeTableH,
2416 : double *, double *);
2417 : CPLErr CPL_DLL CPL_STDCALL GDALRATSetTableType(
2418 : GDALRasterAttributeTableH hRAT, const GDALRATTableType eInTableType);
2419 : GDALRATTableType CPL_DLL CPL_STDCALL
2420 : GDALRATGetTableType(GDALRasterAttributeTableH hRAT);
2421 : CPLErr CPL_DLL CPL_STDCALL
2422 : GDALRATInitializeFromColorTable(GDALRasterAttributeTableH, GDALColorTableH);
2423 : GDALColorTableH CPL_DLL CPL_STDCALL
2424 : GDALRATTranslateToColorTable(GDALRasterAttributeTableH, int nEntryCount);
2425 : void CPL_DLL CPL_STDCALL GDALRATDumpReadable(GDALRasterAttributeTableH, FILE *);
2426 : GDALRasterAttributeTableH CPL_DLL CPL_STDCALL
2427 : GDALRATClone(const GDALRasterAttributeTableH);
2428 :
2429 : void CPL_DLL *CPL_STDCALL GDALRATSerializeJSON(GDALRasterAttributeTableH)
2430 : CPL_WARN_UNUSED_RESULT;
2431 :
2432 : int CPL_DLL CPL_STDCALL GDALRATGetRowOfValue(GDALRasterAttributeTableH, double);
2433 : void CPL_DLL CPL_STDCALL GDALRATRemoveStatistics(GDALRasterAttributeTableH);
2434 :
2435 : /* -------------------------------------------------------------------- */
2436 : /* Relationships */
2437 : /* -------------------------------------------------------------------- */
2438 :
2439 : /** Cardinality of relationship.
2440 : *
2441 : * @since GDAL 3.6
2442 : */
2443 : typedef enum
2444 : {
2445 : /** One-to-one */
2446 : GRC_ONE_TO_ONE,
2447 : /** One-to-many */
2448 : GRC_ONE_TO_MANY,
2449 : /** Many-to-one */
2450 : GRC_MANY_TO_ONE,
2451 : /** Many-to-many */
2452 : GRC_MANY_TO_MANY,
2453 : } GDALRelationshipCardinality;
2454 :
2455 : /** Type of relationship.
2456 : *
2457 : * @since GDAL 3.6
2458 : */
2459 : typedef enum
2460 : {
2461 : /** Composite relationship */
2462 : GRT_COMPOSITE,
2463 : /** Association relationship */
2464 : GRT_ASSOCIATION,
2465 : /** Aggregation relationship */
2466 : GRT_AGGREGATION,
2467 : } GDALRelationshipType;
2468 :
2469 : GDALRelationshipH CPL_DLL GDALRelationshipCreate(const char *, const char *,
2470 : const char *,
2471 : GDALRelationshipCardinality);
2472 : void CPL_DLL CPL_STDCALL GDALDestroyRelationship(GDALRelationshipH);
2473 : const char CPL_DLL *GDALRelationshipGetName(GDALRelationshipH);
2474 : GDALRelationshipCardinality
2475 : CPL_DLL GDALRelationshipGetCardinality(GDALRelationshipH);
2476 : const char CPL_DLL *GDALRelationshipGetLeftTableName(GDALRelationshipH);
2477 : const char CPL_DLL *GDALRelationshipGetRightTableName(GDALRelationshipH);
2478 : const char CPL_DLL *GDALRelationshipGetMappingTableName(GDALRelationshipH);
2479 : void CPL_DLL GDALRelationshipSetMappingTableName(GDALRelationshipH,
2480 : const char *);
2481 : char CPL_DLL **GDALRelationshipGetLeftTableFields(GDALRelationshipH);
2482 : char CPL_DLL **GDALRelationshipGetRightTableFields(GDALRelationshipH);
2483 : void CPL_DLL GDALRelationshipSetLeftTableFields(GDALRelationshipH,
2484 : CSLConstList);
2485 : void CPL_DLL GDALRelationshipSetRightTableFields(GDALRelationshipH,
2486 : CSLConstList);
2487 : char CPL_DLL **GDALRelationshipGetLeftMappingTableFields(GDALRelationshipH);
2488 : char CPL_DLL **GDALRelationshipGetRightMappingTableFields(GDALRelationshipH);
2489 : void CPL_DLL GDALRelationshipSetLeftMappingTableFields(GDALRelationshipH,
2490 : CSLConstList);
2491 : void CPL_DLL GDALRelationshipSetRightMappingTableFields(GDALRelationshipH,
2492 : CSLConstList);
2493 : GDALRelationshipType CPL_DLL GDALRelationshipGetType(GDALRelationshipH);
2494 : void CPL_DLL GDALRelationshipSetType(GDALRelationshipH, GDALRelationshipType);
2495 : const char CPL_DLL *GDALRelationshipGetForwardPathLabel(GDALRelationshipH);
2496 : void CPL_DLL GDALRelationshipSetForwardPathLabel(GDALRelationshipH,
2497 : const char *);
2498 : const char CPL_DLL *GDALRelationshipGetBackwardPathLabel(GDALRelationshipH);
2499 : void CPL_DLL GDALRelationshipSetBackwardPathLabel(GDALRelationshipH,
2500 : const char *);
2501 : const char CPL_DLL *GDALRelationshipGetRelatedTableType(GDALRelationshipH);
2502 : void CPL_DLL GDALRelationshipSetRelatedTableType(GDALRelationshipH,
2503 : const char *);
2504 :
2505 : /* ==================================================================== */
2506 : /* GDAL Cache Management */
2507 : /* ==================================================================== */
2508 :
2509 : void CPL_DLL CPL_STDCALL GDALSetCacheMax(int nBytes);
2510 : int CPL_DLL CPL_STDCALL GDALGetCacheMax(void);
2511 : int CPL_DLL CPL_STDCALL GDALGetCacheUsed(void);
2512 : void CPL_DLL CPL_STDCALL GDALSetCacheMax64(GIntBig nBytes);
2513 : GIntBig CPL_DLL CPL_STDCALL GDALGetCacheMax64(void);
2514 : GIntBig CPL_DLL CPL_STDCALL GDALGetCacheUsed64(void);
2515 :
2516 : int CPL_DLL CPL_STDCALL GDALFlushCacheBlock(void);
2517 :
2518 : /* ==================================================================== */
2519 : /* GDAL virtual memory */
2520 : /* ==================================================================== */
2521 :
2522 : CPLVirtualMem CPL_DLL *GDALDatasetGetVirtualMem(
2523 : GDALDatasetH hDS, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize,
2524 : int nYSize, int nBufXSize, int nBufYSize, GDALDataType eBufType,
2525 : int nBandCount, int *panBandMap, int nPixelSpace, GIntBig nLineSpace,
2526 : GIntBig nBandSpace, size_t nCacheSize, size_t nPageSizeHint,
2527 : int bSingleThreadUsage, CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2528 :
2529 : CPLVirtualMem CPL_DLL *GDALRasterBandGetVirtualMem(
2530 : GDALRasterBandH hBand, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize,
2531 : int nYSize, int nBufXSize, int nBufYSize, GDALDataType eBufType,
2532 : int nPixelSpace, GIntBig nLineSpace, size_t nCacheSize,
2533 : size_t nPageSizeHint, int bSingleThreadUsage,
2534 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2535 :
2536 : CPLVirtualMem CPL_DLL *
2537 : GDALGetVirtualMemAuto(GDALRasterBandH hBand, GDALRWFlag eRWFlag,
2538 : int *pnPixelSpace, GIntBig *pnLineSpace,
2539 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2540 :
2541 : /**! Enumeration to describe the tile organization */
2542 : typedef enum
2543 : {
2544 : /*! Tile Interleaved by Pixel: tile (0,0) with internal band interleaved by
2545 : pixel organization, tile (1, 0), ... */
2546 : GTO_TIP,
2547 : /*! Band Interleaved by Tile : tile (0,0) of first band, tile (0,0) of
2548 : second band, ... tile (1,0) of first band, tile (1,0) of second band, ...
2549 : */
2550 : GTO_BIT,
2551 : /*! Band SeQuential : all the tiles of first band, all the tiles of
2552 : following band... */
2553 : GTO_BSQ
2554 : } GDALTileOrganization;
2555 :
2556 : CPLVirtualMem CPL_DLL *GDALDatasetGetTiledVirtualMem(
2557 : GDALDatasetH hDS, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize,
2558 : int nYSize, int nTileXSize, int nTileYSize, GDALDataType eBufType,
2559 : int nBandCount, int *panBandMap, GDALTileOrganization eTileOrganization,
2560 : size_t nCacheSize, int bSingleThreadUsage,
2561 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2562 :
2563 : CPLVirtualMem CPL_DLL *GDALRasterBandGetTiledVirtualMem(
2564 : GDALRasterBandH hBand, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize,
2565 : int nYSize, int nTileXSize, int nTileYSize, GDALDataType eBufType,
2566 : size_t nCacheSize, int bSingleThreadUsage,
2567 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2568 :
2569 : /* ==================================================================== */
2570 : /* VRTPansharpenedDataset class. */
2571 : /* ==================================================================== */
2572 :
2573 : GDALDatasetH CPL_DLL GDALCreatePansharpenedVRT(
2574 : const char *pszXML, GDALRasterBandH hPanchroBand, int nInputSpectralBands,
2575 : GDALRasterBandH *pahInputSpectralBands) CPL_WARN_UNUSED_RESULT;
2576 :
2577 : /* =================================================================== */
2578 : /* Misc API */
2579 : /* ==================================================================== */
2580 :
2581 : CPLXMLNode CPL_DLL *
2582 : GDALGetJPEG2000Structure(const char *pszFilename,
2583 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2584 :
2585 : /* ==================================================================== */
2586 : /* Multidimensional API_api */
2587 : /* ==================================================================== */
2588 :
2589 : GDALDatasetH CPL_DLL
2590 : GDALCreateMultiDimensional(GDALDriverH hDriver, const char *pszName,
2591 : CSLConstList papszRootGroupOptions,
2592 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2593 :
2594 : GDALExtendedDataTypeH CPL_DLL GDALExtendedDataTypeCreate(GDALDataType eType)
2595 : CPL_WARN_UNUSED_RESULT;
2596 : GDALExtendedDataTypeH CPL_DLL GDALExtendedDataTypeCreateString(
2597 : size_t nMaxStringLength) CPL_WARN_UNUSED_RESULT;
2598 : GDALExtendedDataTypeH CPL_DLL GDALExtendedDataTypeCreateStringEx(
2599 : size_t nMaxStringLength,
2600 : GDALExtendedDataTypeSubType eSubType) CPL_WARN_UNUSED_RESULT;
2601 : GDALExtendedDataTypeH CPL_DLL GDALExtendedDataTypeCreateCompound(
2602 : const char *pszName, size_t nTotalSize, size_t nComponents,
2603 : const GDALEDTComponentH *comps) CPL_WARN_UNUSED_RESULT;
2604 : void CPL_DLL GDALExtendedDataTypeRelease(GDALExtendedDataTypeH hEDT);
2605 : const char CPL_DLL *GDALExtendedDataTypeGetName(GDALExtendedDataTypeH hEDT);
2606 : GDALExtendedDataTypeClass CPL_DLL
2607 : GDALExtendedDataTypeGetClass(GDALExtendedDataTypeH hEDT);
2608 : GDALDataType CPL_DLL
2609 : GDALExtendedDataTypeGetNumericDataType(GDALExtendedDataTypeH hEDT);
2610 : size_t CPL_DLL GDALExtendedDataTypeGetSize(GDALExtendedDataTypeH hEDT);
2611 : size_t CPL_DLL
2612 : GDALExtendedDataTypeGetMaxStringLength(GDALExtendedDataTypeH hEDT);
2613 : GDALEDTComponentH CPL_DLL *
2614 : GDALExtendedDataTypeGetComponents(GDALExtendedDataTypeH hEDT,
2615 : size_t *pnCount) CPL_WARN_UNUSED_RESULT;
2616 : void CPL_DLL GDALExtendedDataTypeFreeComponents(GDALEDTComponentH *components,
2617 : size_t nCount);
2618 : int CPL_DLL GDALExtendedDataTypeCanConvertTo(GDALExtendedDataTypeH hSourceEDT,
2619 : GDALExtendedDataTypeH hTargetEDT);
2620 : int CPL_DLL GDALExtendedDataTypeEquals(GDALExtendedDataTypeH hFirstEDT,
2621 : GDALExtendedDataTypeH hSecondEDT);
2622 : GDALExtendedDataTypeSubType CPL_DLL
2623 : GDALExtendedDataTypeGetSubType(GDALExtendedDataTypeH hEDT);
2624 : GDALRasterAttributeTableH CPL_DLL
2625 : GDALExtendedDataTypeGetRAT(GDALExtendedDataTypeH hEDT) CPL_WARN_UNUSED_RESULT;
2626 :
2627 : GDALEDTComponentH CPL_DLL
2628 : GDALEDTComponentCreate(const char *pszName, size_t nOffset,
2629 : GDALExtendedDataTypeH hType) CPL_WARN_UNUSED_RESULT;
2630 : void CPL_DLL GDALEDTComponentRelease(GDALEDTComponentH hComp);
2631 : const char CPL_DLL *GDALEDTComponentGetName(GDALEDTComponentH hComp);
2632 : size_t CPL_DLL GDALEDTComponentGetOffset(GDALEDTComponentH hComp);
2633 : GDALExtendedDataTypeH CPL_DLL GDALEDTComponentGetType(GDALEDTComponentH hComp)
2634 : CPL_WARN_UNUSED_RESULT;
2635 :
2636 : GDALGroupH CPL_DLL GDALDatasetGetRootGroup(GDALDatasetH hDS)
2637 : CPL_WARN_UNUSED_RESULT;
2638 : void CPL_DLL GDALGroupRelease(GDALGroupH hGroup);
2639 : const char CPL_DLL *GDALGroupGetName(GDALGroupH hGroup);
2640 : const char CPL_DLL *GDALGroupGetFullName(GDALGroupH hGroup);
2641 : char CPL_DLL **
2642 : GDALGroupGetMDArrayNames(GDALGroupH hGroup,
2643 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2644 : char CPL_DLL **GDALGroupGetMDArrayFullNamesRecursive(
2645 : GDALGroupH hGroup, CSLConstList papszGroupOptions,
2646 : CSLConstList papszArrayOptions) CPL_WARN_UNUSED_RESULT;
2647 : GDALMDArrayH CPL_DLL
2648 : GDALGroupOpenMDArray(GDALGroupH hGroup, const char *pszMDArrayName,
2649 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2650 : GDALMDArrayH CPL_DLL GDALGroupOpenMDArrayFromFullname(
2651 : GDALGroupH hGroup, const char *pszMDArrayName,
2652 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2653 : GDALMDArrayH CPL_DLL GDALGroupResolveMDArray(
2654 : GDALGroupH hGroup, const char *pszName, const char *pszStartingPoint,
2655 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2656 : char CPL_DLL **
2657 : GDALGroupGetGroupNames(GDALGroupH hGroup,
2658 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2659 : GDALGroupH CPL_DLL
2660 : GDALGroupOpenGroup(GDALGroupH hGroup, const char *pszSubGroupName,
2661 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2662 : GDALGroupH CPL_DLL GDALGroupOpenGroupFromFullname(
2663 : GDALGroupH hGroup, const char *pszMDArrayName,
2664 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2665 : char CPL_DLL **
2666 : GDALGroupGetVectorLayerNames(GDALGroupH hGroup,
2667 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2668 : OGRLayerH CPL_DLL
2669 : GDALGroupOpenVectorLayer(GDALGroupH hGroup, const char *pszVectorLayerName,
2670 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2671 : GDALDimensionH CPL_DLL *
2672 : GDALGroupGetDimensions(GDALGroupH hGroup, size_t *pnCount,
2673 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2674 : GDALAttributeH CPL_DLL GDALGroupGetAttribute(
2675 : GDALGroupH hGroup, const char *pszName) CPL_WARN_UNUSED_RESULT;
2676 : GDALAttributeH CPL_DLL *
2677 : GDALGroupGetAttributes(GDALGroupH hGroup, size_t *pnCount,
2678 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2679 : CSLConstList CPL_DLL GDALGroupGetStructuralInfo(GDALGroupH hGroup);
2680 : GDALGroupH CPL_DLL
2681 : GDALGroupCreateGroup(GDALGroupH hGroup, const char *pszSubGroupName,
2682 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2683 : bool CPL_DLL GDALGroupDeleteGroup(GDALGroupH hGroup, const char *pszName,
2684 : CSLConstList papszOptions);
2685 : GDALDimensionH CPL_DLL GDALGroupCreateDimension(
2686 : GDALGroupH hGroup, const char *pszName, const char *pszType,
2687 : const char *pszDirection, GUInt64 nSize,
2688 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2689 : GDALMDArrayH CPL_DLL GDALGroupCreateMDArray(
2690 : GDALGroupH hGroup, const char *pszName, size_t nDimensions,
2691 : GDALDimensionH *pahDimensions, GDALExtendedDataTypeH hEDT,
2692 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2693 : bool CPL_DLL GDALGroupDeleteMDArray(GDALGroupH hGroup, const char *pszName,
2694 : CSLConstList papszOptions);
2695 : GDALAttributeH CPL_DLL GDALGroupCreateAttribute(
2696 : GDALGroupH hGroup, const char *pszName, size_t nDimensions,
2697 : const GUInt64 *panDimensions, GDALExtendedDataTypeH hEDT,
2698 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2699 : bool CPL_DLL GDALGroupDeleteAttribute(GDALGroupH hGroup, const char *pszName,
2700 : CSLConstList papszOptions);
2701 : bool CPL_DLL GDALGroupRename(GDALGroupH hGroup, const char *pszNewName);
2702 : GDALGroupH CPL_DLL GDALGroupSubsetDimensionFromSelection(
2703 : GDALGroupH hGroup, const char *pszSelection, CSLConstList papszOptions);
2704 : size_t CPL_DLL GDALGroupGetDataTypeCount(GDALGroupH hGroup);
2705 : GDALExtendedDataTypeH CPL_DLL GDALGroupGetDataType(GDALGroupH hGroup,
2706 : size_t nIdx);
2707 :
2708 : void CPL_DLL GDALMDArrayRelease(GDALMDArrayH hMDArray);
2709 : const char CPL_DLL *GDALMDArrayGetName(GDALMDArrayH hArray);
2710 : const char CPL_DLL *GDALMDArrayGetFullName(GDALMDArrayH hArray);
2711 : GUInt64 CPL_DLL GDALMDArrayGetTotalElementsCount(GDALMDArrayH hArray);
2712 : size_t CPL_DLL GDALMDArrayGetDimensionCount(GDALMDArrayH hArray);
2713 : GDALDimensionH CPL_DLL *
2714 : GDALMDArrayGetDimensions(GDALMDArrayH hArray,
2715 : size_t *pnCount) CPL_WARN_UNUSED_RESULT;
2716 : GDALExtendedDataTypeH CPL_DLL GDALMDArrayGetDataType(GDALMDArrayH hArray)
2717 : CPL_WARN_UNUSED_RESULT;
2718 : int CPL_DLL GDALMDArrayRead(GDALMDArrayH hArray, const GUInt64 *arrayStartIdx,
2719 : const size_t *count, const GInt64 *arrayStep,
2720 : const GPtrDiff_t *bufferStride,
2721 : GDALExtendedDataTypeH bufferDatatype,
2722 : void *pDstBuffer, const void *pDstBufferAllocStart,
2723 : size_t nDstBufferllocSize);
2724 : int CPL_DLL GDALMDArrayWrite(GDALMDArrayH hArray, const GUInt64 *arrayStartIdx,
2725 : const size_t *count, const GInt64 *arrayStep,
2726 : const GPtrDiff_t *bufferStride,
2727 : GDALExtendedDataTypeH bufferDatatype,
2728 : const void *pSrcBuffer,
2729 : const void *psrcBufferAllocStart,
2730 : size_t nSrcBufferllocSize);
2731 : int CPL_DLL GDALMDArrayAdviseRead(GDALMDArrayH hArray,
2732 : const GUInt64 *arrayStartIdx,
2733 : const size_t *count);
2734 : int CPL_DLL GDALMDArrayAdviseReadEx(GDALMDArrayH hArray,
2735 : const GUInt64 *arrayStartIdx,
2736 : const size_t *count,
2737 : CSLConstList papszOptions);
2738 : GDALAttributeH CPL_DLL GDALMDArrayGetAttribute(
2739 : GDALMDArrayH hArray, const char *pszName) CPL_WARN_UNUSED_RESULT;
2740 : GDALAttributeH CPL_DLL *
2741 : GDALMDArrayGetAttributes(GDALMDArrayH hArray, size_t *pnCount,
2742 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2743 : GDALAttributeH CPL_DLL GDALMDArrayCreateAttribute(
2744 : GDALMDArrayH hArray, const char *pszName, size_t nDimensions,
2745 : const GUInt64 *panDimensions, GDALExtendedDataTypeH hEDT,
2746 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2747 : bool CPL_DLL GDALMDArrayDeleteAttribute(GDALMDArrayH hArray,
2748 : const char *pszName,
2749 : CSLConstList papszOptions);
2750 : bool CPL_DLL GDALMDArrayResize(GDALMDArrayH hArray,
2751 : const GUInt64 *panNewDimSizes,
2752 : CSLConstList papszOptions);
2753 : const void CPL_DLL *GDALMDArrayGetRawNoDataValue(GDALMDArrayH hArray);
2754 : double CPL_DLL GDALMDArrayGetNoDataValueAsDouble(GDALMDArrayH hArray,
2755 : int *pbHasNoDataValue);
2756 : int64_t CPL_DLL GDALMDArrayGetNoDataValueAsInt64(GDALMDArrayH hArray,
2757 : int *pbHasNoDataValue);
2758 : uint64_t CPL_DLL GDALMDArrayGetNoDataValueAsUInt64(GDALMDArrayH hArray,
2759 : int *pbHasNoDataValue);
2760 : int CPL_DLL GDALMDArraySetRawNoDataValue(GDALMDArrayH hArray, const void *);
2761 : int CPL_DLL GDALMDArraySetNoDataValueAsDouble(GDALMDArrayH hArray,
2762 : double dfNoDataValue);
2763 : int CPL_DLL GDALMDArraySetNoDataValueAsInt64(GDALMDArrayH hArray,
2764 : int64_t nNoDataValue);
2765 : int CPL_DLL GDALMDArraySetNoDataValueAsUInt64(GDALMDArrayH hArray,
2766 : uint64_t nNoDataValue);
2767 : int CPL_DLL GDALMDArraySetScale(GDALMDArrayH hArray, double dfScale);
2768 : int CPL_DLL GDALMDArraySetScaleEx(GDALMDArrayH hArray, double dfScale,
2769 : GDALDataType eStorageType);
2770 : double CPL_DLL GDALMDArrayGetScale(GDALMDArrayH hArray, int *pbHasValue);
2771 : double CPL_DLL GDALMDArrayGetScaleEx(GDALMDArrayH hArray, int *pbHasValue,
2772 : GDALDataType *peStorageType);
2773 : int CPL_DLL GDALMDArraySetOffset(GDALMDArrayH hArray, double dfOffset);
2774 : int CPL_DLL GDALMDArraySetOffsetEx(GDALMDArrayH hArray, double dfOffset,
2775 : GDALDataType eStorageType);
2776 : double CPL_DLL GDALMDArrayGetOffset(GDALMDArrayH hArray, int *pbHasValue);
2777 : double CPL_DLL GDALMDArrayGetOffsetEx(GDALMDArrayH hArray, int *pbHasValue,
2778 : GDALDataType *peStorageType);
2779 : GUInt64 CPL_DLL *GDALMDArrayGetBlockSize(GDALMDArrayH hArray, size_t *pnCount);
2780 : int CPL_DLL GDALMDArraySetUnit(GDALMDArrayH hArray, const char *);
2781 : const char CPL_DLL *GDALMDArrayGetUnit(GDALMDArrayH hArray);
2782 : int CPL_DLL GDALMDArraySetSpatialRef(GDALMDArrayH, OGRSpatialReferenceH);
2783 : OGRSpatialReferenceH CPL_DLL GDALMDArrayGetSpatialRef(GDALMDArrayH hArray);
2784 : size_t CPL_DLL *GDALMDArrayGetProcessingChunkSize(GDALMDArrayH hArray,
2785 : size_t *pnCount,
2786 : size_t nMaxChunkMemory);
2787 : CSLConstList CPL_DLL GDALMDArrayGetStructuralInfo(GDALMDArrayH hArray);
2788 : GDALMDArrayH CPL_DLL GDALMDArrayGetView(GDALMDArrayH hArray,
2789 : const char *pszViewExpr);
2790 : GDALMDArrayH CPL_DLL GDALMDArrayTranspose(GDALMDArrayH hArray,
2791 : size_t nNewAxisCount,
2792 : const int *panMapNewAxisToOldAxis);
2793 : GDALMDArrayH CPL_DLL GDALMDArrayGetUnscaled(GDALMDArrayH hArray);
2794 : GDALMDArrayH CPL_DLL GDALMDArrayGetMask(GDALMDArrayH hArray,
2795 : CSLConstList papszOptions);
2796 : GDALDatasetH CPL_DLL GDALMDArrayAsClassicDataset(GDALMDArrayH hArray,
2797 : size_t iXDim, size_t iYDim);
2798 : GDALDatasetH CPL_DLL GDALMDArrayAsClassicDatasetEx(GDALMDArrayH hArray,
2799 : size_t iXDim, size_t iYDim,
2800 : GDALGroupH hRootGroup,
2801 : CSLConstList papszOptions);
2802 : CPLErr CPL_DLL GDALMDArrayGetStatistics(
2803 : GDALMDArrayH hArray, GDALDatasetH, int bApproxOK, int bForce,
2804 : double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev,
2805 : GUInt64 *pnValidCount, GDALProgressFunc pfnProgress, void *pProgressData);
2806 : int CPL_DLL GDALMDArrayComputeStatistics(GDALMDArrayH hArray, GDALDatasetH,
2807 : int bApproxOK, double *pdfMin,
2808 : double *pdfMax, double *pdfMean,
2809 : double *pdfStdDev,
2810 : GUInt64 *pnValidCount,
2811 : GDALProgressFunc, void *pProgressData);
2812 : int CPL_DLL GDALMDArrayComputeStatisticsEx(
2813 : GDALMDArrayH hArray, GDALDatasetH, int bApproxOK, double *pdfMin,
2814 : double *pdfMax, double *pdfMean, double *pdfStdDev, GUInt64 *pnValidCount,
2815 : GDALProgressFunc, void *pProgressData, CSLConstList papszOptions);
2816 : GDALMDArrayH CPL_DLL GDALMDArrayGetResampled(GDALMDArrayH hArray,
2817 : size_t nNewDimCount,
2818 : const GDALDimensionH *pahNewDims,
2819 : GDALRIOResampleAlg resampleAlg,
2820 : OGRSpatialReferenceH hTargetSRS,
2821 : CSLConstList papszOptions);
2822 : GDALMDArrayH CPL_DLL GDALMDArrayGetGridded(
2823 : GDALMDArrayH hArray, const char *pszGridOptions, GDALMDArrayH hXArray,
2824 : GDALMDArrayH hYArray, CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2825 :
2826 : GDALMDArrayH CPL_DLL *
2827 : GDALMDArrayGetCoordinateVariables(GDALMDArrayH hArray,
2828 : size_t *pnCount) CPL_WARN_UNUSED_RESULT;
2829 :
2830 : GDALMDArrayH CPL_DLL *
2831 : GDALMDArrayGetMeshGrid(const GDALMDArrayH *pahInputArrays,
2832 : size_t nCountInputArrays, size_t *pnCountOutputArrays,
2833 : CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
2834 :
2835 : #ifdef __cplusplus
2836 : extern "C++"
2837 : {
2838 : #endif
2839 :
2840 : /** Information on a raw block of a GDALMDArray
2841 : *
2842 : * @since 3.12
2843 : */
2844 : struct
2845 : #ifdef __cplusplus
2846 : CPL_DLL
2847 : #endif
2848 : GDALMDArrayRawBlockInfo
2849 : {
2850 : /** Filename into which the raw block is found */
2851 : char *pszFilename;
2852 : /** File offset within pszFilename of the start of the raw block */
2853 : uint64_t nOffset;
2854 : /** Size in bytes of the raw block */
2855 : uint64_t nSize;
2856 : /** NULL or Null-terminated list of driver specific information on the
2857 : * raw block */
2858 : char **papszInfo;
2859 : /** In-memory buffer of nSize bytes. When this is set, pszFilename and
2860 : * nOffset are set to NULL.
2861 : *
2862 : * When using C++ copy constructor or copy-assignment operator, if
2863 : * a memory allocation fails, a CPLError() will be emitted and this
2864 : * field will be NULL, but nSize not zero.
2865 : */
2866 : GByte *pabyInlineData;
2867 :
2868 : #ifdef __cplusplus
2869 : /*! @cond Doxygen_Suppress */
2870 26 : inline GDALMDArrayRawBlockInfo()
2871 26 : : pszFilename(nullptr), nOffset(0), nSize(0), papszInfo(nullptr),
2872 26 : pabyInlineData(nullptr)
2873 : {
2874 26 : }
2875 :
2876 : ~GDALMDArrayRawBlockInfo();
2877 :
2878 : void clear();
2879 :
2880 : GDALMDArrayRawBlockInfo(const GDALMDArrayRawBlockInfo &);
2881 : GDALMDArrayRawBlockInfo &operator=(const GDALMDArrayRawBlockInfo &);
2882 : GDALMDArrayRawBlockInfo(GDALMDArrayRawBlockInfo &&);
2883 : GDALMDArrayRawBlockInfo &operator=(GDALMDArrayRawBlockInfo &&);
2884 : /*! @endcond */
2885 : #endif
2886 : };
2887 :
2888 : #ifdef __cplusplus
2889 : }
2890 : #endif
2891 :
2892 : /*! @cond Doxygen_Suppress */
2893 : typedef struct GDALMDArrayRawBlockInfo GDALMDArrayRawBlockInfo;
2894 : /*! @endcond */
2895 :
2896 : GDALMDArrayRawBlockInfo CPL_DLL *GDALMDArrayRawBlockInfoCreate(void);
2897 : void CPL_DLL
2898 : GDALMDArrayRawBlockInfoRelease(GDALMDArrayRawBlockInfo *psBlockInfo);
2899 : bool CPL_DLL GDALMDArrayGetRawBlockInfo(GDALMDArrayH hArray,
2900 : const uint64_t *panBlockCoordinates,
2901 : GDALMDArrayRawBlockInfo *psBlockInfo);
2902 :
2903 : int CPL_DLL GDALMDArrayGetOverviewCount(GDALMDArrayH hArray);
2904 : GDALMDArrayH CPL_DLL GDALMDArrayGetOverview(GDALMDArrayH hArray, int nIdx);
2905 :
2906 : void CPL_DLL GDALReleaseArrays(GDALMDArrayH *arrays, size_t nCount);
2907 : int CPL_DLL GDALMDArrayCache(GDALMDArrayH hArray, CSLConstList papszOptions);
2908 : bool CPL_DLL GDALMDArrayRename(GDALMDArrayH hArray, const char *pszNewName);
2909 :
2910 : GDALRasterAttributeTableH CPL_DLL GDALCreateRasterAttributeTableFromMDArrays(
2911 : GDALRATTableType eTableType, int nArrays, const GDALMDArrayH *ahArrays,
2912 : const GDALRATFieldUsage *paeUsages);
2913 :
2914 : void CPL_DLL GDALAttributeRelease(GDALAttributeH hAttr);
2915 : void CPL_DLL GDALReleaseAttributes(GDALAttributeH *attributes, size_t nCount);
2916 : const char CPL_DLL *GDALAttributeGetName(GDALAttributeH hAttr);
2917 : const char CPL_DLL *GDALAttributeGetFullName(GDALAttributeH hAttr);
2918 : GUInt64 CPL_DLL GDALAttributeGetTotalElementsCount(GDALAttributeH hAttr);
2919 : size_t CPL_DLL GDALAttributeGetDimensionCount(GDALAttributeH hAttr);
2920 : GUInt64 CPL_DLL *
2921 : GDALAttributeGetDimensionsSize(GDALAttributeH hAttr,
2922 : size_t *pnCount) CPL_WARN_UNUSED_RESULT;
2923 : GDALExtendedDataTypeH CPL_DLL GDALAttributeGetDataType(GDALAttributeH hAttr)
2924 : CPL_WARN_UNUSED_RESULT;
2925 : GByte CPL_DLL *GDALAttributeReadAsRaw(GDALAttributeH hAttr,
2926 : size_t *pnSize) CPL_WARN_UNUSED_RESULT;
2927 : void CPL_DLL GDALAttributeFreeRawResult(GDALAttributeH hAttr, GByte *raw,
2928 : size_t nSize);
2929 : const char CPL_DLL *GDALAttributeReadAsString(GDALAttributeH hAttr);
2930 : int CPL_DLL GDALAttributeReadAsInt(GDALAttributeH hAttr);
2931 : int64_t CPL_DLL GDALAttributeReadAsInt64(GDALAttributeH hAttr);
2932 : double CPL_DLL GDALAttributeReadAsDouble(GDALAttributeH hAttr);
2933 : char CPL_DLL **
2934 : GDALAttributeReadAsStringArray(GDALAttributeH hAttr) CPL_WARN_UNUSED_RESULT;
2935 : int CPL_DLL *GDALAttributeReadAsIntArray(GDALAttributeH hAttr, size_t *pnCount)
2936 : CPL_WARN_UNUSED_RESULT;
2937 : int64_t CPL_DLL *
2938 : GDALAttributeReadAsInt64Array(GDALAttributeH hAttr,
2939 : size_t *pnCount) CPL_WARN_UNUSED_RESULT;
2940 : double CPL_DLL *
2941 : GDALAttributeReadAsDoubleArray(GDALAttributeH hAttr,
2942 : size_t *pnCount) CPL_WARN_UNUSED_RESULT;
2943 : int CPL_DLL GDALAttributeWriteRaw(GDALAttributeH hAttr, const void *, size_t);
2944 : int CPL_DLL GDALAttributeWriteString(GDALAttributeH hAttr, const char *);
2945 : int CPL_DLL GDALAttributeWriteStringArray(GDALAttributeH hAttr, CSLConstList);
2946 : int CPL_DLL GDALAttributeWriteInt(GDALAttributeH hAttr, int);
2947 : int CPL_DLL GDALAttributeWriteIntArray(GDALAttributeH hAttr, const int *,
2948 : size_t);
2949 : int CPL_DLL GDALAttributeWriteInt64(GDALAttributeH hAttr, int64_t);
2950 : int CPL_DLL GDALAttributeWriteInt64Array(GDALAttributeH hAttr, const int64_t *,
2951 : size_t);
2952 : int CPL_DLL GDALAttributeWriteDouble(GDALAttributeH hAttr, double);
2953 : int CPL_DLL GDALAttributeWriteDoubleArray(GDALAttributeH hAttr, const double *,
2954 : size_t);
2955 : bool CPL_DLL GDALAttributeRename(GDALAttributeH hAttr, const char *pszNewName);
2956 :
2957 : void CPL_DLL GDALDimensionRelease(GDALDimensionH hDim);
2958 : void CPL_DLL GDALReleaseDimensions(GDALDimensionH *dims, size_t nCount);
2959 : const char CPL_DLL *GDALDimensionGetName(GDALDimensionH hDim);
2960 : const char CPL_DLL *GDALDimensionGetFullName(GDALDimensionH hDim);
2961 : const char CPL_DLL *GDALDimensionGetType(GDALDimensionH hDim);
2962 : const char CPL_DLL *GDALDimensionGetDirection(GDALDimensionH hDim);
2963 : GUInt64 CPL_DLL GDALDimensionGetSize(GDALDimensionH hDim);
2964 : GDALMDArrayH CPL_DLL GDALDimensionGetIndexingVariable(GDALDimensionH hDim)
2965 : CPL_WARN_UNUSED_RESULT;
2966 : int CPL_DLL GDALDimensionSetIndexingVariable(GDALDimensionH hDim,
2967 : GDALMDArrayH hArray);
2968 : bool CPL_DLL GDALDimensionRename(GDALDimensionH hDim, const char *pszNewName);
2969 :
2970 : CPL_C_END
2971 :
2972 : #endif /* ndef GDAL_H_INCLUDED */
|