LCOV - code coverage report
Current view: top level - gcore - gdal.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 4 4 100.0 %
Date: 2025-10-21 22:35:35 Functions: 1 1 100.0 %

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

Generated by: LCOV version 1.14