1 /******************************************************************************
2  * $Id: gdal.h 92caa0d0f67bdff72b5f272d1558b1909bdbeaea 2021-03-31 14:38:01 +0200 Even Rouault $
3  *
4  * Project:  GDAL Core
5  * Purpose:  GDAL Core C/Public declarations.
6  * Author:   Frank Warmerdam, warmerdam@pobox.com
7  *
8  ******************************************************************************
9  * Copyright (c) 1998, 2002 Frank Warmerdam
10  * Copyright (c) 2007-2014, Even Rouault <even dot rouault at spatialys.com>
11  *
12  * Permission is hereby granted, free of charge, to any person obtaining a
13  * copy of this software and associated documentation files (the "Software"),
14  * to deal in the Software without restriction, including without limitation
15  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16  * and/or sell copies of the Software, and to permit persons to whom the
17  * Software is furnished to do so, subject to the following conditions:
18  *
19  * The above copyright notice and this permission notice shall be included
20  * in all copies or substantial portions of the Software.
21  *
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28  * DEALINGS IN THE SOFTWARE.
29  ****************************************************************************/
30 
31 #ifndef GDAL_H_INCLUDED
32 #define GDAL_H_INCLUDED
33 
34 /**
35  * \file gdal.h
36  *
37  * Public (C callable) GDAL entry points.
38  */
39 
40 #ifndef DOXYGEN_SKIP
41 #if defined(GDAL_COMPILATION)
42 #define DO_NOT_DEFINE_GDAL_RELEASE_DATE_AND_GDAL_RELEASE_NAME
43 #endif
44 #include "gdal_version.h"
45 #include "cpl_port.h"
46 #include "cpl_error.h"
47 #include "cpl_progress.h"
48 #include "cpl_virtualmem.h"
49 #include "cpl_minixml.h"
50 #include "ogr_api.h"
51 #endif
52 
53 #include <stdbool.h>
54 
55 /* -------------------------------------------------------------------- */
56 /*      Significant constants.                                          */
57 /* -------------------------------------------------------------------- */
58 
59 CPL_C_START
60 
61 /*! Pixel data types */
62 typedef enum {
63     /*! Unknown or unspecified type */          GDT_Unknown = 0,
64     /*! Eight bit unsigned integer */           GDT_Byte = 1,
65     /*! Sixteen bit unsigned integer */         GDT_UInt16 = 2,
66     /*! Sixteen bit signed integer */           GDT_Int16 = 3,
67     /*! Thirty two bit unsigned integer */      GDT_UInt32 = 4,
68     /*! Thirty two bit signed integer */        GDT_Int32 = 5,
69     /* TODO?(#6879): GDT_UInt64 */
70     /* TODO?(#6879): GDT_Int64 */
71     /*! Thirty two bit floating point */        GDT_Float32 = 6,
72     /*! Sixty four bit floating point */        GDT_Float64 = 7,
73     /*! Complex Int16 */                        GDT_CInt16 = 8,
74     /*! Complex Int32 */                        GDT_CInt32 = 9,
75     /* TODO?(#6879): GDT_CInt64 */
76     /*! Complex Float32 */                      GDT_CFloat32 = 10,
77     /*! Complex Float64 */                      GDT_CFloat64 = 11,
78     GDT_TypeCount = 12          /* maximum type # + 1 */
79 } GDALDataType;
80 
81 int CPL_DLL CPL_STDCALL GDALGetDataTypeSize( GDALDataType );  // Deprecated.
82 int CPL_DLL CPL_STDCALL GDALGetDataTypeSizeBits( GDALDataType eDataType );
83 int CPL_DLL CPL_STDCALL GDALGetDataTypeSizeBytes( GDALDataType );
84 int CPL_DLL CPL_STDCALL GDALDataTypeIsComplex( GDALDataType );
85 int CPL_DLL CPL_STDCALL GDALDataTypeIsInteger( GDALDataType );
86 int CPL_DLL CPL_STDCALL GDALDataTypeIsFloating( GDALDataType );
87 int CPL_DLL CPL_STDCALL GDALDataTypeIsSigned( GDALDataType );
88 const char CPL_DLL * CPL_STDCALL GDALGetDataTypeName( GDALDataType );
89 GDALDataType CPL_DLL CPL_STDCALL GDALGetDataTypeByName( const char * );
90 GDALDataType CPL_DLL CPL_STDCALL GDALDataTypeUnion( GDALDataType, GDALDataType );
91 GDALDataType CPL_DLL CPL_STDCALL GDALDataTypeUnionWithValue( GDALDataType eDT, double dValue, int bComplex );
92 GDALDataType CPL_DLL CPL_STDCALL GDALFindDataType( int nBits, int bSigned, int bFloating, int bComplex );
93 GDALDataType CPL_DLL CPL_STDCALL GDALFindDataTypeForValue( double dValue, int bComplex );
94 double CPL_DLL GDALAdjustValueToDataType( GDALDataType eDT, double dfValue, int* pbClamped, int* pbRounded );
95 GDALDataType CPL_DLL CPL_STDCALL GDALGetNonComplexDataType( GDALDataType );
96 int CPL_DLL CPL_STDCALL GDALDataTypeIsConversionLossy( GDALDataType eTypeFrom,
97                                                        GDALDataType eTypeTo );
98 
99 /**
100 * status of the asynchronous stream
101 */
102 typedef enum
103 {
104     GARIO_PENDING = 0,
105     GARIO_UPDATE = 1,
106     GARIO_ERROR = 2,
107     GARIO_COMPLETE = 3,
108     GARIO_TypeCount = 4
109 } GDALAsyncStatusType;
110 
111 const char CPL_DLL * CPL_STDCALL GDALGetAsyncStatusTypeName( GDALAsyncStatusType );
112 GDALAsyncStatusType CPL_DLL CPL_STDCALL GDALGetAsyncStatusTypeByName( const char * );
113 
114 /*! Flag indicating read/write, or read-only access to data. */
115 typedef enum {
116     /*! Read only (no update) access */ GA_ReadOnly = 0,
117     /*! Read/write access. */           GA_Update = 1
118 } GDALAccess;
119 
120 /*! Read/Write flag for RasterIO() method */
121 typedef enum {
122     /*! Read data */   GF_Read = 0,
123     /*! Write data */  GF_Write = 1
124 } GDALRWFlag;
125 
126 /* NOTE: values are selected to be consistent with GDALResampleAlg of alg/gdalwarper.h */
127 /** RasterIO() resampling method.
128   * @since GDAL 2.0
129   */
130 typedef enum
131 {
132     /*! Nearest neighbour */                            GRIORA_NearestNeighbour = 0,
133     /*! Bilinear (2x2 kernel) */                        GRIORA_Bilinear = 1,
134     /*! Cubic Convolution Approximation (4x4 kernel) */ GRIORA_Cubic = 2,
135     /*! Cubic B-Spline Approximation (4x4 kernel) */    GRIORA_CubicSpline = 3,
136     /*! Lanczos windowed sinc interpolation (6x6 kernel) */ GRIORA_Lanczos = 4,
137     /*! Average */                                      GRIORA_Average = 5,
138     /*! Mode (selects the value which appears most often of all the sampled points) */
139                                                         GRIORA_Mode = 6,
140     /*! Gauss blurring */                               GRIORA_Gauss = 7,
141     /* NOTE: values 8 to 13 are reserved for max,min,med,Q1,Q3,sum */
142 /*! @cond Doxygen_Suppress */
143                                                         GRIORA_RESERVED_START = 8,
144                                                         GRIORA_RESERVED_END = 13,
145 /*! @endcond */
146     /** RMS: Root Mean Square / Quadratic Mean.
147      * For complex numbers, applies on the real and imaginary part independently.
148      */
149                                                         GRIORA_RMS = 14,
150 /*! @cond Doxygen_Suppress */
151                                                         GRIORA_LAST = GRIORA_RMS
152 /*! @endcond */
153 } GDALRIOResampleAlg;
154 
155 /* NOTE to developers: only add members, and if so edit INIT_RASTERIO_EXTRA_ARG */
156 /* and INIT_RASTERIO_EXTRA_ARG */
157 /** Structure to pass extra arguments to RasterIO() method
158   * @since GDAL 2.0
159   */
160 typedef struct
161 {
162     /*! Version of structure (to allow future extensions of the structure) */
163     int                    nVersion;
164 
165     /*! Resampling algorithm */
166     GDALRIOResampleAlg     eResampleAlg;
167 
168     /*! Progress callback */
169     GDALProgressFunc       pfnProgress;
170     /*! Progress callback user data */
171     void                  *pProgressData;
172 
173     /*! Indicate if dfXOff, dfYOff, dfXSize and dfYSize are set.
174         Mostly reserved from the VRT driver to communicate a more precise
175         source window. Must be such that dfXOff - nXOff < 1.0 and
176         dfYOff - nYOff < 1.0 and nXSize - dfXSize < 1.0 and nYSize - dfYSize < 1.0 */
177     int                    bFloatingPointWindowValidity;
178     /*! Pixel offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE */
179     double                 dfXOff;
180     /*! Line offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE */
181     double                 dfYOff;
182     /*! Width in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE */
183     double                 dfXSize;
184     /*! Height in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE */
185     double                 dfYSize;
186 } GDALRasterIOExtraArg;
187 
188 #ifndef DOXYGEN_SKIP
189 #define RASTERIO_EXTRA_ARG_CURRENT_VERSION  1
190 #endif
191 
192 /** Macro to initialize an instance of GDALRasterIOExtraArg structure.
193   * @since GDAL 2.0
194   */
195 #define INIT_RASTERIO_EXTRA_ARG(s)  \
196     do { (s).nVersion = RASTERIO_EXTRA_ARG_CURRENT_VERSION; \
197          (s).eResampleAlg = GRIORA_NearestNeighbour; \
198          (s).pfnProgress = CPL_NULLPTR; \
199          (s).pProgressData = CPL_NULLPTR; \
200          (s).bFloatingPointWindowValidity = FALSE; } while(0)
201 
202 /*! Types of color interpretation for raster bands. */
203 typedef enum
204 {
205     /*! Undefined */                                      GCI_Undefined=0,
206     /*! Greyscale */                                      GCI_GrayIndex=1,
207     /*! Paletted (see associated color table) */          GCI_PaletteIndex=2,
208     /*! Red band of RGBA image */                         GCI_RedBand=3,
209     /*! Green band of RGBA image */                       GCI_GreenBand=4,
210     /*! Blue band of RGBA image */                        GCI_BlueBand=5,
211     /*! Alpha (0=transparent, 255=opaque) */              GCI_AlphaBand=6,
212     /*! Hue band of HLS image */                          GCI_HueBand=7,
213     /*! Saturation band of HLS image */                   GCI_SaturationBand=8,
214     /*! Lightness band of HLS image */                    GCI_LightnessBand=9,
215     /*! Cyan band of CMYK image */                        GCI_CyanBand=10,
216     /*! Magenta band of CMYK image */                     GCI_MagentaBand=11,
217     /*! Yellow band of CMYK image */                      GCI_YellowBand=12,
218     /*! Black band of CMYK image */                       GCI_BlackBand=13,
219     /*! Y Luminance */                                    GCI_YCbCr_YBand=14,
220     /*! Cb Chroma */                                      GCI_YCbCr_CbBand=15,
221     /*! Cr Chroma */                                      GCI_YCbCr_CrBand=16,
222     /*! Max current value (equals to GCI_YCbCr_CrBand currently) */ GCI_Max=16
223 } GDALColorInterp;
224 
225 const char CPL_DLL *GDALGetColorInterpretationName( GDALColorInterp );
226 GDALColorInterp CPL_DLL GDALGetColorInterpretationByName( const char *pszName );
227 
228 /*! Types of color interpretations for a GDALColorTable. */
229 typedef enum
230 {
231   /*! Grayscale (in GDALColorEntry.c1) */                      GPI_Gray=0,
232   /*! Red, Green, Blue and Alpha in (in c1, c2, c3 and c4) */  GPI_RGB=1,
233   /*! Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4)*/ GPI_CMYK=2,
234   /*! Hue, Lightness and Saturation (in c1, c2, and c3) */     GPI_HLS=3
235 } GDALPaletteInterp;
236 
237 const char CPL_DLL *GDALGetPaletteInterpretationName( GDALPaletteInterp );
238 
239 /* "well known" metadata items. */
240 
241 /** Metadata item for dataset that indicates the spatial interpretation of a
242  *  pixel */
243 #define GDALMD_AREA_OR_POINT   "AREA_OR_POINT"
244 /** Value for GDALMD_AREA_OR_POINT that indicates that a pixel represents an
245  * area */
246 #  define GDALMD_AOP_AREA      "Area"
247 /** Value for GDALMD_AREA_OR_POINT that indicates that a pixel represents a
248  * point */
249 #  define GDALMD_AOP_POINT     "Point"
250 
251 /* -------------------------------------------------------------------- */
252 /*      GDAL Specific error codes.                                      */
253 /*                                                                      */
254 /*      error codes 100 to 299 reserved for GDAL.                       */
255 /* -------------------------------------------------------------------- */
256 #ifndef DOXYGEN_SKIP
257 #define CPLE_WrongFormat        CPL_STATIC_CAST(CPLErrorNum, 200)
258 #endif
259 
260 /* -------------------------------------------------------------------- */
261 /*      Define handle types related to various internal classes.        */
262 /* -------------------------------------------------------------------- */
263 
264 /** Opaque type used for the C bindings of the C++ GDALMajorObject class */
265 typedef void *GDALMajorObjectH;
266 
267 /** Opaque type used for the C bindings of the C++ GDALDataset class */
268 typedef void *GDALDatasetH;
269 
270 /** Opaque type used for the C bindings of the C++ GDALRasterBand class */
271 typedef void *GDALRasterBandH;
272 
273 /** Opaque type used for the C bindings of the C++ GDALDriver class */
274 typedef void *GDALDriverH;
275 
276 /** Opaque type used for the C bindings of the C++ GDALColorTable class */
277 typedef void *GDALColorTableH;
278 
279 /** Opaque type used for the C bindings of the C++ GDALRasterAttributeTable class */
280 typedef void *GDALRasterAttributeTableH;
281 
282 /** Opaque type used for the C bindings of the C++ GDALAsyncReader class */
283 typedef void *GDALAsyncReaderH;
284 
285 /** Type to express pixel, line or band spacing. Signed 64 bit integer. */
286 typedef GIntBig GSpacing;
287 
288 /** Enumeration giving the class of a GDALExtendedDataType.
289  * @since GDAL 3.1
290  */
291 typedef enum {
292     /** Numeric value. Based on GDALDataType enumeration */
293     GEDTC_NUMERIC,
294     /** String value. */
295     GEDTC_STRING,
296     /** Compound data type. */
297     GEDTC_COMPOUND
298 } GDALExtendedDataTypeClass;
299 
300 /** Opaque type for C++ GDALExtendedDataType */
301 typedef struct GDALExtendedDataTypeHS* GDALExtendedDataTypeH;
302 /** Opaque type for C++ GDALEDTComponent */
303 typedef struct GDALEDTComponentHS* GDALEDTComponentH;
304 /** Opaque type for C++ GDALGroup */
305 typedef struct GDALGroupHS* GDALGroupH;
306 /** Opaque type for C++ GDALMDArray */
307 typedef struct GDALMDArrayHS* GDALMDArrayH;
308 /** Opaque type for C++ GDALAttribute */
309 typedef struct GDALAttributeHS* GDALAttributeH;
310 /** Opaque type for C++ GDALDimension */
311 typedef struct GDALDimensionHS* GDALDimensionH;
312 
313 /* ==================================================================== */
314 /*      Registration/driver related.                                    */
315 /* ==================================================================== */
316 
317 /** Long name of the driver */
318 #define GDAL_DMD_LONGNAME "DMD_LONGNAME"
319 
320 /** URL (relative to http://gdal.org/) to the help page of the driver */
321 #define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
322 
323 /** MIME type handled by the driver. */
324 #define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
325 
326 /** Extension handled by the driver. */
327 #define GDAL_DMD_EXTENSION "DMD_EXTENSION"
328 
329 /** Connection prefix to provide as the file name of the open function.
330  * Typically set for non-file based drivers. Generally used with open options.
331  * @since GDAL 2.0
332  */
333 #define GDAL_DMD_CONNECTION_PREFIX "DMD_CONNECTION_PREFIX"
334 
335 /** List of (space separated) extensions handled by the driver.
336  * @since GDAL 2.0
337  */
338 #define GDAL_DMD_EXTENSIONS "DMD_EXTENSIONS"
339 
340 /** XML snippet with creation options. */
341 #define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST"
342 
343 /** XML snippet with multidimensional dataset creation options.
344  * @since GDAL 3.1
345  */
346 #define GDAL_DMD_MULTIDIM_DATASET_CREATIONOPTIONLIST "DMD_MULTIDIM_DATASET_CREATIONOPTIONLIST"
347 
348 /** XML snippet with multidimensional group creation options.
349  * @since GDAL 3.1
350  */
351 #define GDAL_DMD_MULTIDIM_GROUP_CREATIONOPTIONLIST "DMD_MULTIDIM_GROUP_CREATIONOPTIONLIST"
352 
353 /** XML snippet with multidimensional dimension creation options.
354  * @since GDAL 3.1
355  */
356 #define GDAL_DMD_MULTIDIM_DIMENSION_CREATIONOPTIONLIST "DMD_MULTIDIM_DIMENSION_CREATIONOPTIONLIST"
357 
358 /** XML snippet with multidimensional array creation options.
359  * @since GDAL 3.1
360  */
361 #define GDAL_DMD_MULTIDIM_ARRAY_CREATIONOPTIONLIST "DMD_MULTIDIM_ARRAY_CREATIONOPTIONLIST"
362 
363 /** XML snippet with multidimensional attribute creation options.
364  * @since GDAL 3.1
365  */
366 #define GDAL_DMD_MULTIDIM_ATTRIBUTE_CREATIONOPTIONLIST "DMD_MULTIDIM_ATTRIBUTE_CREATIONOPTIONLIST"
367 
368 /** XML snippet with open options.
369  * @since GDAL 2.0
370  */
371 #define GDAL_DMD_OPENOPTIONLIST "DMD_OPENOPTIONLIST"
372 
373 /** List of (space separated) raster data types support by the Create()/CreateCopy() API. */
374 #define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES"
375 
376 /** List of (space separated) vector field types support by the CreateField() API.
377  * @since GDAL 2.0
378  * */
379 #define GDAL_DMD_CREATIONFIELDDATATYPES "DMD_CREATIONFIELDDATATYPES"
380 
381 /** List of (space separated) vector field sub-types support by the CreateField() API.
382  * @since GDAL 2.3
383  * */
384 #define GDAL_DMD_CREATIONFIELDDATASUBTYPES "DMD_CREATIONFIELDDATASUBTYPES"
385 
386 /** Capability set by a driver that exposes Subdatasets. */
387 #define GDAL_DMD_SUBDATASETS "DMD_SUBDATASETS"
388 
389 /** Capability set by a driver that implements the Open() API. */
390 #define GDAL_DCAP_OPEN       "DCAP_OPEN"
391 
392 /** Capability set by a driver that implements the Create() API.
393  *
394  * If GDAL_DCAP_CREATE is set, but GDAL_DCAP_CREATECOPY not, a generic
395  * CreateCopy() implementation is available and will use the Create() API of
396  * the driver.
397  * So to test if some CreateCopy() implementation is available, generic or
398  * specialize, test for both GDAL_DCAP_CREATE and GDAL_DCAP_CREATECOPY.
399  */
400 #define GDAL_DCAP_CREATE     "DCAP_CREATE"
401 
402 /** Capability set by a driver that implements the CreateMultidimensional() API.
403  *
404  * @since GDAL 3.1
405  */
406 #define GDAL_DCAP_CREATE_MULTIDIMENSIONAL     "DCAP_CREATE_MULTIDIMENSIONAL"
407 
408 /** Capability set by a driver that implements the CreateCopy() API.
409  *
410  * If GDAL_DCAP_CREATECOPY is not defined, but GDAL_DCAP_CREATE is set, a generic
411  * CreateCopy() implementation is available and will use the Create() API of
412  * the driver.
413  * So to test if some CreateCopy() implementation is available, generic or
414  * specialize, test for both GDAL_DCAP_CREATE and GDAL_DCAP_CREATECOPY.
415  */
416 #define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
417 
418 /** Capability set by a driver that implements the CreateCopy() API, but with
419  * multidimensional raster as input and output.
420  *
421  * @since GDAL 3.1
422  */
423 #define GDAL_DCAP_CREATECOPY_MULTIDIMENSIONAL     "DCAP_CREATECOPY_MULTIDIMENSIONAL"
424 
425 /** Capability set by a driver that supports multidimensional data.
426  * @since GDAL 3.1
427  */
428 #define GDAL_DCAP_MULTIDIM_RASTER     "DCAP_MULTIDIM_RASTER"
429 
430 /** Capability set by a driver that can copy over subdatasets. */
431 #define GDAL_DCAP_SUBCREATECOPY "DCAP_SUBCREATECOPY"
432 
433 /** Capability set by a driver that can read/create datasets through the VSI*L API. */
434 #define GDAL_DCAP_VIRTUALIO  "DCAP_VIRTUALIO"
435 
436 /** Capability set by a driver having raster capability.
437  * @since GDAL 2.0
438  */
439 #define GDAL_DCAP_RASTER     "DCAP_RASTER"
440 
441 /** Capability set by a driver having vector capability.
442  * @since GDAL 2.0
443  */
444 #define GDAL_DCAP_VECTOR     "DCAP_VECTOR"
445 
446 /** Capability set by a driver having geographical network model capability.
447  * @since GDAL 2.1
448  */
449 #define GDAL_DCAP_GNM         "DCAP_GNM"
450 
451 /** Capability set by a driver that can create fields with NOT NULL constraint.
452  * @since GDAL 2.0
453  */
454 #define GDAL_DCAP_NOTNULL_FIELDS "DCAP_NOTNULL_FIELDS"
455 
456 /** Capability set by a driver that can create fields with UNIQUE constraint.
457  * @since GDAL 3.2
458  */
459 #define GDAL_DCAP_UNIQUE_FIELDS "DCAP_UNIQUE_FIELDS"
460 
461 /** Capability set by a driver that can create fields with DEFAULT values.
462  * @since GDAL 2.0
463  */
464 #define GDAL_DCAP_DEFAULT_FIELDS "DCAP_DEFAULT_FIELDS"
465 
466 /** Capability set by a driver that can create geometry fields with NOT NULL constraint.
467  * @since GDAL 2.0
468  */
469 #define GDAL_DCAP_NOTNULL_GEOMFIELDS "DCAP_NOTNULL_GEOMFIELDS"
470 
471 /** Capability set by a non-spatial driver having no support for geometries. E.g. non-spatial
472  * vector drivers (e.g. spreadsheet format drivers) do not support geometries,
473  * and accordingly will have this capability present.
474  * @since GDAL 2.3
475  */
476 #define GDAL_DCAP_NONSPATIAL     "DCAP_NONSPATIAL"
477 
478 /** Capability set by drivers which support feature styles.
479  * @since GDAL 2.3
480  */
481 #define GDAL_DCAP_FEATURE_STYLES     "DCAP_FEATURE_STYLES"
482 
483 /** Value for GDALDimension::GetType() specifying the X axis of a horizontal CRS.
484  * @since GDAL 3.1
485  */
486 #define GDAL_DIM_TYPE_HORIZONTAL_X      "HORIZONTAL_X"
487 
488 /** Value for GDALDimension::GetType() specifying the Y axis of a horizontal CRS.
489  * @since GDAL 3.1
490  */
491 #define GDAL_DIM_TYPE_HORIZONTAL_Y      "HORIZONTAL_Y"
492 
493 /** Value for GDALDimension::GetType() specifying a vertical axis.
494  * @since GDAL 3.1
495  */
496 #define GDAL_DIM_TYPE_VERTICAL          "VERTICAL"
497 
498 /** Value for GDALDimension::GetType() specifying a temporal axis.
499  * @since GDAL 3.1
500  */
501 #define GDAL_DIM_TYPE_TEMPORAL          "TEMPORAL"
502 
503 /** Value for GDALDimension::GetType() specifying a parametric axis.
504  * @since GDAL 3.1
505  */
506 #define GDAL_DIM_TYPE_PARAMETRIC        "PARAMETRIC"
507 
508 
509 void CPL_DLL CPL_STDCALL GDALAllRegister( void );
510 
511 GDALDatasetH CPL_DLL CPL_STDCALL GDALCreate( GDALDriverH hDriver,
512                                  const char *, int, int, int, GDALDataType,
513                                  CSLConstList ) CPL_WARN_UNUSED_RESULT;
514 GDALDatasetH CPL_DLL CPL_STDCALL
515 GDALCreateCopy( GDALDriverH, const char *, GDALDatasetH,
516                 int, CSLConstList, GDALProgressFunc, void * ) CPL_WARN_UNUSED_RESULT;
517 
518 GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriver( const char * pszFilename,
519                                             CSLConstList papszFileList );
520 
521 GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriverEx(
522     const char *pszFilename, unsigned int nIdentifyFlags,
523     const char *const *papszAllowedDrivers, const char *const *papszFileList);
524 
525 GDALDatasetH CPL_DLL CPL_STDCALL
526 GDALOpen( const char *pszFilename, GDALAccess eAccess ) CPL_WARN_UNUSED_RESULT;
527 GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenShared( const char *, GDALAccess ) CPL_WARN_UNUSED_RESULT;
528 
529 /* Note: we define GDAL_OF_READONLY and GDAL_OF_UPDATE to be on purpose */
530 /* equals to GA_ReadOnly and GA_Update */
531 
532 /** Open in read-only mode.
533  * Used by GDALOpenEx().
534  * @since GDAL 2.0
535  */
536 #define     GDAL_OF_READONLY        0x00
537 
538 /** Open in update mode.
539  * Used by GDALOpenEx().
540  * @since GDAL 2.0
541  */
542 #define     GDAL_OF_UPDATE          0x01
543 
544 /** Allow raster and vector drivers to be used.
545  * Used by GDALOpenEx().
546  * @since GDAL 2.0
547  */
548 #define     GDAL_OF_ALL             0x00
549 
550 /** Allow raster drivers to be used.
551  * Used by GDALOpenEx().
552  * @since GDAL 2.0
553  */
554 #define     GDAL_OF_RASTER          0x02
555 
556 /** Allow vector drivers to be used.
557  * Used by GDALOpenEx().
558  * @since GDAL 2.0
559  */
560 #define     GDAL_OF_VECTOR          0x04
561 
562 /** Allow gnm drivers to be used.
563  * Used by GDALOpenEx().
564  * @since GDAL 2.1
565  */
566 #define     GDAL_OF_GNM             0x08
567 
568 /** Allow multidimensional raster drivers to be used.
569  * Used by GDALOpenEx().
570  * @since GDAL 3.1
571  */
572 #define     GDAL_OF_MULTIDIM_RASTER 0x10
573 
574 #ifndef DOXYGEN_SKIP
575 #define     GDAL_OF_KIND_MASK       0x1E
576 #endif
577 
578 /** Open in shared mode.
579  * Used by GDALOpenEx().
580  * @since GDAL 2.0
581  */
582 #define     GDAL_OF_SHARED          0x20
583 
584 /** Emit error message in case of failed open.
585  * Used by GDALOpenEx().
586  * @since GDAL 2.0
587  */
588 #define     GDAL_OF_VERBOSE_ERROR   0x40
589 
590 /** Open as internal dataset. Such dataset isn't registered in the global list
591  * of opened dataset. Cannot be used with GDAL_OF_SHARED.
592  *
593  * Used by GDALOpenEx().
594  * @since GDAL 2.0
595  */
596 #define     GDAL_OF_INTERNAL        0x80
597 
598 /** Let GDAL decide if a array-based or hashset-based storage strategy for
599  * cached blocks must be used.
600  *
601  * GDAL_OF_DEFAULT_BLOCK_ACCESS, GDAL_OF_ARRAY_BLOCK_ACCESS and
602  * GDAL_OF_HASHSET_BLOCK_ACCESS are mutually exclusive.
603  *
604  * Used by GDALOpenEx().
605  * @since GDAL 2.1
606  */
607 #define     GDAL_OF_DEFAULT_BLOCK_ACCESS  0
608 
609 /** Use a array-based storage strategy for cached blocks.
610  *
611  * GDAL_OF_DEFAULT_BLOCK_ACCESS, GDAL_OF_ARRAY_BLOCK_ACCESS and
612  * GDAL_OF_HASHSET_BLOCK_ACCESS are mutually exclusive.
613  *
614  * Used by GDALOpenEx().
615  * @since GDAL 2.1
616  */
617 #define     GDAL_OF_ARRAY_BLOCK_ACCESS    0x100
618 
619 /** Use a hashset-based storage strategy for cached blocks.
620  *
621  * GDAL_OF_DEFAULT_BLOCK_ACCESS, GDAL_OF_ARRAY_BLOCK_ACCESS and
622  * GDAL_OF_HASHSET_BLOCK_ACCESS are mutually exclusive.
623  *
624  * Used by GDALOpenEx().
625  * @since GDAL 2.1
626  */
627 #define     GDAL_OF_HASHSET_BLOCK_ACCESS  0x200
628 
629 #ifndef DOXYGEN_SKIP
630 /* Reserved for a potential future alternative to GDAL_OF_ARRAY_BLOCK_ACCESS
631  * and GDAL_OF_HASHSET_BLOCK_ACCESS */
632 #define     GDAL_OF_RESERVED_1            0x300
633 
634 /** Mask to detect the block access method */
635 #define     GDAL_OF_BLOCK_ACCESS_MASK     0x300
636 #endif
637 
638 GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenEx( const char* pszFilename,
639                                              unsigned int nOpenFlags,
640                                              const char* const* papszAllowedDrivers,
641                                              const char* const* papszOpenOptions,
642                                              const char* const* papszSiblingFiles ) CPL_WARN_UNUSED_RESULT;
643 
644 int          CPL_DLL CPL_STDCALL GDALDumpOpenDatasets( FILE * );
645 
646 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriverByName( const char * );
647 int CPL_DLL         CPL_STDCALL GDALGetDriverCount( void );
648 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriver( int );
649 GDALDriverH CPL_DLL CPL_STDCALL GDALCreateDriver( void );
650 void        CPL_DLL CPL_STDCALL GDALDestroyDriver( GDALDriverH );
651 int         CPL_DLL CPL_STDCALL GDALRegisterDriver( GDALDriverH );
652 void        CPL_DLL CPL_STDCALL GDALDeregisterDriver( GDALDriverH );
653 void        CPL_DLL CPL_STDCALL GDALDestroyDriverManager( void );
654 #ifndef DOXYGEN_SKIP
655 void        CPL_DLL             GDALDestroy( void );
656 #endif
657 CPLErr      CPL_DLL CPL_STDCALL GDALDeleteDataset( GDALDriverH, const char * );
658 CPLErr      CPL_DLL CPL_STDCALL GDALRenameDataset( GDALDriverH,
659                                                    const char * pszNewName,
660                                                    const char * pszOldName );
661 CPLErr      CPL_DLL CPL_STDCALL GDALCopyDatasetFiles( GDALDriverH,
662                                                       const char * pszNewName,
663                                                       const char * pszOldName);
664 int         CPL_DLL CPL_STDCALL GDALValidateCreationOptions( GDALDriverH,
665                                                              CSLConstList papszCreationOptions);
666 
667 /* The following are deprecated */
668 const char CPL_DLL * CPL_STDCALL GDALGetDriverShortName( GDALDriverH );
669 const char CPL_DLL * CPL_STDCALL GDALGetDriverLongName( GDALDriverH );
670 const char CPL_DLL * CPL_STDCALL GDALGetDriverHelpTopic( GDALDriverH );
671 const char CPL_DLL * CPL_STDCALL GDALGetDriverCreationOptionList( GDALDriverH );
672 
673 /* ==================================================================== */
674 /*      GDAL_GCP                                                        */
675 /* ==================================================================== */
676 
677 /** Ground Control Point */
678 typedef struct
679 {
680     /** Unique identifier, often numeric */
681     char        *pszId;
682 
683     /** Informational message or "" */
684     char        *pszInfo;
685 
686     /** Pixel (x) location of GCP on raster */
687     double      dfGCPPixel;
688     /** Line (y) location of GCP on raster */
689     double      dfGCPLine;
690 
691     /** X position of GCP in georeferenced space */
692     double      dfGCPX;
693 
694     /** Y position of GCP in georeferenced space */
695     double      dfGCPY;
696 
697     /** Elevation of GCP, or zero if not known */
698     double      dfGCPZ;
699 } GDAL_GCP;
700 
701 void CPL_DLL CPL_STDCALL GDALInitGCPs( int, GDAL_GCP * );
702 void CPL_DLL CPL_STDCALL GDALDeinitGCPs( int, GDAL_GCP * );
703 GDAL_GCP CPL_DLL * CPL_STDCALL GDALDuplicateGCPs( int, const GDAL_GCP * );
704 
705 int CPL_DLL CPL_STDCALL
706 GDALGCPsToGeoTransform( int nGCPCount, const GDAL_GCP *pasGCPs,
707                         double *padfGeoTransform, int bApproxOK )  CPL_WARN_UNUSED_RESULT;
708 int CPL_DLL CPL_STDCALL
709 GDALInvGeoTransform( double *padfGeoTransformIn,
710                      double *padfInvGeoTransformOut ) CPL_WARN_UNUSED_RESULT;
711 void CPL_DLL CPL_STDCALL GDALApplyGeoTransform( double *, double, double,
712                                                 double *, double * );
713 void CPL_DLL GDALComposeGeoTransforms(const double *padfGeoTransform1,
714                                       const double *padfGeoTransform2,
715                                       double *padfGeoTransformOut);
716 
717 /* ==================================================================== */
718 /*      major objects (dataset, and, driver, drivermanager).            */
719 /* ==================================================================== */
720 
721 char CPL_DLL  ** CPL_STDCALL GDALGetMetadataDomainList( GDALMajorObjectH hObject );
722 char CPL_DLL  ** CPL_STDCALL GDALGetMetadata( GDALMajorObjectH, const char * );
723 CPLErr CPL_DLL CPL_STDCALL GDALSetMetadata( GDALMajorObjectH, CSLConstList,
724                                             const char * );
725 const char CPL_DLL * CPL_STDCALL
726 GDALGetMetadataItem( GDALMajorObjectH, const char *, const char * );
727 CPLErr CPL_DLL CPL_STDCALL
728 GDALSetMetadataItem( GDALMajorObjectH, const char *, const char *,
729                      const char * );
730 const char CPL_DLL * CPL_STDCALL GDALGetDescription( GDALMajorObjectH );
731 void CPL_DLL CPL_STDCALL GDALSetDescription( GDALMajorObjectH, const char * );
732 
733 /* ==================================================================== */
734 /*      GDALDataset class ... normally this represents one file.        */
735 /* ==================================================================== */
736 
737 /** Name of driver metadata item for layer creation option list */
738 #define GDAL_DS_LAYER_CREATIONOPTIONLIST "DS_LAYER_CREATIONOPTIONLIST"
739 
740 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDatasetDriver( GDALDatasetH );
741 char CPL_DLL ** CPL_STDCALL GDALGetFileList( GDALDatasetH );
742 void CPL_DLL CPL_STDCALL   GDALClose( GDALDatasetH );
743 int CPL_DLL CPL_STDCALL     GDALGetRasterXSize( GDALDatasetH );
744 int CPL_DLL CPL_STDCALL     GDALGetRasterYSize( GDALDatasetH );
745 int CPL_DLL CPL_STDCALL     GDALGetRasterCount( GDALDatasetH );
746 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetRasterBand( GDALDatasetH, int );
747 
748 CPLErr CPL_DLL  CPL_STDCALL GDALAddBand( GDALDatasetH hDS, GDALDataType eType,
749                              CSLConstList papszOptions );
750 
751 GDALAsyncReaderH CPL_DLL CPL_STDCALL
752 GDALBeginAsyncReader(GDALDatasetH hDS, int nXOff, int nYOff,
753                      int nXSize, int nYSize,
754                      void *pBuf, int nBufXSize, int nBufYSize,
755                      GDALDataType eBufType, int nBandCount, int* panBandMap,
756                      int nPixelSpace, int nLineSpace, int nBandSpace,
757                      CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
758 
759 void  CPL_DLL CPL_STDCALL
760 GDALEndAsyncReader(GDALDatasetH hDS, GDALAsyncReaderH hAsynchReaderH);
761 
762 CPLErr CPL_DLL CPL_STDCALL GDALDatasetRasterIO(
763     GDALDatasetH hDS, GDALRWFlag eRWFlag,
764     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
765     void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType,
766     int nBandCount, int *panBandCount,
767     int nPixelSpace, int nLineSpace, int nBandSpace) CPL_WARN_UNUSED_RESULT;
768 
769 CPLErr CPL_DLL CPL_STDCALL GDALDatasetRasterIOEx(
770     GDALDatasetH hDS, GDALRWFlag eRWFlag,
771     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
772     void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType,
773     int nBandCount, int *panBandCount,
774     GSpacing nPixelSpace, GSpacing nLineSpace, GSpacing nBandSpace,
775     GDALRasterIOExtraArg* psExtraArg) CPL_WARN_UNUSED_RESULT;
776 
777 CPLErr CPL_DLL CPL_STDCALL GDALDatasetAdviseRead( GDALDatasetH hDS,
778     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
779     int nBXSize, int nBYSize, GDALDataType eBDataType,
780     int nBandCount, int *panBandCount, CSLConstList papszOptions );
781 
782 const char CPL_DLL * CPL_STDCALL GDALGetProjectionRef( GDALDatasetH );
783 OGRSpatialReferenceH CPL_DLL GDALGetSpatialRef( GDALDatasetH );
784 CPLErr CPL_DLL CPL_STDCALL GDALSetProjection( GDALDatasetH, const char * );
785 CPLErr CPL_DLL GDALSetSpatialRef( GDALDatasetH, OGRSpatialReferenceH );
786 CPLErr CPL_DLL CPL_STDCALL GDALGetGeoTransform( GDALDatasetH, double * );
787 CPLErr CPL_DLL CPL_STDCALL GDALSetGeoTransform( GDALDatasetH, double * );
788 
789 int CPL_DLL CPL_STDCALL  GDALGetGCPCount( GDALDatasetH );
790 const char CPL_DLL * CPL_STDCALL GDALGetGCPProjection( GDALDatasetH );
791 OGRSpatialReferenceH CPL_DLL GDALGetGCPSpatialRef( GDALDatasetH );
792 const GDAL_GCP CPL_DLL * CPL_STDCALL GDALGetGCPs( GDALDatasetH );
793 CPLErr CPL_DLL CPL_STDCALL GDALSetGCPs( GDALDatasetH, int, const GDAL_GCP *,
794                                         const char * );
795 CPLErr CPL_DLL GDALSetGCPs2( GDALDatasetH, int, const GDAL_GCP *,
796                                          OGRSpatialReferenceH );
797 
798 void CPL_DLL * CPL_STDCALL GDALGetInternalHandle( GDALDatasetH, const char * );
799 int CPL_DLL CPL_STDCALL GDALReferenceDataset( GDALDatasetH );
800 int CPL_DLL CPL_STDCALL GDALDereferenceDataset( GDALDatasetH );
801 int CPL_DLL CPL_STDCALL GDALReleaseDataset( GDALDatasetH );
802 
803 CPLErr CPL_DLL CPL_STDCALL
804 GDALBuildOverviews( GDALDatasetH, const char *, int, int *,
805                     int, int *, GDALProgressFunc, void * ) CPL_WARN_UNUSED_RESULT;
806 void CPL_DLL CPL_STDCALL GDALGetOpenDatasets( GDALDatasetH **hDS, int *pnCount );
807 int CPL_DLL CPL_STDCALL GDALGetAccess( GDALDatasetH hDS );
808 void CPL_DLL CPL_STDCALL GDALFlushCache( GDALDatasetH hDS );
809 
810 CPLErr CPL_DLL CPL_STDCALL
811               GDALCreateDatasetMaskBand( GDALDatasetH hDS, int nFlags );
812 
813 CPLErr CPL_DLL CPL_STDCALL GDALDatasetCopyWholeRaster(
814     GDALDatasetH hSrcDS, GDALDatasetH hDstDS, CSLConstList papszOptions,
815     GDALProgressFunc pfnProgress, void *pProgressData ) CPL_WARN_UNUSED_RESULT;
816 
817 CPLErr CPL_DLL CPL_STDCALL GDALRasterBandCopyWholeRaster(
818     GDALRasterBandH hSrcBand, GDALRasterBandH hDstBand,
819     const char * const * constpapszOptions,
820     GDALProgressFunc pfnProgress, void *pProgressData ) CPL_WARN_UNUSED_RESULT;
821 
822 CPLErr CPL_DLL
823 GDALRegenerateOverviews( GDALRasterBandH hSrcBand,
824                          int nOverviewCount, GDALRasterBandH *pahOverviewBands,
825                          const char *pszResampling,
826                          GDALProgressFunc pfnProgress, void *pProgressData );
827 
828 int    CPL_DLL GDALDatasetGetLayerCount( GDALDatasetH );
829 OGRLayerH CPL_DLL GDALDatasetGetLayer( GDALDatasetH, int );
830 OGRLayerH CPL_DLL GDALDatasetGetLayerByName( GDALDatasetH, const char * );
831 OGRErr    CPL_DLL GDALDatasetDeleteLayer( GDALDatasetH, int );
832 OGRLayerH CPL_DLL GDALDatasetCreateLayer( GDALDatasetH, const char *,
833                                       OGRSpatialReferenceH, OGRwkbGeometryType,
834                                       CSLConstList );
835 OGRLayerH CPL_DLL GDALDatasetCopyLayer( GDALDatasetH, OGRLayerH, const char *,
836                                         CSLConstList );
837 void CPL_DLL GDALDatasetResetReading( GDALDatasetH );
838 OGRFeatureH CPL_DLL GDALDatasetGetNextFeature( GDALDatasetH hDS,
839                                                OGRLayerH* phBelongingLayer,
840                                                double* pdfProgressPct,
841                                                GDALProgressFunc pfnProgress,
842                                                void* pProgressData );
843 int    CPL_DLL GDALDatasetTestCapability( GDALDatasetH, const char * );
844 OGRLayerH CPL_DLL GDALDatasetExecuteSQL( GDALDatasetH, const char *,
845                                      OGRGeometryH, const char * );
846 OGRErr CPL_DLL GDALDatasetAbortSQL( GDALDatasetH );
847 void   CPL_DLL GDALDatasetReleaseResultSet( GDALDatasetH, OGRLayerH );
848 OGRStyleTableH CPL_DLL GDALDatasetGetStyleTable( GDALDatasetH );
849 void   CPL_DLL GDALDatasetSetStyleTableDirectly( GDALDatasetH, OGRStyleTableH );
850 void   CPL_DLL GDALDatasetSetStyleTable( GDALDatasetH, OGRStyleTableH );
851 OGRErr CPL_DLL GDALDatasetStartTransaction(GDALDatasetH hDS, int bForce);
852 OGRErr CPL_DLL GDALDatasetCommitTransaction(GDALDatasetH hDS);
853 OGRErr CPL_DLL GDALDatasetRollbackTransaction(GDALDatasetH hDS);
854 void CPL_DLL GDALDatasetClearStatistics(GDALDatasetH hDS);
855 
856 OGRFieldDomainH CPL_DLL GDALDatasetGetFieldDomain(GDALDatasetH hDS,
857                                                   const char* pszName);
858 bool CPL_DLL GDALDatasetAddFieldDomain(GDALDatasetH hDS,
859                                        OGRFieldDomainH hFieldDomain,
860                                        char** ppszFailureReason);
861 
862 /* ==================================================================== */
863 /*      GDALRasterBand ... one band/channel in a dataset.               */
864 /* ==================================================================== */
865 
866 /**
867  * SRCVAL - Macro which may be used by pixel functions to obtain
868  *          a pixel from a source buffer.
869  */
870 #define SRCVAL(papoSource, eSrcType, ii) \
871       (eSrcType == GDT_Byte ? \
872           CPL_REINTERPRET_CAST(const GByte*,papoSource)[ii] : \
873       (eSrcType == GDT_Float32 ? \
874           CPL_REINTERPRET_CAST(const float*,papoSource)[ii] : \
875       (eSrcType == GDT_Float64 ? \
876           CPL_REINTERPRET_CAST(const double*,papoSource)[ii] : \
877       (eSrcType == GDT_Int32 ? \
878           CPL_REINTERPRET_CAST(const GInt32*,papoSource)[ii] : \
879       (eSrcType == GDT_UInt16 ? \
880           CPL_REINTERPRET_CAST(const GUInt16*,papoSource)[ii] : \
881       (eSrcType == GDT_Int16 ? \
882           CPL_REINTERPRET_CAST(const GInt16*,papoSource)[ii] : \
883       (eSrcType == GDT_UInt32 ? \
884           CPL_REINTERPRET_CAST(const GUInt32*,papoSource)[ii] : \
885       (eSrcType == GDT_CInt16 ? \
886           CPL_REINTERPRET_CAST(const GInt16*,papoSource)[(ii) * 2] : \
887       (eSrcType == GDT_CInt32 ? \
888           CPL_REINTERPRET_CAST(const GInt32*,papoSource)[(ii) * 2] : \
889       (eSrcType == GDT_CFloat32 ? \
890           CPL_REINTERPRET_CAST(const float*,papoSource)[(ii) * 2] : \
891       (eSrcType == GDT_CFloat64 ? \
892           CPL_REINTERPRET_CAST(const double*,papoSource)[(ii) * 2] : 0)))))))))))
893 
894 /** Type of functions to pass to GDALAddDerivedBandPixelFunc.
895  * @since GDAL 2.2 */
896 typedef CPLErr
897 (*GDALDerivedPixelFunc)(void **papoSources, int nSources, void *pData,
898                         int nBufXSize, int nBufYSize,
899                         GDALDataType eSrcType, GDALDataType eBufType,
900                         int nPixelSpace, int nLineSpace);
901 
902 GDALDataType CPL_DLL CPL_STDCALL GDALGetRasterDataType( GDALRasterBandH );
903 void CPL_DLL CPL_STDCALL
904 GDALGetBlockSize( GDALRasterBandH, int * pnXSize, int * pnYSize );
905 
906 CPLErr CPL_DLL CPL_STDCALL
907 GDALGetActualBlockSize( GDALRasterBandH, int nXBlockOff, int nYBlockOff,
908                         int *pnXValid, int *pnYValid );
909 
910 CPLErr CPL_DLL CPL_STDCALL GDALRasterAdviseRead( GDALRasterBandH hRB,
911     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
912     int nBXSize, int nBYSize, GDALDataType eBDataType, CSLConstList papszOptions );
913 
914 CPLErr CPL_DLL CPL_STDCALL
915 GDALRasterIO( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
916               int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
917               void * pBuffer, int nBXSize, int nBYSize,GDALDataType eBDataType,
918               int nPixelSpace, int nLineSpace ) CPL_WARN_UNUSED_RESULT;
919 CPLErr CPL_DLL CPL_STDCALL
920 GDALRasterIOEx( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
921               int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
922               void * pBuffer, int nBXSize, int nBYSize,GDALDataType eBDataType,
923               GSpacing nPixelSpace, GSpacing nLineSpace,
924               GDALRasterIOExtraArg* psExtraArg ) CPL_WARN_UNUSED_RESULT;
925 CPLErr CPL_DLL CPL_STDCALL GDALReadBlock( GDALRasterBandH, int, int, void * ) CPL_WARN_UNUSED_RESULT;
926 CPLErr CPL_DLL CPL_STDCALL GDALWriteBlock( GDALRasterBandH, int, int, void * ) CPL_WARN_UNUSED_RESULT;
927 int CPL_DLL CPL_STDCALL GDALGetRasterBandXSize( GDALRasterBandH );
928 int CPL_DLL CPL_STDCALL GDALGetRasterBandYSize( GDALRasterBandH );
929 GDALAccess CPL_DLL CPL_STDCALL GDALGetRasterAccess( GDALRasterBandH );
930 int CPL_DLL CPL_STDCALL GDALGetBandNumber( GDALRasterBandH );
931 GDALDatasetH CPL_DLL CPL_STDCALL GDALGetBandDataset( GDALRasterBandH );
932 
933 GDALColorInterp CPL_DLL CPL_STDCALL
934 GDALGetRasterColorInterpretation( GDALRasterBandH );
935 CPLErr CPL_DLL CPL_STDCALL
936 GDALSetRasterColorInterpretation( GDALRasterBandH, GDALColorInterp );
937 GDALColorTableH CPL_DLL CPL_STDCALL GDALGetRasterColorTable( GDALRasterBandH );
938 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterColorTable( GDALRasterBandH, GDALColorTableH );
939 int CPL_DLL CPL_STDCALL GDALHasArbitraryOverviews( GDALRasterBandH );
940 int CPL_DLL CPL_STDCALL GDALGetOverviewCount( GDALRasterBandH );
941 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetOverview( GDALRasterBandH, int );
942 double CPL_DLL CPL_STDCALL GDALGetRasterNoDataValue( GDALRasterBandH, int * );
943 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterNoDataValue( GDALRasterBandH, double );
944 CPLErr CPL_DLL CPL_STDCALL GDALDeleteRasterNoDataValue( GDALRasterBandH );
945 char CPL_DLL ** CPL_STDCALL GDALGetRasterCategoryNames( GDALRasterBandH );
946 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterCategoryNames( GDALRasterBandH, CSLConstList );
947 double CPL_DLL CPL_STDCALL GDALGetRasterMinimum( GDALRasterBandH, int *pbSuccess );
948 double CPL_DLL CPL_STDCALL GDALGetRasterMaximum( GDALRasterBandH, int *pbSuccess );
949 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterStatistics(
950     GDALRasterBandH, int bApproxOK, int bForce,
951     double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev );
952 CPLErr CPL_DLL CPL_STDCALL GDALComputeRasterStatistics(
953     GDALRasterBandH, int bApproxOK,
954     double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev,
955     GDALProgressFunc pfnProgress, void *pProgressData );
956 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterStatistics(
957     GDALRasterBandH hBand,
958     double dfMin, double dfMax, double dfMean, double dfStdDev );
959 
960 GDALMDArrayH CPL_DLL GDALRasterBandAsMDArray(GDALRasterBandH) CPL_WARN_UNUSED_RESULT;
961 
962 const char CPL_DLL * CPL_STDCALL GDALGetRasterUnitType( GDALRasterBandH );
963 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterUnitType( GDALRasterBandH hBand, const char *pszNewValue );
964 double CPL_DLL CPL_STDCALL GDALGetRasterOffset( GDALRasterBandH, int *pbSuccess );
965 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterOffset( GDALRasterBandH hBand, double dfNewOffset);
966 double CPL_DLL CPL_STDCALL GDALGetRasterScale( GDALRasterBandH, int *pbSuccess );
967 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterScale( GDALRasterBandH hBand, double dfNewOffset );
968 void CPL_DLL CPL_STDCALL
969 GDALComputeRasterMinMax( GDALRasterBandH hBand, int bApproxOK,
970                          double adfMinMax[2] );
971 CPLErr CPL_DLL CPL_STDCALL GDALFlushRasterCache( GDALRasterBandH hBand );
972 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterHistogram( GDALRasterBandH hBand,
973                                        double dfMin, double dfMax,
974                                        int nBuckets, int *panHistogram,
975                                        int bIncludeOutOfRange, int bApproxOK,
976                                        GDALProgressFunc pfnProgress,
977                                        void * pProgressData )
978 /*! @cond Doxygen_Suppress */
979     CPL_WARN_DEPRECATED("Use GDALGetRasterHistogramEx() instead")
980 /*! @endcond */
981     ;
982 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterHistogramEx( GDALRasterBandH hBand,
983                                        double dfMin, double dfMax,
984                                        int nBuckets, GUIntBig *panHistogram,
985                                        int bIncludeOutOfRange, int bApproxOK,
986                                        GDALProgressFunc pfnProgress,
987                                        void * pProgressData );
988 CPLErr CPL_DLL CPL_STDCALL GDALGetDefaultHistogram( GDALRasterBandH hBand,
989                                        double *pdfMin, double *pdfMax,
990                                        int *pnBuckets, int **ppanHistogram,
991                                        int bForce,
992                                        GDALProgressFunc pfnProgress,
993                                        void * pProgressData )
994 /*! @cond Doxygen_Suppress */
995     CPL_WARN_DEPRECATED("Use GDALGetDefaultHistogramEx() instead")
996 /*! @endcond */
997     ;
998 CPLErr CPL_DLL CPL_STDCALL GDALGetDefaultHistogramEx( GDALRasterBandH hBand,
999                                        double *pdfMin, double *pdfMax,
1000                                        int *pnBuckets, GUIntBig **ppanHistogram,
1001                                        int bForce,
1002                                        GDALProgressFunc pfnProgress,
1003                                        void * pProgressData );
1004 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultHistogram( GDALRasterBandH hBand,
1005                                        double dfMin, double dfMax,
1006                                        int nBuckets, int *panHistogram )
1007 /*! @cond Doxygen_Suppress */
1008     CPL_WARN_DEPRECATED("Use GDALSetDefaultHistogramEx() instead")
1009 /*! @endcond */
1010     ;
1011 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultHistogramEx( GDALRasterBandH hBand,
1012                                        double dfMin, double dfMax,
1013                                        int nBuckets, GUIntBig *panHistogram );
1014 int CPL_DLL CPL_STDCALL
1015 GDALGetRandomRasterSample( GDALRasterBandH, int, float * );
1016 GDALRasterBandH CPL_DLL CPL_STDCALL
1017 GDALGetRasterSampleOverview( GDALRasterBandH, int );
1018 GDALRasterBandH CPL_DLL CPL_STDCALL
1019 GDALGetRasterSampleOverviewEx( GDALRasterBandH, GUIntBig );
1020 CPLErr CPL_DLL CPL_STDCALL GDALFillRaster( GDALRasterBandH hBand,
1021                           double dfRealValue, double dfImaginaryValue );
1022 CPLErr CPL_DLL CPL_STDCALL
1023 GDALComputeBandStats( GDALRasterBandH hBand, int nSampleStep,
1024                              double *pdfMean, double *pdfStdDev,
1025                              GDALProgressFunc pfnProgress,
1026                              void *pProgressData );
1027 CPLErr CPL_DLL  GDALOverviewMagnitudeCorrection( GDALRasterBandH hBaseBand,
1028                                         int nOverviewCount,
1029                                         GDALRasterBandH *pahOverviews,
1030                                         GDALProgressFunc pfnProgress,
1031                                         void *pProgressData );
1032 
1033 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL GDALGetDefaultRAT(
1034     GDALRasterBandH hBand );
1035 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultRAT( GDALRasterBandH,
1036                                               GDALRasterAttributeTableH );
1037 CPLErr CPL_DLL CPL_STDCALL GDALAddDerivedBandPixelFunc( const char *pszName,
1038                                     GDALDerivedPixelFunc pfnPixelFunc );
1039 
1040 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetMaskBand( GDALRasterBandH hBand );
1041 int CPL_DLL CPL_STDCALL GDALGetMaskFlags( GDALRasterBandH hBand );
1042 CPLErr CPL_DLL CPL_STDCALL
1043                        GDALCreateMaskBand( GDALRasterBandH hBand, int nFlags );
1044 
1045 /** Flag returned by GDALGetMaskFlags() to indicate that all pixels are valid */
1046 #define GMF_ALL_VALID     0x01
1047 /** Flag returned by GDALGetMaskFlags() to indicate that the mask band is
1048  * valid for all bands */
1049 #define GMF_PER_DATASET   0x02
1050 /** Flag returned by GDALGetMaskFlags() to indicate that the mask band is
1051  * an alpha band */
1052 #define GMF_ALPHA         0x04
1053 /** Flag returned by GDALGetMaskFlags() to indicate that the mask band is
1054  * computed from nodata values */
1055 #define GMF_NODATA        0x08
1056 
1057 /** Flag returned by GDALGetDataCoverageStatus() when the driver does not
1058  * implement GetDataCoverageStatus(). This flag should be returned together
1059  * with GDAL_DATA_COVERAGE_STATUS_DATA */
1060 #define GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED 0x01
1061 
1062 /** Flag returned by GDALGetDataCoverageStatus() when there is (potentially)
1063  * data in the queried window. Can be combined with the binary or operator
1064  * with GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED or
1065  * GDAL_DATA_COVERAGE_STATUS_EMPTY */
1066 #define GDAL_DATA_COVERAGE_STATUS_DATA          0x02
1067 
1068 /** Flag returned by GDALGetDataCoverageStatus() when there is nodata in the
1069  * queried window. This is typically identified by the concept of missing block
1070  * in formats that supports it.
1071  * Can be combined with the binary or operator with
1072  * GDAL_DATA_COVERAGE_STATUS_DATA */
1073 #define GDAL_DATA_COVERAGE_STATUS_EMPTY         0x04
1074 
1075 int CPL_DLL CPL_STDCALL GDALGetDataCoverageStatus( GDALRasterBandH hBand,
1076                                                    int nXOff, int nYOff,
1077                                                    int nXSize, int nYSize,
1078                                                    int nMaskFlagStop,
1079                                                    double* pdfDataPct );
1080 
1081 /* ==================================================================== */
1082 /*     GDALAsyncReader                                                  */
1083 /* ==================================================================== */
1084 
1085 GDALAsyncStatusType CPL_DLL CPL_STDCALL
1086 GDALARGetNextUpdatedRegion(GDALAsyncReaderH hARIO, double dfTimeout,
1087                          int* pnXBufOff, int* pnYBufOff,
1088                          int* pnXBufSize, int* pnYBufSize );
1089 int CPL_DLL CPL_STDCALL GDALARLockBuffer(GDALAsyncReaderH hARIO,
1090                                         double dfTimeout);
1091 void CPL_DLL CPL_STDCALL GDALARUnlockBuffer(GDALAsyncReaderH hARIO);
1092 
1093 /* -------------------------------------------------------------------- */
1094 /*      Helper functions.                                               */
1095 /* -------------------------------------------------------------------- */
1096 int CPL_DLL CPL_STDCALL GDALGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv,
1097                                          int nOptions );
1098 void CPL_DLL CPL_STDCALL GDALSwapWords( void *pData, int nWordSize, int nWordCount,
1099                             int nWordSkip );
1100 void CPL_DLL CPL_STDCALL GDALSwapWordsEx( void *pData, int nWordSize, size_t nWordCount,
1101                                   int nWordSkip );
1102 
1103 void CPL_DLL CPL_STDCALL
1104     GDALCopyWords( const void * CPL_RESTRICT pSrcData,
1105                    GDALDataType eSrcType, int nSrcPixelOffset,
1106                    void * CPL_RESTRICT pDstData,
1107                    GDALDataType eDstType, int nDstPixelOffset,
1108                    int nWordCount );
1109 
1110 void CPL_DLL CPL_STDCALL
1111     GDALCopyWords64( const void * CPL_RESTRICT pSrcData,
1112                      GDALDataType eSrcType, int nSrcPixelOffset,
1113                      void * CPL_RESTRICT pDstData,
1114                      GDALDataType eDstType, int nDstPixelOffset,
1115                      GPtrDiff_t nWordCount );
1116 
1117 void CPL_DLL
1118 GDALCopyBits( const GByte *pabySrcData, int nSrcOffset, int nSrcStep,
1119               GByte *pabyDstData, int nDstOffset, int nDstStep,
1120               int nBitCount, int nStepCount );
1121 
1122 int CPL_DLL CPL_STDCALL GDALLoadWorldFile( const char *, double * );
1123 int CPL_DLL CPL_STDCALL GDALReadWorldFile( const char *, const char *,
1124                                            double * );
1125 int CPL_DLL CPL_STDCALL GDALWriteWorldFile( const char *, const char *,
1126                                             double * );
1127 int CPL_DLL CPL_STDCALL GDALLoadTabFile( const char *, double *, char **,
1128                                          int *, GDAL_GCP ** );
1129 int CPL_DLL CPL_STDCALL GDALReadTabFile( const char *, double *, char **,
1130                                          int *, GDAL_GCP ** );
1131 int CPL_DLL CPL_STDCALL GDALLoadOziMapFile( const char *, double *, char **,
1132                                             int *, GDAL_GCP ** );
1133 int CPL_DLL CPL_STDCALL GDALReadOziMapFile( const char *,  double *,
1134                                             char **, int *, GDAL_GCP ** );
1135 
1136 const char CPL_DLL * CPL_STDCALL GDALDecToDMS( double, const char *, int );
1137 double CPL_DLL CPL_STDCALL GDALPackedDMSToDec( double );
1138 double CPL_DLL CPL_STDCALL GDALDecToPackedDMS( double );
1139 
1140 /* Note to developers : please keep this section in sync with ogr_core.h */
1141 
1142 #ifndef GDAL_VERSION_INFO_DEFINED
1143 #ifndef DOXYGEN_SKIP
1144 #define GDAL_VERSION_INFO_DEFINED
1145 #endif
1146 const char CPL_DLL * CPL_STDCALL GDALVersionInfo( const char * );
1147 #endif
1148 
1149 #ifndef GDAL_CHECK_VERSION
1150 
1151 int CPL_DLL CPL_STDCALL GDALCheckVersion( int nVersionMajor, int nVersionMinor,
1152                                           const char* pszCallingComponentName);
1153 
1154 /** Helper macro for GDALCheckVersion()
1155   @see GDALCheckVersion()
1156   */
1157 #define GDAL_CHECK_VERSION(pszCallingComponentName) \
1158  GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName)
1159 
1160 #endif
1161 
1162 /*! @cond Doxygen_Suppress */
1163 #ifdef GDAL_COMPILATION
1164 #define GDALExtractRPCInfoV1 GDALExtractRPCInfo
1165 #else
1166 #define GDALRPCInfo        GDALRPCInfoV2
1167 #define GDALExtractRPCInfo GDALExtractRPCInfoV2
1168 #endif
1169 
1170 /* Deprecated: use GDALRPCInfoV2 */
1171 typedef struct
1172 {
1173     double dfLINE_OFF;   /*!< Line offset */
1174     double dfSAMP_OFF;   /*!< Sample/Pixel offset */
1175     double dfLAT_OFF;    /*!< Latitude offset */
1176     double dfLONG_OFF;   /*!< Longitude offset */
1177     double dfHEIGHT_OFF; /*!< Height offset */
1178 
1179     double dfLINE_SCALE;   /*!< Line scale */
1180     double dfSAMP_SCALE;   /*!< Sample/Pixel scale */
1181     double dfLAT_SCALE;    /*!< Latitude scale */
1182     double dfLONG_SCALE;   /*!< Longitude scale */
1183     double dfHEIGHT_SCALE; /*!< Height scale */
1184 
1185     double adfLINE_NUM_COEFF[20]; /*!< Line Numerator Coefficients */
1186     double adfLINE_DEN_COEFF[20]; /*!< Line Denominator Coefficients */
1187     double adfSAMP_NUM_COEFF[20]; /*!< Sample/Pixel Numerator Coefficients */
1188     double adfSAMP_DEN_COEFF[20]; /*!< Sample/Pixel Denominator Coefficients */
1189 
1190     double dfMIN_LONG; /*!< Minimum longitude */
1191     double dfMIN_LAT;  /*!< Minimum latitude */
1192     double dfMAX_LONG; /*!< Maximum longitude */
1193     double dfMAX_LAT;  /*!< Maximum latitude */
1194 } GDALRPCInfoV1;
1195 /*! @endcond */
1196 
1197 /** Structure to store Rational Polynomial Coefficients / Rigorous Projection
1198  * Model. See http://geotiff.maptools.org/rpc_prop.html */
1199 typedef struct
1200 {
1201     double dfLINE_OFF;   /*!< Line offset */
1202     double dfSAMP_OFF;   /*!< Sample/Pixel offset */
1203     double dfLAT_OFF;    /*!< Latitude offset */
1204     double dfLONG_OFF;   /*!< Longitude offset */
1205     double dfHEIGHT_OFF; /*!< Height offset */
1206 
1207     double dfLINE_SCALE;   /*!< Line scale */
1208     double dfSAMP_SCALE;   /*!< Sample/Pixel scale */
1209     double dfLAT_SCALE;    /*!< Latitude scale */
1210     double dfLONG_SCALE;   /*!< Longitude scale */
1211     double dfHEIGHT_SCALE; /*!< Height scale */
1212 
1213     double adfLINE_NUM_COEFF[20]; /*!< Line Numerator Coefficients */
1214     double adfLINE_DEN_COEFF[20]; /*!< Line Denominator Coefficients */
1215     double adfSAMP_NUM_COEFF[20]; /*!< Sample/Pixel Numerator Coefficients */
1216     double adfSAMP_DEN_COEFF[20]; /*!< Sample/Pixel Denominator Coefficients */
1217 
1218     double dfMIN_LONG; /*!< Minimum longitude */
1219     double dfMIN_LAT;  /*!< Minimum latitude */
1220     double dfMAX_LONG; /*!< Maximum longitude */
1221     double dfMAX_LAT;  /*!< Maximum latitude */
1222 
1223     /* Those fields should be at the end. And all above fields should be the same as in GDALRPCInfoV1 */
1224     double dfERR_BIAS;   /*!< Bias error */
1225     double dfERR_RAND;   /*!< Random error */
1226 } GDALRPCInfoV2;
1227 
1228 /*! @cond Doxygen_Suppress */
1229 int CPL_DLL CPL_STDCALL GDALExtractRPCInfoV1( CSLConstList, GDALRPCInfoV1 * );
1230 /*! @endcond */
1231 int CPL_DLL CPL_STDCALL GDALExtractRPCInfoV2( CSLConstList, GDALRPCInfoV2 * );
1232 
1233 /* ==================================================================== */
1234 /*      Color tables.                                                   */
1235 /* ==================================================================== */
1236 
1237 /** Color tuple */
1238 typedef struct
1239 {
1240     /*! gray, red, cyan or hue */
1241     short      c1;
1242 
1243     /*! green, magenta, or lightness */
1244     short      c2;
1245 
1246     /*! blue, yellow, or saturation */
1247     short      c3;
1248 
1249     /*! alpha or blackband */
1250     short      c4;
1251 } GDALColorEntry;
1252 
1253 GDALColorTableH CPL_DLL CPL_STDCALL GDALCreateColorTable( GDALPaletteInterp ) CPL_WARN_UNUSED_RESULT;
1254 void CPL_DLL CPL_STDCALL GDALDestroyColorTable( GDALColorTableH );
1255 GDALColorTableH CPL_DLL CPL_STDCALL GDALCloneColorTable( GDALColorTableH );
1256 GDALPaletteInterp CPL_DLL CPL_STDCALL GDALGetPaletteInterpretation( GDALColorTableH );
1257 int CPL_DLL CPL_STDCALL GDALGetColorEntryCount( GDALColorTableH );
1258 const GDALColorEntry CPL_DLL * CPL_STDCALL GDALGetColorEntry( GDALColorTableH, int );
1259 int CPL_DLL CPL_STDCALL GDALGetColorEntryAsRGB( GDALColorTableH, int, GDALColorEntry *);
1260 void CPL_DLL CPL_STDCALL GDALSetColorEntry( GDALColorTableH, int, const GDALColorEntry * );
1261 void CPL_DLL CPL_STDCALL GDALCreateColorRamp( GDALColorTableH hTable,
1262             int nStartIndex, const GDALColorEntry *psStartColor,
1263             int nEndIndex, const GDALColorEntry *psEndColor );
1264 
1265 /* ==================================================================== */
1266 /*      Raster Attribute Table                                          */
1267 /* ==================================================================== */
1268 
1269 /** Field type of raster attribute table */
1270 typedef enum {
1271     /*! Integer field */                   GFT_Integer,
1272     /*! Floating point (double) field */   GFT_Real,
1273     /*! String field */                    GFT_String
1274 } GDALRATFieldType;
1275 
1276 /** Field usage of raster attribute table */
1277 typedef enum {
1278     /*! General purpose field. */          GFU_Generic = 0,
1279     /*! Histogram pixel count */           GFU_PixelCount = 1,
1280     /*! Class name */                      GFU_Name = 2,
1281     /*! Class range minimum */             GFU_Min = 3,
1282     /*! Class range maximum */             GFU_Max = 4,
1283     /*! Class value (min=max) */           GFU_MinMax = 5,
1284     /*! Red class color (0-255) */         GFU_Red = 6,
1285     /*! Green class color (0-255) */       GFU_Green = 7,
1286     /*! Blue class color (0-255) */        GFU_Blue = 8,
1287     /*! Alpha (0=transparent,255=opaque)*/ GFU_Alpha = 9,
1288     /*! Color Range Red Minimum */         GFU_RedMin = 10,
1289     /*! Color Range Green Minimum */       GFU_GreenMin = 11,
1290     /*! Color Range Blue Minimum */        GFU_BlueMin = 12,
1291     /*! Color Range Alpha Minimum */       GFU_AlphaMin = 13,
1292     /*! Color Range Red Maximum */         GFU_RedMax = 14,
1293     /*! Color Range Green Maximum */       GFU_GreenMax = 15,
1294     /*! Color Range Blue Maximum */        GFU_BlueMax = 16,
1295     /*! Color Range Alpha Maximum */       GFU_AlphaMax = 17,
1296     /*! Maximum GFU value (equals to GFU_AlphaMax+1 currently) */ GFU_MaxCount
1297 } GDALRATFieldUsage;
1298 
1299 /** RAT table type (thematic or athematic)
1300   * @since GDAL 2.4
1301   */
1302 typedef enum {
1303     /*! Thematic table type */            GRTT_THEMATIC,
1304     /*! Athematic table type */           GRTT_ATHEMATIC
1305 } GDALRATTableType;
1306 
1307 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL
1308                                            GDALCreateRasterAttributeTable(void) CPL_WARN_UNUSED_RESULT;
1309 
1310 void CPL_DLL CPL_STDCALL GDALDestroyRasterAttributeTable(
1311     GDALRasterAttributeTableH );
1312 
1313 int CPL_DLL CPL_STDCALL GDALRATGetColumnCount( GDALRasterAttributeTableH );
1314 
1315 const char CPL_DLL * CPL_STDCALL GDALRATGetNameOfCol(
1316     GDALRasterAttributeTableH, int );
1317 GDALRATFieldUsage CPL_DLL CPL_STDCALL GDALRATGetUsageOfCol(
1318     GDALRasterAttributeTableH, int );
1319 GDALRATFieldType CPL_DLL CPL_STDCALL GDALRATGetTypeOfCol(
1320     GDALRasterAttributeTableH, int );
1321 
1322 int CPL_DLL CPL_STDCALL GDALRATGetColOfUsage( GDALRasterAttributeTableH,
1323                                               GDALRATFieldUsage );
1324 int CPL_DLL CPL_STDCALL GDALRATGetRowCount( GDALRasterAttributeTableH );
1325 
1326 const char CPL_DLL * CPL_STDCALL GDALRATGetValueAsString(
1327     GDALRasterAttributeTableH, int, int);
1328 int CPL_DLL CPL_STDCALL GDALRATGetValueAsInt(
1329     GDALRasterAttributeTableH, int, int);
1330 double CPL_DLL CPL_STDCALL GDALRATGetValueAsDouble(
1331     GDALRasterAttributeTableH, int, int);
1332 
1333 void CPL_DLL CPL_STDCALL GDALRATSetValueAsString( GDALRasterAttributeTableH, int, int,
1334                                                   const char * );
1335 void CPL_DLL CPL_STDCALL GDALRATSetValueAsInt( GDALRasterAttributeTableH, int, int,
1336                                                int );
1337 void CPL_DLL CPL_STDCALL GDALRATSetValueAsDouble( GDALRasterAttributeTableH, int, int,
1338                                                   double );
1339 
1340 int CPL_DLL CPL_STDCALL GDALRATChangesAreWrittenToFile( GDALRasterAttributeTableH hRAT );
1341 
1342 CPLErr CPL_DLL CPL_STDCALL GDALRATValuesIOAsDouble( GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag,
1343                                         int iField, int iStartRow, int iLength, double *pdfData );
1344 CPLErr CPL_DLL CPL_STDCALL GDALRATValuesIOAsInteger( GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag,
1345                                         int iField, int iStartRow, int iLength, int *pnData);
1346 CPLErr CPL_DLL CPL_STDCALL GDALRATValuesIOAsString( GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag,
1347                                         int iField, int iStartRow, int iLength, CSLConstList papszStrList);
1348 
1349 void CPL_DLL CPL_STDCALL GDALRATSetRowCount( GDALRasterAttributeTableH,
1350                                              int );
1351 CPLErr CPL_DLL CPL_STDCALL GDALRATCreateColumn( GDALRasterAttributeTableH,
1352                                                 const char *,
1353                                                 GDALRATFieldType,
1354                                                 GDALRATFieldUsage );
1355 CPLErr CPL_DLL CPL_STDCALL GDALRATSetLinearBinning( GDALRasterAttributeTableH,
1356                                                     double, double );
1357 int CPL_DLL CPL_STDCALL GDALRATGetLinearBinning( GDALRasterAttributeTableH,
1358                                                  double *, double * );
1359 CPLErr CPL_DLL CPL_STDCALL GDALRATSetTableType( GDALRasterAttributeTableH hRAT,
1360                          const GDALRATTableType eInTableType );
1361 GDALRATTableType CPL_DLL CPL_STDCALL GDALRATGetTableType( GDALRasterAttributeTableH hRAT);
1362 CPLErr CPL_DLL CPL_STDCALL GDALRATInitializeFromColorTable(
1363     GDALRasterAttributeTableH, GDALColorTableH );
1364 GDALColorTableH CPL_DLL CPL_STDCALL GDALRATTranslateToColorTable(
1365     GDALRasterAttributeTableH, int nEntryCount );
1366 void CPL_DLL CPL_STDCALL GDALRATDumpReadable( GDALRasterAttributeTableH,
1367                                               FILE * );
1368 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL
1369     GDALRATClone( const GDALRasterAttributeTableH );
1370 
1371 void CPL_DLL* CPL_STDCALL
1372     GDALRATSerializeJSON( GDALRasterAttributeTableH ) CPL_WARN_UNUSED_RESULT;
1373 
1374 int CPL_DLL CPL_STDCALL GDALRATGetRowOfValue( GDALRasterAttributeTableH, double );
1375 void CPL_DLL CPL_STDCALL GDALRATRemoveStatistics( GDALRasterAttributeTableH );
1376 
1377 /* ==================================================================== */
1378 /*      GDAL Cache Management                                           */
1379 /* ==================================================================== */
1380 
1381 void CPL_DLL CPL_STDCALL GDALSetCacheMax( int nBytes );
1382 int CPL_DLL CPL_STDCALL GDALGetCacheMax(void);
1383 int CPL_DLL CPL_STDCALL GDALGetCacheUsed(void);
1384 void CPL_DLL CPL_STDCALL GDALSetCacheMax64( GIntBig nBytes );
1385 GIntBig CPL_DLL CPL_STDCALL GDALGetCacheMax64(void);
1386 GIntBig CPL_DLL CPL_STDCALL GDALGetCacheUsed64(void);
1387 
1388 int CPL_DLL CPL_STDCALL GDALFlushCacheBlock(void);
1389 
1390 /* ==================================================================== */
1391 /*      GDAL virtual memory                                             */
1392 /* ==================================================================== */
1393 
1394 CPLVirtualMem CPL_DLL* GDALDatasetGetVirtualMem( GDALDatasetH hDS,
1395                                                  GDALRWFlag eRWFlag,
1396                                                  int nXOff, int nYOff,
1397                                                  int nXSize, int nYSize,
1398                                                  int nBufXSize, int nBufYSize,
1399                                                  GDALDataType eBufType,
1400                                                  int nBandCount, int* panBandMap,
1401                                                  int nPixelSpace,
1402                                                  GIntBig nLineSpace,
1403                                                  GIntBig nBandSpace,
1404                                                  size_t nCacheSize,
1405                                                  size_t nPageSizeHint,
1406                                                  int bSingleThreadUsage,
1407                                                  CSLConstList papszOptions ) CPL_WARN_UNUSED_RESULT;
1408 
1409 CPLVirtualMem CPL_DLL* GDALRasterBandGetVirtualMem( GDALRasterBandH hBand,
1410                                          GDALRWFlag eRWFlag,
1411                                          int nXOff, int nYOff,
1412                                          int nXSize, int nYSize,
1413                                          int nBufXSize, int nBufYSize,
1414                                          GDALDataType eBufType,
1415                                          int nPixelSpace,
1416                                          GIntBig nLineSpace,
1417                                          size_t nCacheSize,
1418                                          size_t nPageSizeHint,
1419                                          int bSingleThreadUsage,
1420                                          CSLConstList papszOptions ) CPL_WARN_UNUSED_RESULT;
1421 
1422 CPLVirtualMem CPL_DLL* GDALGetVirtualMemAuto( GDALRasterBandH hBand,
1423                                               GDALRWFlag eRWFlag,
1424                                               int *pnPixelSpace,
1425                                               GIntBig *pnLineSpace,
1426                                               CSLConstList papszOptions ) CPL_WARN_UNUSED_RESULT;
1427 
1428 /**! Enumeration to describe the tile organization */
1429 typedef enum
1430 {
1431     /*! Tile Interleaved by Pixel: tile (0,0) with internal band interleaved by pixel organization, tile (1, 0), ...  */
1432     GTO_TIP,
1433     /*! Band Interleaved by Tile : tile (0,0) of first band, tile (0,0) of second band, ... tile (1,0) of first band, tile (1,0) of second band, ... */
1434     GTO_BIT,
1435     /*! Band SeQuential : all the tiles of first band, all the tiles of following band... */
1436     GTO_BSQ
1437 } GDALTileOrganization;
1438 
1439 CPLVirtualMem CPL_DLL* GDALDatasetGetTiledVirtualMem( GDALDatasetH hDS,
1440                                                       GDALRWFlag eRWFlag,
1441                                                       int nXOff, int nYOff,
1442                                                       int nXSize, int nYSize,
1443                                                       int nTileXSize, int nTileYSize,
1444                                                       GDALDataType eBufType,
1445                                                       int nBandCount, int* panBandMap,
1446                                                       GDALTileOrganization eTileOrganization,
1447                                                       size_t nCacheSize,
1448                                                       int bSingleThreadUsage,
1449                                                       CSLConstList papszOptions ) CPL_WARN_UNUSED_RESULT;
1450 
1451 CPLVirtualMem CPL_DLL* GDALRasterBandGetTiledVirtualMem( GDALRasterBandH hBand,
1452                                                          GDALRWFlag eRWFlag,
1453                                                          int nXOff, int nYOff,
1454                                                          int nXSize, int nYSize,
1455                                                          int nTileXSize, int nTileYSize,
1456                                                          GDALDataType eBufType,
1457                                                          size_t nCacheSize,
1458                                                          int bSingleThreadUsage,
1459                                                          CSLConstList papszOptions ) CPL_WARN_UNUSED_RESULT;
1460 
1461 /* ==================================================================== */
1462 /*      VRTPansharpenedDataset class.                                   */
1463 /* ==================================================================== */
1464 
1465 GDALDatasetH CPL_DLL GDALCreatePansharpenedVRT( const char* pszXML,
1466                                             GDALRasterBandH hPanchroBand,
1467                                             int nInputSpectralBands,
1468                                             GDALRasterBandH* pahInputSpectralBands ) CPL_WARN_UNUSED_RESULT;
1469 
1470 /* =================================================================== */
1471 /*      Misc API                                                        */
1472 /* ==================================================================== */
1473 
1474 CPLXMLNode CPL_DLL* GDALGetJPEG2000Structure(const char* pszFilename,
1475                                              CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1476 
1477 /* ==================================================================== */
1478 /*      Multidimensional API_api                                       */
1479 /* ==================================================================== */
1480 
1481 GDALDatasetH CPL_DLL GDALCreateMultiDimensional( GDALDriverH hDriver,
1482                                                  const char * pszName,
1483                                                  CSLConstList papszRootGroupOptions,
1484                                                  CSLConstList papszOptions ) CPL_WARN_UNUSED_RESULT;
1485 
1486 GDALExtendedDataTypeH CPL_DLL GDALExtendedDataTypeCreate(GDALDataType eType) CPL_WARN_UNUSED_RESULT;
1487 GDALExtendedDataTypeH CPL_DLL GDALExtendedDataTypeCreateString(size_t nMaxStringLength) CPL_WARN_UNUSED_RESULT;
1488 GDALExtendedDataTypeH CPL_DLL GDALExtendedDataTypeCreateCompound(
1489     const char* pszName, size_t nTotalSize,
1490     size_t nComponents, const GDALEDTComponentH* comps) CPL_WARN_UNUSED_RESULT;
1491 void CPL_DLL GDALExtendedDataTypeRelease(GDALExtendedDataTypeH hEDT);
1492 const char CPL_DLL* GDALExtendedDataTypeGetName(GDALExtendedDataTypeH hEDT);
1493 GDALExtendedDataTypeClass CPL_DLL GDALExtendedDataTypeGetClass(GDALExtendedDataTypeH hEDT);
1494 GDALDataType CPL_DLL GDALExtendedDataTypeGetNumericDataType(GDALExtendedDataTypeH hEDT);
1495 size_t CPL_DLL GDALExtendedDataTypeGetSize(GDALExtendedDataTypeH hEDT);
1496 size_t CPL_DLL GDALExtendedDataTypeGetMaxStringLength(GDALExtendedDataTypeH hEDT);
1497 GDALEDTComponentH CPL_DLL *GDALExtendedDataTypeGetComponents(GDALExtendedDataTypeH hEDT, size_t* pnCount) CPL_WARN_UNUSED_RESULT;
1498 void CPL_DLL GDALExtendedDataTypeFreeComponents(GDALEDTComponentH* components, size_t nCount);
1499 int CPL_DLL GDALExtendedDataTypeCanConvertTo(GDALExtendedDataTypeH hSourceEDT,
1500                                              GDALExtendedDataTypeH hTargetEDT);
1501 int CPL_DLL GDALExtendedDataTypeEquals(GDALExtendedDataTypeH hFirstEDT,
1502                                        GDALExtendedDataTypeH hSecondEDT);
1503 
1504 GDALEDTComponentH CPL_DLL GDALEDTComponentCreate(const char* pszName, size_t nOffset, GDALExtendedDataTypeH hType) CPL_WARN_UNUSED_RESULT;
1505 void CPL_DLL GDALEDTComponentRelease(GDALEDTComponentH hComp);
1506 const char CPL_DLL* GDALEDTComponentGetName(GDALEDTComponentH hComp);
1507 size_t CPL_DLL GDALEDTComponentGetOffset(GDALEDTComponentH hComp);
1508 GDALExtendedDataTypeH CPL_DLL GDALEDTComponentGetType(GDALEDTComponentH hComp) CPL_WARN_UNUSED_RESULT;
1509 
1510 GDALGroupH CPL_DLL GDALDatasetGetRootGroup(GDALDatasetH hDS) CPL_WARN_UNUSED_RESULT;
1511 void CPL_DLL GDALGroupRelease(GDALGroupH hGroup);
1512 const char CPL_DLL *GDALGroupGetName(GDALGroupH hGroup);
1513 const char CPL_DLL *GDALGroupGetFullName(GDALGroupH hGroup);
1514 char CPL_DLL **GDALGroupGetMDArrayNames(GDALGroupH hGroup, CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1515 GDALMDArrayH CPL_DLL GDALGroupOpenMDArray(GDALGroupH hGroup, const char* pszMDArrayName, CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1516 GDALMDArrayH CPL_DLL GDALGroupOpenMDArrayFromFullname(GDALGroupH hGroup, const char* pszMDArrayName, CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1517 GDALMDArrayH CPL_DLL  GDALGroupResolveMDArray(GDALGroupH hGroup,
1518                                      const char* pszName,
1519                                      const char* pszStartingPoint,
1520                                      CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1521 char CPL_DLL **GDALGroupGetGroupNames(GDALGroupH hGroup, CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1522 GDALGroupH CPL_DLL GDALGroupOpenGroup(GDALGroupH hGroup, const char* pszSubGroupName, CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1523 GDALGroupH CPL_DLL GDALGroupOpenGroupFromFullname(GDALGroupH hGroup, const char* pszMDArrayName, CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1524 GDALDimensionH CPL_DLL *GDALGroupGetDimensions(GDALGroupH hGroup, size_t* pnCount, CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1525 GDALAttributeH CPL_DLL GDALGroupGetAttribute(GDALGroupH hGroup, const char* pszName) CPL_WARN_UNUSED_RESULT;
1526 GDALAttributeH CPL_DLL *GDALGroupGetAttributes(GDALGroupH hGroup, size_t* pnCount, CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1527 CSLConstList CPL_DLL GDALGroupGetStructuralInfo(GDALGroupH hGroup);
1528 GDALGroupH CPL_DLL GDALGroupCreateGroup(GDALGroupH hGroup,
1529                                         const char* pszSubGroupName,
1530                                         CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1531 GDALDimensionH CPL_DLL GDALGroupCreateDimension(GDALGroupH hGroup,
1532                                                 const char* pszName,
1533                                                 const char* pszType,
1534                                                 const char* pszDirection,
1535                                                 GUInt64 nSize,
1536                                                 CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1537 GDALMDArrayH CPL_DLL GDALGroupCreateMDArray(GDALGroupH hGroup,
1538                                            const char* pszName,
1539                                            size_t nDimensions,
1540                                            GDALDimensionH* pahDimensions,
1541                                            GDALExtendedDataTypeH hEDT,
1542                                            CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1543 GDALAttributeH CPL_DLL GDALGroupCreateAttribute(GDALGroupH hGroup,
1544                                                 const char* pszName,
1545                                                 size_t nDimensions,
1546                                                 const GUInt64* panDimensions,
1547                                                 GDALExtendedDataTypeH hEDT,
1548                                                 CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1549 
1550 void CPL_DLL GDALMDArrayRelease(GDALMDArrayH hMDArray);
1551 const char CPL_DLL* GDALMDArrayGetName(GDALMDArrayH hArray);
1552 const char CPL_DLL* GDALMDArrayGetFullName(GDALMDArrayH hArray);
1553 GUInt64 CPL_DLL GDALMDArrayGetTotalElementsCount(GDALMDArrayH hArray);
1554 size_t CPL_DLL GDALMDArrayGetDimensionCount(GDALMDArrayH hArray);
1555 GDALDimensionH CPL_DLL* GDALMDArrayGetDimensions(GDALMDArrayH hArray, size_t *pnCount) CPL_WARN_UNUSED_RESULT;
1556 GDALExtendedDataTypeH CPL_DLL GDALMDArrayGetDataType(GDALMDArrayH hArray) CPL_WARN_UNUSED_RESULT;
1557 int CPL_DLL GDALMDArrayRead(GDALMDArrayH hArray,
1558                             const GUInt64* arrayStartIdx,
1559                             const size_t* count,
1560                             const GInt64* arrayStep,
1561                             const GPtrDiff_t* bufferStride,
1562                             GDALExtendedDataTypeH bufferDatatype,
1563                             void* pDstBuffer,
1564                             const void* pDstBufferAllocStart,
1565                             size_t nDstBufferllocSize);
1566 int CPL_DLL GDALMDArrayWrite(GDALMDArrayH hArray,
1567                             const GUInt64* arrayStartIdx,
1568                             const size_t* count,
1569                             const GInt64* arrayStep,
1570                             const GPtrDiff_t* bufferStride,
1571                             GDALExtendedDataTypeH bufferDatatype,
1572                             const void* pSrcBuffer,
1573                             const void* psrcBufferAllocStart,
1574                             size_t nSrcBufferllocSize);
1575 int CPL_DLL GDALMDArrayAdviseRead(GDALMDArrayH hArray,
1576                                   const GUInt64* arrayStartIdx,
1577                                   const size_t* count);
1578 GDALAttributeH CPL_DLL GDALMDArrayGetAttribute(GDALMDArrayH hArray, const char* pszName) CPL_WARN_UNUSED_RESULT;
1579 GDALAttributeH CPL_DLL *GDALMDArrayGetAttributes(GDALMDArrayH hArray, size_t* pnCount, CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1580 GDALAttributeH CPL_DLL GDALMDArrayCreateAttribute(GDALMDArrayH hArray,
1581                                                 const char* pszName,
1582                                                 size_t nDimensions,
1583                                                 const GUInt64* panDimensions,
1584                                                 GDALExtendedDataTypeH hEDT,
1585                                                 CSLConstList papszOptions) CPL_WARN_UNUSED_RESULT;
1586 const void CPL_DLL *GDALMDArrayGetRawNoDataValue(GDALMDArrayH hArray);
1587 double CPL_DLL GDALMDArrayGetNoDataValueAsDouble(GDALMDArrayH hArray,
1588                                                  int* pbHasNoDataValue);
1589 int CPL_DLL GDALMDArraySetRawNoDataValue(GDALMDArrayH hArray, const void*);
1590 int CPL_DLL GDALMDArraySetNoDataValueAsDouble(GDALMDArrayH hArray,
1591                                               double dfNoDataValue);
1592 int CPL_DLL GDALMDArraySetScale(GDALMDArrayH hArray, double dfScale);
1593 int CPL_DLL GDALMDArraySetScaleEx(GDALMDArrayH hArray, double dfScale, GDALDataType eStorageType);
1594 double CPL_DLL GDALMDArrayGetScale(GDALMDArrayH hArray, int *pbHasValue);
1595 double CPL_DLL GDALMDArrayGetScaleEx(GDALMDArrayH hArray, int *pbHasValue, GDALDataType* peStorageType);
1596 int CPL_DLL GDALMDArraySetOffset(GDALMDArrayH hArray, double dfOffset);
1597 int CPL_DLL GDALMDArraySetOffsetEx(GDALMDArrayH hArray, double dfOffset, GDALDataType eStorageType);
1598 double CPL_DLL GDALMDArrayGetOffset(GDALMDArrayH hArray, int *pbHasValue);
1599 double CPL_DLL GDALMDArrayGetOffsetEx(GDALMDArrayH hArray, int *pbHasValue, GDALDataType* peStorageType);
1600 GUInt64 CPL_DLL *GDALMDArrayGetBlockSize(GDALMDArrayH hArray, size_t *pnCount);
1601 int CPL_DLL GDALMDArraySetUnit(GDALMDArrayH hArray, const char*);
1602 const char CPL_DLL *GDALMDArrayGetUnit(GDALMDArrayH hArray);
1603 int CPL_DLL GDALMDArraySetSpatialRef( GDALMDArrayH, OGRSpatialReferenceH );
1604 OGRSpatialReferenceH CPL_DLL GDALMDArrayGetSpatialRef(GDALMDArrayH hArray);
1605 size_t CPL_DLL *GDALMDArrayGetProcessingChunkSize(GDALMDArrayH hArray, size_t *pnCount,
1606                                         size_t nMaxChunkMemory);
1607 CSLConstList CPL_DLL GDALMDArrayGetStructuralInfo(GDALMDArrayH hArray);
1608 GDALMDArrayH CPL_DLL GDALMDArrayGetView(GDALMDArrayH hArray, const char* pszViewExpr);
1609 GDALMDArrayH CPL_DLL GDALMDArrayTranspose(GDALMDArrayH hArray,
1610                                             size_t nNewAxisCount,
1611                                             const int *panMapNewAxisToOldAxis);
1612 GDALMDArrayH CPL_DLL GDALMDArrayGetUnscaled(GDALMDArrayH hArray);
1613 GDALMDArrayH CPL_DLL GDALMDArrayGetMask(GDALMDArrayH hArray, CSLConstList papszOptions);
1614 GDALDatasetH CPL_DLL GDALMDArrayAsClassicDataset(GDALMDArrayH hArray,
1615                                                  size_t iXDim, size_t iYDim);
1616 CPLErr CPL_DLL GDALMDArrayGetStatistics(
1617     GDALMDArrayH hArray, GDALDatasetH, int bApproxOK, int bForce,
1618     double *pdfMin, double *pdfMax,
1619     double *pdfMean, double *pdfStdDev,
1620     GUInt64* pnValidCount,
1621     GDALProgressFunc pfnProgress, void *pProgressData );
1622 int CPL_DLL GDALMDArrayComputeStatistics( GDALMDArrayH hArray, GDALDatasetH,
1623                                     int bApproxOK,
1624                                     double *pdfMin, double *pdfMax,
1625                                     double *pdfMean, double *pdfStdDev,
1626                                     GUInt64* pnValidCount,
1627                                     GDALProgressFunc, void *pProgressData );
1628 
1629 void CPL_DLL GDALAttributeRelease(GDALAttributeH hAttr);
1630 void CPL_DLL GDALReleaseAttributes(GDALAttributeH* attributes, size_t nCount);
1631 const char CPL_DLL* GDALAttributeGetName(GDALAttributeH hAttr);
1632 const char CPL_DLL* GDALAttributeGetFullName(GDALAttributeH hAttr);
1633 GUInt64 CPL_DLL GDALAttributeGetTotalElementsCount(GDALAttributeH hAttr);
1634 size_t CPL_DLL GDALAttributeGetDimensionCount(GDALAttributeH hAttr);
1635 GUInt64 CPL_DLL* GDALAttributeGetDimensionsSize(GDALAttributeH hAttr, size_t *pnCount) CPL_WARN_UNUSED_RESULT;
1636 GDALExtendedDataTypeH CPL_DLL GDALAttributeGetDataType(GDALAttributeH hAttr) CPL_WARN_UNUSED_RESULT;
1637 GByte CPL_DLL *GDALAttributeReadAsRaw(GDALAttributeH hAttr, size_t *pnSize) CPL_WARN_UNUSED_RESULT;
1638 void CPL_DLL GDALAttributeFreeRawResult(GDALAttributeH hAttr, GByte* raw, size_t nSize);
1639 const char CPL_DLL* GDALAttributeReadAsString(GDALAttributeH hAttr);
1640 int CPL_DLL GDALAttributeReadAsInt(GDALAttributeH hAttr);
1641 double CPL_DLL GDALAttributeReadAsDouble(GDALAttributeH hAttr);
1642 char CPL_DLL **GDALAttributeReadAsStringArray(GDALAttributeH hAttr) CPL_WARN_UNUSED_RESULT;
1643 int CPL_DLL *GDALAttributeReadAsIntArray(GDALAttributeH hAttr, size_t* pnCount) CPL_WARN_UNUSED_RESULT;
1644 double CPL_DLL *GDALAttributeReadAsDoubleArray(GDALAttributeH hAttr, size_t* pnCount) CPL_WARN_UNUSED_RESULT;
1645 int CPL_DLL GDALAttributeWriteRaw(GDALAttributeH hAttr, const void*, size_t);
1646 int CPL_DLL GDALAttributeWriteString(GDALAttributeH hAttr, const char*);
1647 int CPL_DLL GDALAttributeWriteStringArray(GDALAttributeH hAttr, CSLConstList);
1648 int CPL_DLL GDALAttributeWriteInt(GDALAttributeH hAttr, int);
1649 int CPL_DLL GDALAttributeWriteDouble(GDALAttributeH hAttr, double);
1650 int CPL_DLL GDALAttributeWriteDoubleArray(GDALAttributeH hAttr, const double*, size_t);
1651 
1652 void CPL_DLL GDALDimensionRelease(GDALDimensionH hDim);
1653 void CPL_DLL GDALReleaseDimensions(GDALDimensionH* dims, size_t nCount);
1654 const char CPL_DLL *GDALDimensionGetName(GDALDimensionH hDim);
1655 const char CPL_DLL *GDALDimensionGetFullName(GDALDimensionH hDim);
1656 const char CPL_DLL *GDALDimensionGetType(GDALDimensionH hDim);
1657 const char CPL_DLL *GDALDimensionGetDirection(GDALDimensionH hDim);
1658 GUInt64 CPL_DLL GDALDimensionGetSize(GDALDimensionH hDim);
1659 GDALMDArrayH CPL_DLL GDALDimensionGetIndexingVariable(GDALDimensionH hDim) CPL_WARN_UNUSED_RESULT;
1660 int CPL_DLL GDALDimensionSetIndexingVariable(GDALDimensionH hDim, GDALMDArrayH hArray);
1661 
1662 CPL_C_END
1663 
1664 #endif /* ndef GDAL_H_INCLUDED */
1665