GDAL

Classes | Macros | Typedefs | Enumerations | Functions
gdal.h File Reference

Public (C callable) GDAL entry points. More...

`#include <stdbool.h>`
`#include <stdint.h>`

Go to the source code of this file.

## Classes
struct | GDALRasterIOExtraArg
| Structure to pass extra arguments to RasterIO() method, must be initialized with INIT_RASTERIO_EXTRA_ARG. More...
struct | GDAL_GCP
| Ground Control Point. More...
struct | GDALRPCInfoV2
| Structure to store Rational Polynomial Coefficients / Rigorous Projection Model. More...
struct | GDALColorEntry
| Color tuple. More...

## Macros
#define | INIT_RASTERIO_EXTRA_ARG(s)
| Macro to initialize an instance of GDALRasterIOExtraArg structure.
#define | GDALMD_AREA_OR_POINT "AREA_OR_POINT"
| Metadata item for dataset that indicates the spatial interpretation of a pixel.
#define | GDALMD_AOP_AREA "Area"
| Value for GDALMD_AREA_OR_POINT that indicates that a pixel represents an area.
#define | GDALMD_AOP_POINT "Point"
| Value for GDALMD_AREA_OR_POINT that indicates that a pixel represents a point.
#define | GDAL_DMD_LONGNAME "DMD_LONGNAME"
| Long name of the driver.
#define | GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
| URL (relative to http://gdal.org/) to the help page of the driver.
#define | GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
| MIME type handled by the driver.
#define | GDAL_DMD_EXTENSION "DMD_EXTENSION"
| Extension handled by the driver.
#define | GDAL_DMD_CONNECTION_PREFIX "DMD_CONNECTION_PREFIX"
| Connection prefix to provide as the file name of the open function.
#define | GDAL_DMD_EXTENSIONS "DMD_EXTENSIONS"
| List of (space separated) extensions handled by the driver.
#define | GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST"
| XML snippet with creation options.
#define | GDAL_DMD_MULTIDIM_DATASET_CREATIONOPTIONLIST "DMD_MULTIDIM_DATASET_CREATIONOPTIONLIST"
| XML snippet with multidimensional dataset creation options.
#define | GDAL_DMD_MULTIDIM_GROUP_CREATIONOPTIONLIST "DMD_MULTIDIM_GROUP_CREATIONOPTIONLIST"
| XML snippet with multidimensional group creation options.
#define | GDAL_DMD_MULTIDIM_DIMENSION_CREATIONOPTIONLIST "DMD_MULTIDIM_DIMENSION_CREATIONOPTIONLIST"
| XML snippet with multidimensional dimension creation options.
#define | GDAL_DMD_MULTIDIM_ARRAY_CREATIONOPTIONLIST "DMD_MULTIDIM_ARRAY_CREATIONOPTIONLIST"
| XML snippet with multidimensional array creation options.
#define | GDAL_DMD_MULTIDIM_ARRAY_OPENOPTIONLIST "DMD_MULTIDIM_ARRAY_OPENOPTIONLIST"
| XML snippet with multidimensional array open options.
#define | GDAL_DMD_MULTIDIM_ATTRIBUTE_CREATIONOPTIONLIST "DMD_MULTIDIM_ATTRIBUTE_CREATIONOPTIONLIST"
| XML snippet with multidimensional attribute creation options.
#define | GDAL_DMD_OPENOPTIONLIST "DMD_OPENOPTIONLIST"
| XML snippet with open options.
#define | GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES"
| List of (space separated) raster data types supported by the Create()/CreateCopy() API.
#define | GDAL_DMD_CREATIONFIELDDATATYPES "DMD_CREATIONFIELDDATATYPES"
| List of (space separated) vector field types supported by the CreateField() API.
#define | GDAL_DMD_CREATIONFIELDDATASUBTYPES "DMD_CREATIONFIELDDATASUBTYPES"
| List of (space separated) vector field sub-types supported by the CreateField() API.
#define | GDAL_DMD_CREATION_FIELD_DEFN_FLAGS "DMD_CREATION_FIELD_DEFN_FLAGS"
| List of (space separated) capability flags supported by the CreateField() API.
#define | GDAL_DMD_SUBDATASETS "DMD_SUBDATASETS"
| Capability set by a driver that exposes Subdatasets.
#define | GDAL_DMD_NUMERIC_FIELD_WIDTH_INCLUDES_DECIMAL_SEPARATOR "DMD_NUMERIC_FIELD_WIDTH_INCLUDES_DECIMAL_SEPARATOR"
| Capability set by a vector driver that supports field width and precision.
#define | GDAL_DMD_NUMERIC_FIELD_WIDTH_INCLUDES_SIGN "DMD_NUMERIC_FIELD_WIDTH_INCLUDES_SIGN"
| Capability set by a vector driver that supports field width and precision.
#define | GDAL_DCAP_OPEN "DCAP_OPEN"
| Capability set by a driver that implements the Open() API.
#define | GDAL_DCAP_CREATE "DCAP_CREATE"
| Capability set by a driver that implements the Create() API.
#define | GDAL_DCAP_CREATE_MULTIDIMENSIONAL "DCAP_CREATE_MULTIDIMENSIONAL"
| Capability set by a driver that implements the CreateMultidimensional() API.
#define | GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
| Capability set by a driver that implements the CreateCopy() API.
#define | GDAL_DCAP_VECTOR_TRANSLATE_FROM "DCAP_VECTOR_TRANSLATE_FROM"
| Capability set by a driver that implements the VectorTranslateFrom() API.
#define | GDAL_DCAP_CREATECOPY_MULTIDIMENSIONAL "DCAP_CREATECOPY_MULTIDIMENSIONAL"
| Capability set by a driver that implements the CreateCopy() API, but with multidimensional raster as input and output.
#define | GDAL_DCAP_MULTIDIM_RASTER "DCAP_MULTIDIM_RASTER"
| Capability set by a driver that supports multidimensional data.
#define | GDAL_DCAP_SUBCREATECOPY "DCAP_SUBCREATECOPY"
| Capability set by a driver that can copy over subdatasets.
#define | GDAL_DCAP_VIRTUALIO "DCAP_VIRTUALIO"
| Capability set by a driver that can read/create datasets through the VSI*L API.
#define | GDAL_DCAP_RASTER "DCAP_RASTER"
| Capability set by a driver having raster capability.
#define | GDAL_DCAP_VECTOR "DCAP_VECTOR"
| Capability set by a driver having vector capability.
#define | GDAL_DCAP_GNM "DCAP_GNM"
| Capability set by a driver having geographical network model capability.
#define | GDAL_DCAP_CREATE_LAYER "DCAP_CREATE_LAYER"
| Capability set by a driver that can create layers.
#define | GDAL_DCAP_DELETE_LAYER "DCAP_DELETE_LAYER"
| Capability set by a driver that can delete layers.
#define | GDAL_DCAP_CREATE_FIELD "DCAP_CREATE_FIELD"
| Capability set by a driver that can create fields.
#define | GDAL_DCAP_DELETE_FIELD "DCAP_DELETE_FIELD"
| Capability set by a driver that can delete fields.
#define | GDAL_DCAP_REORDER_FIELDS "DCAP_REORDER_FIELDS"
| Capability set by a driver that can reorder fields.
#define | GDAL_DMD_ALTER_FIELD_DEFN_FLAGS "GDAL_DMD_ALTER_FIELD_DEFN_FLAGS"
| List of (space separated) flags supported by the OGRLayer::AlterFieldDefn() API.
#define | GDAL_DMD_ILLEGAL_FIELD_NAMES "GDAL_DMD_ILLEGAL_FIELD_NAMES"
| List of (space separated) field names which are considered illegal by the driver and should not be used when creating/altering fields.
#define | GDAL_DCAP_NOTNULL_FIELDS "DCAP_NOTNULL_FIELDS"
| Capability set by a driver that can create fields with NOT NULL constraint.
#define | GDAL_DCAP_UNIQUE_FIELDS "DCAP_UNIQUE_FIELDS"
| Capability set by a driver that can create fields with UNIQUE constraint.
#define | GDAL_DCAP_DEFAULT_FIELDS "DCAP_DEFAULT_FIELDS"
| Capability set by a driver that can create fields with DEFAULT values.
#define | GDAL_DCAP_NOTNULL_GEOMFIELDS "DCAP_NOTNULL_GEOMFIELDS"
| Capability set by a driver that can create geometry fields with NOT NULL constraint.
#define | GDAL_DCAP_NONSPATIAL "DCAP_NONSPATIAL"
| Capability set by a non-spatial driver having no support for geometries.
#define | GDAL_DCAP_CURVE_GEOMETRIES "DCAP_CURVE_GEOMETRIES"
| Capability set by a driver that can support curved geometries.
#define | GDAL_DCAP_MEASURED_GEOMETRIES "DCAP_MEASURED_GEOMETRIES"
| Capability set by a driver that can support measured geometries.
#define | GDAL_DCAP_Z_GEOMETRIES "DCAP_Z_GEOMETRIES"
| Capability set by a driver that can support the Z dimension for geometries.
#define | GDAL_DMD_GEOMETRY_FLAGS "GDAL_DMD_GEOMETRY_FLAGS"
| List of (space separated) flags which reflect the geometry handling behavior of a driver.
#define | GDAL_DCAP_FEATURE_STYLES "DCAP_FEATURE_STYLES"
| Capability set by drivers which support either reading or writing feature styles.
#define | GDAL_DCAP_FEATURE_STYLES_READ "DCAP_FEATURE_STYLES_READ"
| Capability set by drivers which support reading feature styles.
#define | GDAL_DCAP_FEATURE_STYLES_WRITE "DCAP_FEATURE_STYLES_WRITE"
| Capability set by drivers which support writing feature styles.
#define | GDAL_DCAP_COORDINATE_EPOCH "DCAP_COORDINATE_EPOCH"
| Capability set by drivers which support storing/retrieving coordinate epoch for dynamic CRS.
#define | GDAL_DCAP_MULTIPLE_VECTOR_LAYERS "DCAP_MULTIPLE_VECTOR_LAYERS"
| Capability set by drivers for formats which support multiple vector layers.
#define | GDAL_DCAP_FIELD_DOMAINS "DCAP_FIELD_DOMAINS"
| Capability set by drivers for formats which support reading field domains.
#define | GDAL_DCAP_RELATIONSHIPS "DCAP_RELATIONSHIPS"
| Capability set by drivers for formats which support reading table relationships.
#define | GDAL_DCAP_CREATE_RELATIONSHIP "DCAP_CREATE_RELATIONSHIP"
| Capability set by drivers for formats which support creating table relationships.
#define | GDAL_DCAP_DELETE_RELATIONSHIP "DCAP_DELETE_RELATIONSHIP"
| Capability set by drivers for formats which support deleting table relationships.
#define | GDAL_DCAP_UPDATE_RELATIONSHIP "DCAP_UPDATE_RELATIONSHIP"
| Capability set by drivers for formats which support updating existing table relationships.
#define | GDAL_DCAP_FLUSHCACHE_CONSISTENT_STATE "DCAP_FLUSHCACHE_CONSISTENT_STATE"
| Capability set by drivers whose FlushCache() implementation returns a dataset that can be opened afterwards and seen in a consistent state, without requiring the dataset on which FlushCache() has been called to be closed.
#define | GDAL_DCAP_HONOR_GEOM_COORDINATE_PRECISION "DCAP_HONOR_GEOM_COORDINATE_PRECISION"
| Capability set by drivers which honor the OGRCoordinatePrecision settings of geometry fields at layer creation and/or for OGRLayer::CreateGeomField().
#define | GDAL_DMD_RELATIONSHIP_FLAGS "GDAL_DMD_RELATIONSHIP_FLAGS"
| List of (space separated) flags indicating the features of relationships are supported by the driver.
#define | GDAL_DMD_RELATIONSHIP_RELATED_TABLE_TYPES "GDAL_DMD_RELATIONSHIP_RELATED_TABLE_TYPES"
| List of (space separated) standard related table types which are recognised by the driver.
#define | GDAL_DCAP_RENAME_LAYERS "DCAP_RENAME_LAYERS"
| Capability set by drivers for formats which support renaming vector layers.
#define | GDAL_DMD_CREATION_FIELD_DOMAIN_TYPES "DMD_CREATION_FIELD_DOMAIN_TYPES"
| List of (space separated) field domain types supported by the AddFieldDomain() API.
#define | GDAL_DMD_ALTER_GEOM_FIELD_DEFN_FLAGS "DMD_ALTER_GEOM_FIELD_DEFN_FLAGS"
| List of (space separated) flags supported by the OGRLayer::AlterGeomFieldDefn() API.
#define | GDAL_DMD_SUPPORTED_SQL_DIALECTS "DMD_SUPPORTED_SQL_DIALECTS"
| List of (space separated) SQL dialects supported by the driver.
#define | GDAL_DIM_TYPE_HORIZONTAL_X "HORIZONTAL_X"
| Value for GDALDimension::GetType() specifying the X axis of a horizontal CRS.
#define | GDAL_DIM_TYPE_HORIZONTAL_Y "HORIZONTAL_Y"
| Value for GDALDimension::GetType() specifying the Y axis of a horizontal CRS.
#define | GDAL_DIM_TYPE_VERTICAL "VERTICAL"
| Value for GDALDimension::GetType() specifying a vertical axis.
#define | GDAL_DIM_TYPE_TEMPORAL "TEMPORAL"
| Value for GDALDimension::GetType() specifying a temporal axis.
#define | GDAL_DIM_TYPE_PARAMETRIC "PARAMETRIC"
| Value for GDALDimension::GetType() specifying a parametric axis.
#define | GDsCAddRelationship "AddRelationship"
| Dataset capability for supporting AddRelationship() \ (at least partially)
#define | GDsCDeleteRelationship "DeleteRelationship"
| Dataset capability for supporting \ DeleteRelationship()
#define | GDsCUpdateRelationship "UpdateRelationship"
| Dataset capability for supporting \ UpdateRelationship()
#define | GDAL_OF_READONLY 0x00
| Open in read-only mode.
#define | GDAL_OF_UPDATE 0x01
| Open in update mode.
#define | GDAL_OF_ALL 0x00
| Allow raster and vector drivers to be used.
#define | GDAL_OF_RASTER 0x02
| Allow raster drivers to be used.
#define | GDAL_OF_VECTOR 0x04
| Allow vector drivers to be used.
#define | GDAL_OF_GNM 0x08
| Allow gnm drivers to be used.
#define | GDAL_OF_MULTIDIM_RASTER 0x10
| Allow multidimensional raster drivers to be used.
#define | GDAL_OF_SHARED 0x20
| Open in shared mode.
#define | GDAL_OF_VERBOSE_ERROR 0x40
| Emit error message in case of failed open.
#define | GDAL_OF_INTERNAL 0x80
| Open as internal dataset.
#define | GDAL_OF_DEFAULT_BLOCK_ACCESS 0
| Let GDAL decide if a array-based or hashset-based storage strategy for cached blocks must be used.
#define | GDAL_OF_ARRAY_BLOCK_ACCESS 0x100
| Use a array-based storage strategy for cached blocks.
#define | GDAL_OF_HASHSET_BLOCK_ACCESS 0x200
| Use a hashset-based storage strategy for cached blocks.
#define | GDAL_DS_LAYER_CREATIONOPTIONLIST "DS_LAYER_CREATIONOPTIONLIST"
| Name of driver metadata item for layer creation option list.
#define | SRCVAL(papoSource, eSrcType, ii)
| SRCVAL - Macro which may be used by pixel functions to obtain a pixel from a source buffer.
#define | GMF_ALL_VALID 0x01
| Flag returned by GDALGetMaskFlags() to indicate that all pixels are valid.
#define | GMF_PER_DATASET 0x02
| Flag returned by GDALGetMaskFlags() to indicate that the mask band is valid for all bands.
#define | GMF_ALPHA 0x04
| Flag returned by GDALGetMaskFlags() to indicate that the mask band is an alpha band.
#define | GMF_NODATA 0x08
| Flag returned by GDALGetMaskFlags() to indicate that the mask band is computed from nodata values.
#define | GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED 0x01
| Flag returned by GDALGetDataCoverageStatus() when the driver does not implement GetDataCoverageStatus().
#define | GDAL_DATA_COVERAGE_STATUS_DATA 0x02
| Flag returned by GDALGetDataCoverageStatus() when there is (potentially) data in the queried window.
#define | GDAL_DATA_COVERAGE_STATUS_EMPTY 0x04
| Flag returned by GDALGetDataCoverageStatus() when there is nodata in the queried window.
#define | GDAL_CHECK_VERSION(pszCallingComponentName)
| Helper macro for GDALCheckVersion()

## Typedefs
typedef void * | GDALMajorObjectH
| Opaque type used for the C bindings of the C++ GDALMajorObject class.
typedef void * | GDALDatasetH
| Opaque type used for the C bindings of the C++ GDALDataset class.
typedef void * | GDALRasterBandH
| Opaque type used for the C bindings of the C++ GDALRasterBand class.
typedef void * | GDALDriverH
| Opaque type used for the C bindings of the C++ GDALDriver class.
typedef void * | GDALColorTableH
| Opaque type used for the C bindings of the C++ GDALColorTable class.
typedef void * | GDALRasterAttributeTableH
| Opaque type used for the C bindings of the C++ GDALRasterAttributeTable class.
typedef void * | GDALAsyncReaderH
| Opaque type used for the C bindings of the C++ GDALAsyncReader class.
typedef void * | GDALRelationshipH
| Opaque type used for the C bindings of the C++ GDALRelationship class.
typedef GIntBig | GSpacing
| Type to express pixel, line or band spacing.
typedef struct GDALExtendedDataTypeHS * | GDALExtendedDataTypeH
| Opaque type for C++ GDALExtendedDataType.
typedef struct GDALEDTComponentHS * | GDALEDTComponentH
| Opaque type for C++ GDALEDTComponent.
typedef struct GDALGroupHS * | GDALGroupH
| Opaque type for C++ GDALGroup.
typedef struct GDALMDArrayHS * | GDALMDArrayH
| Opaque type for C++ GDALMDArray.
typedef struct GDALAttributeHS * | GDALAttributeH
| Opaque type for C++ GDALAttribute.
typedef struct GDALDimensionHS * | GDALDimensionH
| Opaque type for C++ GDALDimension.
typedef void(* | GDALQueryLoggerFunc) (const char *pszSQL, const char *pszError, int64_t lNumRecords, int64_t lExecutionTimeMilliseconds, void *pQueryLoggerArg)
| Type of functions to pass to GDALDatasetSetQueryLoggerFunc.
typedef struct GDALSubdatasetInfo * | GDALSubdatasetInfoH
| Opaque type used for the C bindings of the C++ GDALSubdatasetInfo class.
typedef CPLErr(* | GDALDerivedPixelFunc) (void **papoSources, int nSources, void *pData, int nBufXSize, int nBufYSize, GDALDataType eSrcType, GDALDataType eBufType, int nPixelSpace, int nLineSpace)
| Type of functions to pass to GDALAddDerivedBandPixelFunc.
typedef CPLErr(* | GDALDerivedPixelFuncWithArgs) (void **papoSources, int nSources, void *pData, int nBufXSize, int nBufYSize, GDALDataType eSrcType, GDALDataType eBufType, int nPixelSpace, int nLineSpace, CSLConstList papszFunctionArgs)
| Type of functions to pass to GDALAddDerivedBandPixelFuncWithArgs.
typedef void * | VRTPDWorkingDataPtr
| Generic pointer for the working structure of VRTProcessedDataset function.
typedef CPLErr(* | GDALVRTProcessedDatasetFuncInit) (const char *pszFuncName, void *pUserData, CSLConstList papszFunctionArgs, int nInBands, GDALDataType eInDT, double *padfInNoData, int *pnOutBands, GDALDataType *peOutDT, double **ppadfOutNoData, const char *pszVRTPath, VRTPDWorkingDataPtr *ppWorkingData)
| Initialization function to pass to GDALVRTRegisterProcessedDatasetFunc.
typedef void(* | GDALVRTProcessedDatasetFuncFree) (const char *pszFuncName, void *pUserData, VRTPDWorkingDataPtr pWorkingData)
| Free function to pass to GDALVRTRegisterProcessedDatasetFunc.
typedef CPLErr(* | GDALVRTProcessedDatasetFuncProcess) (const char *pszFuncName, void *pUserData, VRTPDWorkingDataPtr pWorkingData, CSLConstList papszFunctionArgs, int nBufXSize, int nBufYSize, const void *pInBuffer, size_t nInBufferSize, GDALDataType eInDT, int nInBands, const double *padfInNoData, void *pOutBuffer, size_t nOutBufferSize, GDALDataType eOutDT, int nOutBands, const double *padfOutNoData, double dfSrcXOff, double dfSrcYOff, double dfSrcXSize, double dfSrcYSize, const double adfSrcGT[], const char *pszVRTPath, CSLConstList papszExtra)
| Processing function to pass to GDALVRTRegisterProcessedDatasetFunc.

## Enumerations
enum | GDALDataType { GDT_Unknown = 0 , GDT_Byte = 1 , GDT_Int8 = 14 , GDT_UInt16 = 2 , GDT_Int16 = 3 , GDT_UInt32 = 4 , GDT_Int32 = 5 , GDT_UInt64 = 12 , GDT_Int64 = 13 , GDT_Float32 = 6 , GDT_Float64 = 7 , GDT_CInt16 = 8 , GDT_CInt32 = 9 , GDT_CFloat32 = 10 , GDT_CFloat64 = 11 , GDT_TypeCount = 15 }
enum | GDALAsyncStatusType { GARIO_PENDING = 0 , GARIO_UPDATE = 1 , GARIO_ERROR = 2 , GARIO_COMPLETE = 3 , GARIO_TypeCount = 4 }
| status of the asynchronous stream
enum | GDALAccess { GA_ReadOnly = 0 , GA_Update = 1 }
enum | GDALRWFlag { GF_Read = 0 , GF_Write = 1 }
enum | GDALRIOResampleAlg { GRIORA_NearestNeighbour = 0 , GRIORA_Bilinear = 1 , GRIORA_Cubic = 2 , GRIORA_CubicSpline = 3 , GRIORA_Lanczos = 4 , GRIORA_Average = 5 , GRIORA_Mode = 6 , GRIORA_Gauss = 7 , GRIORA_RMS = 14 }
| RasterIO() resampling method. More...
enum | GDALColorInterp { GCI_Undefined = 0 , GCI_GrayIndex = 1 , GCI_PaletteIndex = 2 , GCI_RedBand = 3 , GCI_GreenBand = 4 , GCI_BlueBand = 5 , GCI_AlphaBand = 6 , GCI_HueBand = 7 , GCI_SaturationBand = 8 , GCI_LightnessBand = 9 , GCI_CyanBand = 10 , GCI_MagentaBand = 11 , GCI_YellowBand = 12 , GCI_BlackBand = 13 , GCI_YCbCr_YBand = 14 , GCI_YCbCr_CbBand = 15 , GCI_YCbCr_CrBand = 16 , GCI_Max = 16 }
enum | GDALPaletteInterp { GPI_Gray = 0 , GPI_RGB = 1 , GPI_CMYK = 2 , GPI_HLS = 3 }
enum | GDALExtendedDataTypeClass { GEDTC_NUMERIC , GEDTC_STRING , GEDTC_COMPOUND }
| Enumeration giving the class of a GDALExtendedDataType. More...
enum | GDALExtendedDataTypeSubType { GEDTST_NONE , GEDTST_JSON }
| Enumeration giving the subtype of a GDALExtendedDataType. More...
enum | GDALRATFieldType { GFT_Integer , GFT_Real , GFT_String }
| Field type of raster attribute table. More...
enum | GDALRATFieldUsage { GFU_Generic = 0 , GFU_PixelCount = 1 , GFU_Name = 2 , GFU_Min = 3 , GFU_Max = 4 , GFU_MinMax = 5 , GFU_Red = 6 , GFU_Green = 7 , GFU_Blue = 8 , GFU_Alpha = 9 , GFU_RedMin = 10 , GFU_GreenMin = 11 , GFU_BlueMin = 12 , GFU_AlphaMin = 13 , GFU_RedMax = 14 , GFU_GreenMax = 15 , GFU_BlueMax = 16 , GFU_AlphaMax = 17 , GFU_MaxCount }
| Field usage of raster attribute table. More...
enum | GDALRATTableType { GRTT_THEMATIC , GRTT_ATHEMATIC }
| RAT table type (thematic or athematic) More...
enum | GDALRelationshipCardinality { GRC_ONE_TO_ONE , GRC_ONE_TO_MANY , GRC_MANY_TO_ONE , GRC_MANY_TO_MANY }
| Cardinality of relationship. More...
enum | GDALRelationshipType { GRT_COMPOSITE , GRT_ASSOCIATION , GRT_AGGREGATION }
| Type of relationship. More...
enum | GDALTileOrganization { GTO_TIP , GTO_BIT , GTO_BSQ }
| ! Enumeration to describe the tile organization More...

## Functions
int | GDALGetDataTypeSize (GDALDataType)
| Get data type size in bits.
int | GDALGetDataTypeSizeBits (GDALDataType eDataType)
| Get data type size in bits.
int | GDALGetDataTypeSizeBytes (GDALDataType)
| Get data type size in bytes.
int | GDALDataTypeIsComplex (GDALDataType)
| Is data type complex?
int | GDALDataTypeIsInteger (GDALDataType)
| Is data type integer? (might be complex)
int | GDALDataTypeIsFloating (GDALDataType)
| Is data type floating? (might be complex)
int | GDALDataTypeIsSigned (GDALDataType)
| Is data type signed?
const char * | GDALGetDataTypeName (GDALDataType)
| Get name of data type.
GDALDataType | GDALGetDataTypeByName (const char *)
| Get data type by symbolic name.
GDALDataType | GDALDataTypeUnion (GDALDataType, GDALDataType)
| Return the smallest data type that can fully express both input data types.
GDALDataType | GDALDataTypeUnionWithValue (GDALDataType eDT, double dValue, int bComplex)
| Union a data type with the one found for a value.
GDALDataType | GDALFindDataType (int nBits, int bSigned, int bFloating, int bComplex)
| Finds the smallest data type able to support the given requirements.
GDALDataType | GDALFindDataTypeForValue (double dValue, int bComplex)
| Finds the smallest data type able to support the provided value.
double | GDALAdjustValueToDataType (GDALDataType eDT, double dfValue, int *pbClamped, int *pbRounded)
| Adjust a value to the output data type.
GDALDataType | GDALGetNonComplexDataType (GDALDataType)
| Return the base data type for the specified input.
int | GDALDataTypeIsConversionLossy (GDALDataType eTypeFrom, GDALDataType eTypeTo)
| Is conversion from eTypeFrom to eTypeTo potentially lossy.
const char * | GDALGetAsyncStatusTypeName (GDALAsyncStatusType)
| Get name of AsyncStatus data type.
GDALAsyncStatusType | GDALGetAsyncStatusTypeByName (const char *)
| Get AsyncStatusType by symbolic name.
const char * | GDALGetColorInterpretationName (GDALColorInterp)
| Get name of color interpretation.
GDALColorInterp | GDALGetColorInterpretationByName (const char *pszName)
| Get color interpretation by symbolic name.
const char * | GDALGetPaletteInterpretationName (GDALPaletteInterp)
| Get name of palette interpretation.
void | GDALAllRegister (void)
| Register all known configured GDAL drivers.
void | GDALRegisterPlugins (void)
| Register drivers and support code available as a plugin.
CPLErr | GDALRegisterPlugin (const char *name)
| Register a plugin by name, returning an error if not found.
GDALDatasetH | GDALCreate (GDALDriverH hDriver, const char *, int, int, int, GDALDataType, CSLConstList)
| Create a new dataset with this driver.
GDALDatasetH | GDALCreateCopy (GDALDriverH, const char *, GDALDatasetH, int, CSLConstList, GDALProgressFunc, void *)
| Create a copy of a dataset.
GDALDriverH | GDALIdentifyDriver (const char *pszFilename, CSLConstList papszFileList)
| Identify the driver that can open a dataset.
GDALDriverH | GDALIdentifyDriverEx (const char *pszFilename, unsigned int nIdentifyFlags, const char *const *papszAllowedDrivers, const char *const *papszFileList)
| Identify the driver that can open a dataset.
GDALDatasetH | GDALOpen (const char *pszFilename, GDALAccess eAccess)
| Open a raster file as a GDALDataset.
GDALDatasetH | GDALOpenShared (const char *, GDALAccess)
| Open a raster file as a GDALDataset.
GDALDatasetH | GDALOpenEx (const char *pszFilename, unsigned int nOpenFlags, const char *const *papszAllowedDrivers, const char *const *papszOpenOptions, const char *const *papszSiblingFiles)
| Open a raster or vector file as a GDALDataset.
int | GDALDumpOpenDatasets (FILE *)
| List open datasets.
GDALDriverH | GDALGetDriverByName (const char *)
| Fetch a driver based on the short name.
int | GDALGetDriverCount (void)
| Fetch the number of registered drivers.
GDALDriverH | GDALGetDriver (int)
| Fetch driver by index.
GDALDriverH | GDALCreateDriver (void)
| Create a GDALDriver.
void | GDALDestroyDriver (GDALDriverH)
| Destroy a GDALDriver.
int | GDALRegisterDriver (GDALDriverH)
| Register a driver for use.
void | GDALDeregisterDriver (GDALDriverH)
| Deregister the passed driver.
void | GDALDestroyDriverManager (void)
| Destroy the driver manager.
CPLErr | GDALDeleteDataset (GDALDriverH, const char *)
| Delete named dataset.
CPLErr | GDALRenameDataset (GDALDriverH, const char *pszNewName, const char *pszOldName)
| Rename a dataset.
CPLErr | GDALCopyDatasetFiles (GDALDriverH, const char *pszNewName, const char *pszOldName)
| Copy the files of a dataset.
int | GDALValidateCreationOptions (GDALDriverH, CSLConstList papszCreationOptions)
| Validate the list of creation options that are handled by a driver.
char ** | GDALGetOutputDriversForDatasetName (const char *pszDestFilename, int nFlagRasterVector, bool bSingleMatch, bool bEmitWarning)
| Return a list of driver short names that are likely candidates for the provided output file name.
const char * | GDALGetDriverShortName (GDALDriverH)
| Return the short name of a driver.
const char * | GDALGetDriverLongName (GDALDriverH)
| Return the long name of a driver.
const char * | GDALGetDriverHelpTopic (GDALDriverH)
| Return the URL to the help that describes the driver.
const char * | GDALGetDriverCreationOptionList (GDALDriverH)
| Return the list of creation options of the driver.
void | GDALInitGCPs (int, GDAL_GCP *)
| Initialize an array of GCPs.
void | GDALDeinitGCPs (int, GDAL_GCP *)
| De-initialize an array of GCPs (initialized with GDALInitGCPs())
GDAL_GCP * | GDALDuplicateGCPs (int, const GDAL_GCP *)
| Duplicate an array of GCPs.
int | GDALGCPsToGeoTransform (int nGCPCount, const GDAL_GCP *pasGCPs, double *padfGeoTransform, int bApproxOK)
| Generate Geotransform from GCPs.
int | GDALInvGeoTransform (const double *padfGeoTransformIn, double *padfInvGeoTransformOut)
| Invert Geotransform.
void | GDALApplyGeoTransform (const double *, double, double, double *, double *)
| Apply GeoTransform to x/y coordinate.
void | GDALComposeGeoTransforms (const double *padfGeoTransform1, const double *padfGeoTransform2, double *padfGeoTransformOut)
| Compose two geotransforms.
char ** | GDALGetMetadataDomainList (GDALMajorObjectH hObject)
| Fetch list of metadata domains.
char ** | GDALGetMetadata (GDALMajorObjectH, const char *)
| Fetch metadata.
CPLErr | GDALSetMetadata (GDALMajorObjectH, CSLConstList, const char *)
| Set metadata.
const char * | GDALGetMetadataItem (GDALMajorObjectH, const char *, const char *)
| Fetch single metadata item.
CPLErr | GDALSetMetadataItem (GDALMajorObjectH, const char *, const char *, const char *)
| Set single metadata item.
const char * | GDALGetDescription (GDALMajorObjectH)
| Fetch object description.
void | GDALSetDescription (GDALMajorObjectH, const char *)
| Set object description.
GDALDriverH | GDALGetDatasetDriver (GDALDatasetH)
| Fetch the driver to which this dataset relates.
char ** | GDALGetFileList (GDALDatasetH)
| Fetch files forming dataset.
CPLErr | GDALClose (GDALDatasetH)
| Close GDAL dataset.
int | GDALGetRasterXSize (GDALDatasetH)
| Fetch raster width in pixels.
int | GDALGetRasterYSize (GDALDatasetH)
| Fetch raster height in pixels.
int | GDALGetRasterCount (GDALDatasetH)
| Fetch the number of raster bands on this dataset.
GDALRasterBandH | GDALGetRasterBand (GDALDatasetH, int)
| Fetch a band object for a dataset.
CPLErr | GDALAddBand (GDALDatasetH hDS, GDALDataType eType, CSLConstList papszOptions)
| Add a band to a dataset.
GDALAsyncReaderH | GDALBeginAsyncReader (GDALDatasetH hDS, int nXOff, int nYOff, int nXSize, int nYSize, void *pBuf, int nBufXSize, int nBufYSize, GDALDataType eBufType, int nBandCount, int *panBandMap, int nPixelSpace, int nLineSpace, int nBandSpace, CSLConstList papszOptions)
| Sets up an asynchronous data request.
void | GDALEndAsyncReader (GDALDatasetH hDS, GDALAsyncReaderH hAsynchReaderH)
| End asynchronous request.
CPLErr | GDALDatasetRasterIO (GDALDatasetH hDS, GDALRWFlag eRWFlag, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, void *pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType, int nBandCount, int *panBandCount, int nPixelSpace, int nLineSpace, int nBandSpace)
| Read/write a region of image data from multiple bands.
CPLErr | GDALDatasetRasterIOEx (GDALDatasetH hDS, GDALRWFlag eRWFlag, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, void *pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType, int nBandCount, int *panBandCount, GSpacing nPixelSpace, GSpacing nLineSpace, GSpacing nBandSpace, GDALRasterIOExtraArg *psExtraArg)
| Read/write a region of image data from multiple bands.
CPLErr | GDALDatasetAdviseRead (GDALDatasetH hDS, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, int nBXSize, int nBYSize, GDALDataType eBDataType, int nBandCount, int *panBandCount, CSLConstList papszOptions)
| Advise driver of upcoming read requests.
char ** | GDALDatasetGetCompressionFormats (GDALDatasetH hDS, int nXOff, int nYOff, int nXSize, int nYSize, int nBandCount, const int *panBandList)
| Return the compression formats that can be natively obtained for the window of interest and requested bands.
CPLErr | GDALDatasetReadCompressedData (GDALDatasetH hDS, const char *pszFormat, int nXOff, int nYOff, int nXSize, int nYSize, int nBandCount, const int *panBandList, void **ppBuffer, size_t *pnBufferSize, char **ppszDetailedFormat)
| Return the compressed content that can be natively obtained for the window of interest and requested bands.
const char * | GDALGetProjectionRef (GDALDatasetH)
| Fetch the projection definition string for this dataset.
OGRSpatialReferenceH | GDALGetSpatialRef (GDALDatasetH)
| Fetch the spatial reference for this dataset.
CPLErr | GDALSetProjection (GDALDatasetH, const char *)
| Set the projection reference string for this dataset.
CPLErr | GDALSetSpatialRef (GDALDatasetH, OGRSpatialReferenceH)
| Set the spatial reference system for this dataset.
CPLErr | GDALGetGeoTransform (GDALDatasetH, double *)
| Fetch the affine transformation coefficients.
CPLErr | GDALSetGeoTransform (GDALDatasetH, double *)
| Set the affine transformation coefficients.
int | GDALGetGCPCount (GDALDatasetH)
| Get number of GCPs.
const char * | GDALGetGCPProjection (GDALDatasetH)
| Get output projection for GCPs.
OGRSpatialReferenceH | GDALGetGCPSpatialRef (GDALDatasetH)
| Get output spatial reference system for GCPs.
const GDAL_GCP * | GDALGetGCPs (GDALDatasetH)
| Fetch GCPs.
CPLErr | GDALSetGCPs (GDALDatasetH, int, const GDAL_GCP *, const char *)
| Assign GCPs.
CPLErr | GDALSetGCPs2 (GDALDatasetH, int, const GDAL_GCP *, OGRSpatialReferenceH)
| Assign GCPs.
void * | GDALGetInternalHandle (GDALDatasetH, const char *)
| Fetch a format specific internally meaningful handle.
int | GDALReferenceDataset (GDALDatasetH)
| Add one to dataset reference count.
int | GDALDereferenceDataset (GDALDatasetH)
| Subtract one from dataset reference count.
int | GDALReleaseDataset (GDALDatasetH)
| Drop a reference to this object, and destroy if no longer referenced.
CPLErr | GDALBuildOverviews (GDALDatasetH, const char *, int, const int *, int, const int *, GDALProgressFunc, void *)
| Build raster overview(s)
CPLErr | GDALBuildOverviewsEx (GDALDatasetH, const char *, int, const int *, int, const int *, GDALProgressFunc, void *, CSLConstList papszOptions)
| Build raster overview(s)
void | GDALGetOpenDatasets (GDALDatasetH **hDS, int *pnCount)
| Fetch all open GDAL dataset handles.
int | GDALGetAccess (GDALDatasetH hDS)
| Return access flag.
CPLErr | GDALFlushCache (GDALDatasetH hDS)
| Flush all write cached data to disk.
CPLErr | GDALDropCache (GDALDatasetH hDS)
| Drop all write cached data.
CPLErr | GDALCreateDatasetMaskBand (GDALDatasetH hDS, int nFlags)
| Adds a mask band to the dataset.
CPLErr | GDALDatasetCopyWholeRaster (GDALDatasetH hSrcDS, GDALDatasetH hDstDS, CSLConstList papszOptions, GDALProgressFunc pfnProgress, void *pProgressData)
| Copy all dataset raster data.
CPLErr | GDALRasterBandCopyWholeRaster (GDALRasterBandH hSrcBand, GDALRasterBandH hDstBand, const char *const *constpapszOptions, GDALProgressFunc pfnProgress, void *pProgressData)
| Copy a whole raster band.
CPLErr | GDALRegenerateOverviews (GDALRasterBandH hSrcBand, int nOverviewCount, GDALRasterBandH *pahOverviewBands, const char *pszResampling, GDALProgressFunc pfnProgress, void *pProgressData)
| Generate downsampled overviews.
CPLErr | GDALRegenerateOverviewsEx (GDALRasterBandH hSrcBand, int nOverviewCount, GDALRasterBandH *pahOverviewBands, const char *pszResampling, GDALProgressFunc pfnProgress, void *pProgressData, CSLConstList papszOptions)
| Generate downsampled overviews.
int | GDALDatasetGetLayerCount (GDALDatasetH)
| Get the number of layers in this dataset.
OGRLayerH | GDALDatasetGetLayer (GDALDatasetH, int)
| Fetch a layer by index.
GDALDatasetH | OGR_L_GetDataset (OGRLayerH hLayer)
| Return the dataset associated with this layer.
OGRLayerH | GDALDatasetGetLayerByName (GDALDatasetH, const char *)
| Fetch a layer by name.
int | GDALDatasetIsLayerPrivate (GDALDatasetH, int)
| Returns true if the layer at the specified index is deemed a private or system table, or an internal detail only.
OGRErr | GDALDatasetDeleteLayer (GDALDatasetH, int)
| Delete the indicated layer from the datasource.
OGRLayerH | GDALDatasetCreateLayer (GDALDatasetH, const char *, OGRSpatialReferenceH, OGRwkbGeometryType, CSLConstList)
| This function attempts to create a new layer on the dataset with the indicated name, coordinate system, geometry type.
OGRLayerH | GDALDatasetCreateLayerFromGeomFieldDefn (GDALDatasetH, const char *, OGRGeomFieldDefnH, CSLConstList)
| This function attempts to create a new layer on the dataset with the indicated name and geometry field.
OGRLayerH | GDALDatasetCopyLayer (GDALDatasetH, OGRLayerH, const char *, CSLConstList)
| Duplicate an existing layer.
void | GDALDatasetResetReading (GDALDatasetH)
| Reset feature reading to start on the first feature.
OGRFeatureH | GDALDatasetGetNextFeature (GDALDatasetH hDS, OGRLayerH *phBelongingLayer, double *pdfProgressPct, GDALProgressFunc pfnProgress, void *pProgressData)
| Fetch the next available feature from this dataset.
int | GDALDatasetTestCapability (GDALDatasetH, const char *)
| Test if capability is available.
OGRLayerH | GDALDatasetExecuteSQL (GDALDatasetH, const char *, OGRGeometryH, const char *)
| Execute an SQL statement against the data store.
OGRErr | GDALDatasetAbortSQL (GDALDatasetH)
| Abort any SQL statement running in the data store.
void | GDALDatasetReleaseResultSet (GDALDatasetH, OGRLayerH)
| Release results of ExecuteSQL().
OGRStyleTableH | GDALDatasetGetStyleTable (GDALDatasetH)
| Returns dataset style table.
void | GDALDatasetSetStyleTableDirectly (GDALDatasetH, OGRStyleTableH)
| Set dataset style table.
void | GDALDatasetSetStyleTable (GDALDatasetH, OGRStyleTableH)
| Set dataset style table.
OGRErr | GDALDatasetStartTransaction (GDALDatasetH hDS, int bForce)
| For datasources which support transactions, StartTransaction creates a transaction.
OGRErr | GDALDatasetCommitTransaction (GDALDatasetH hDS)
| For datasources which support transactions, CommitTransaction commits a transaction.
OGRErr | GDALDatasetRollbackTransaction (GDALDatasetH hDS)
| For datasources which support transactions, RollbackTransaction will roll back a datasource to its state before the start of the current transaction.
void | GDALDatasetClearStatistics (GDALDatasetH hDS)
| Clear statistics.
char ** | GDALDatasetGetFieldDomainNames (GDALDatasetH, CSLConstList)
| Returns a list of the names of all field domains stored in the dataset.
OGRFieldDomainH | GDALDatasetGetFieldDomain (GDALDatasetH hDS, const char *pszName)
| Get a field domain from its name.
bool | GDALDatasetAddFieldDomain (GDALDatasetH hDS, OGRFieldDomainH hFieldDomain, char **ppszFailureReason)
| Add a field domain to the dataset.
bool | GDALDatasetDeleteFieldDomain (GDALDatasetH hDS, const char *pszName, char **ppszFailureReason)
| Removes a field domain from the dataset.
bool | GDALDatasetUpdateFieldDomain (GDALDatasetH hDS, OGRFieldDomainH hFieldDomain, char **ppszFailureReason)
| Updates an existing field domain by replacing its definition.
char ** | GDALDatasetGetRelationshipNames (GDALDatasetH, CSLConstList)
| Returns a list of the names of all relationships stored in the dataset.
GDALRelationshipH | GDALDatasetGetRelationship (GDALDatasetH hDS, const char *pszName)
| Get a relationship from its name.
bool | GDALDatasetAddRelationship (GDALDatasetH hDS, GDALRelationshipH hRelationship, char **ppszFailureReason)
| Add a relationship to the dataset.
bool | GDALDatasetDeleteRelationship (GDALDatasetH hDS, const char *pszName, char **ppszFailureReason)
| Removes a relationship from the dataset.
bool | GDALDatasetUpdateRelationship (GDALDatasetH hDS, GDALRelationshipH hRelationship, char **ppszFailureReason)
| Updates an existing relationship by replacing its definition.
bool | GDALDatasetSetQueryLoggerFunc (GDALDatasetH hDS, GDALQueryLoggerFunc pfnQueryLoggerFunc, void *poQueryLoggerArg)
| Sets the SQL query logger callback.
GDALSubdatasetInfoH | GDALGetSubdatasetInfo (const char *pszFileName)
| Returns a new GDALSubdatasetInfo object with methods to extract and manipulate subdataset information.
char * | GDALSubdatasetInfoGetPathComponent (GDALSubdatasetInfoH hInfo)
| Returns the file path component of a subdataset descriptor effectively stripping the information about the subdataset and returning the "parent" dataset descriptor.
char * | GDALSubdatasetInfoGetSubdatasetComponent (GDALSubdatasetInfoH hInfo)
| Returns the subdataset component of a subdataset descriptor descriptor.
char * | GDALSubdatasetInfoModifyPathComponent (GDALSubdatasetInfoH hInfo, const char *pszNewPath)
| Replaces the path component of a subdataset descriptor.
void | GDALDestroySubdatasetInfo (GDALSubdatasetInfoH hInfo)
| Destroys a GDALSubdatasetInfo object.
GDALDataType | GDALGetRasterDataType (GDALRasterBandH)
| Fetch the pixel data type for this band.
void | GDALGetBlockSize (GDALRasterBandH, int *pnXSize, int *pnYSize)
| Fetch the "natural" block size of this band.
CPLErr | GDALGetActualBlockSize (GDALRasterBandH, int nXBlockOff, int nYBlockOff, int *pnXValid, int *pnYValid)
| Retrieve the actual block size for a given block offset.
CPLErr | GDALRasterAdviseRead (GDALRasterBandH hRB, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, int nBXSize, int nBYSize, GDALDataType eBDataType, CSLConstList papszOptions)
| Advise driver of upcoming read requests.
CPLErr | GDALRasterIO (GDALRasterBandH hRBand, GDALRWFlag eRWFlag, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, void *pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType, int nPixelSpace, int nLineSpace)
| Read/write a region of image data for this band.
CPLErr | GDALRasterIOEx (GDALRasterBandH hRBand, GDALRWFlag eRWFlag, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, void *pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType, GSpacing nPixelSpace, GSpacing nLineSpace, GDALRasterIOExtraArg *psExtraArg)
| Read/write a region of image data for this band.
CPLErr | GDALReadBlock (GDALRasterBandH, int, int, void *)
| Read a block of image data efficiently.
CPLErr | GDALWriteBlock (GDALRasterBandH, int, int, void *)
| Write a block of image data efficiently.
int | GDALGetRasterBandXSize (GDALRasterBandH)
| Fetch XSize of raster.
int | GDALGetRasterBandYSize (GDALRasterBandH)
| Fetch YSize of raster.
GDALAccess | GDALGetRasterAccess (GDALRasterBandH)
| Find out if we have update permission for this band.
int | GDALGetBandNumber (GDALRasterBandH)
| Fetch the band number.
GDALDatasetH | GDALGetBandDataset (GDALRasterBandH)
| Fetch the owning dataset handle.
GDALColorInterp | GDALGetRasterColorInterpretation (GDALRasterBandH)
| How should this band be interpreted as color?
CPLErr | GDALSetRasterColorInterpretation (GDALRasterBandH, GDALColorInterp)
| Set color interpretation of a band.
GDALColorTableH | GDALGetRasterColorTable (GDALRasterBandH)
| Fetch the color table associated with band.
CPLErr | GDALSetRasterColorTable (GDALRasterBandH, GDALColorTableH)
| Set the raster color table.
int | GDALHasArbitraryOverviews (GDALRasterBandH)
| Check for arbitrary overviews.
int | GDALGetOverviewCount (GDALRasterBandH)
| Return the number of overview layers available.
GDALRasterBandH | GDALGetOverview (GDALRasterBandH, int)
| Fetch overview raster band object.
double | GDALGetRasterNoDataValue (GDALRasterBandH, int *)
| Fetch the no data value for this band.
int64_t | GDALGetRasterNoDataValueAsInt64 (GDALRasterBandH, int *)
| Fetch the no data value for this band.
uint64_t | GDALGetRasterNoDataValueAsUInt64 (GDALRasterBandH, int *)
| Fetch the no data value for this band.
CPLErr | GDALSetRasterNoDataValue (GDALRasterBandH, double)
| Set the no data value for this band.
CPLErr | GDALSetRasterNoDataValueAsInt64 (GDALRasterBandH, int64_t)
| Set the no data value for this band.
CPLErr | GDALSetRasterNoDataValueAsUInt64 (GDALRasterBandH, uint64_t)
| Set the no data value for this band.
CPLErr | GDALDeleteRasterNoDataValue (GDALRasterBandH)
| Remove the no data value for this band.
char ** | GDALGetRasterCategoryNames (GDALRasterBandH)
| Fetch the list of category names for this raster.
CPLErr | GDALSetRasterCategoryNames (GDALRasterBandH, CSLConstList)
| Set the category names for this band.
double | GDALGetRasterMinimum (GDALRasterBandH, int *pbSuccess)
| Fetch the minimum value for this band.
double | GDALGetRasterMaximum (GDALRasterBandH, int *pbSuccess)
| Fetch the maximum value for this band.
CPLErr | GDALGetRasterStatistics (GDALRasterBandH, int bApproxOK, int bForce, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev)
| Fetch image statistics.
CPLErr | GDALComputeRasterStatistics (GDALRasterBandH, int bApproxOK, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev, GDALProgressFunc pfnProgress, void *pProgressData)
| Compute image statistics.
CPLErr | GDALSetRasterStatistics (GDALRasterBandH hBand, double dfMin, double dfMax, double dfMean, double dfStdDev)
| Set statistics on band.
GDALMDArrayH | GDALRasterBandAsMDArray (GDALRasterBandH)
| Return a view of this raster band as a 2D multidimensional GDALMDArray.
const char * | GDALGetRasterUnitType (GDALRasterBandH)
| Return raster unit type.
CPLErr | GDALSetRasterUnitType (GDALRasterBandH hBand, const char *pszNewValue)
| Set unit type.
double | GDALGetRasterOffset (GDALRasterBandH, int *pbSuccess)
| Fetch the raster value offset.
CPLErr | GDALSetRasterOffset (GDALRasterBandH hBand, double dfNewOffset)
| Set scaling offset.
double | GDALGetRasterScale (GDALRasterBandH, int *pbSuccess)
| Fetch the raster value scale.
CPLErr | GDALSetRasterScale (GDALRasterBandH hBand, double dfNewOffset)
| Set scaling ratio.
CPLErr | GDALComputeRasterMinMax (GDALRasterBandH hBand, int bApproxOK, double adfMinMax[2])
| Compute the min/max values for a band.
CPLErr | GDALFlushRasterCache (GDALRasterBandH hBand)
| Flush raster data cache.
CPLErr | GDALDropRasterCache (GDALRasterBandH hBand)
| Drop raster data cache.
CPLErr | GDALGetRasterHistogram (GDALRasterBandH hBand, double dfMin, double dfMax, int nBuckets, int *panHistogram, int bIncludeOutOfRange, int bApproxOK, GDALProgressFunc pfnProgress, void *pProgressData)
| Compute raster histogram.
CPLErr | GDALGetRasterHistogramEx (GDALRasterBandH hBand, double dfMin, double dfMax, int nBuckets, GUIntBig *panHistogram, int bIncludeOutOfRange, int bApproxOK, GDALProgressFunc pfnProgress, void *pProgressData)
| Compute raster histogram.
CPLErr | GDALGetDefaultHistogram (GDALRasterBandH hBand, double *pdfMin, double *pdfMax, int *pnBuckets, int **ppanHistogram, int bForce, GDALProgressFunc pfnProgress, void *pProgressData)
| Fetch default raster histogram.
CPLErr | GDALGetDefaultHistogramEx (GDALRasterBandH hBand, double *pdfMin, double *pdfMax, int *pnBuckets, GUIntBig **ppanHistogram, int bForce, GDALProgressFunc pfnProgress, void *pProgressData)
| Fetch default raster histogram.
CPLErr | GDALSetDefaultHistogram (GDALRasterBandH hBand, double dfMin, double dfMax, int nBuckets, int *panHistogram)
| Set default histogram.
CPLErr | GDALSetDefaultHistogramEx (GDALRasterBandH hBand, double dfMin, double dfMax, int nBuckets, GUIntBig *panHistogram)
| Set default histogram.
int | GDALGetRandomRasterSample (GDALRasterBandH, int, float *)
| Undocumented.
GDALRasterBandH | GDALGetRasterSampleOverview (GDALRasterBandH, int)
| Fetch best sampling overview.
GDALRasterBandH | GDALGetRasterSampleOverviewEx (GDALRasterBandH, GUIntBig)
| Fetch best sampling overview.
CPLErr | GDALFillRaster (GDALRasterBandH hBand, double dfRealValue, double dfImaginaryValue)
| Fill this band with a constant value.
CPLErr | GDALComputeBandStats (GDALRasterBandH hBand, int nSampleStep, double *pdfMean, double *pdfStdDev, GDALProgressFunc pfnProgress, void *pProgressData)
| Undocumented.
CPLErr | GDALOverviewMagnitudeCorrection (GDALRasterBandH hBaseBand, int nOverviewCount, GDALRasterBandH *pahOverviews, GDALProgressFunc pfnProgress, void *pProgressData)
| Undocumented.
GDALRasterAttributeTableH | GDALGetDefaultRAT (GDALRasterBandH hBand)
| Fetch default Raster Attribute Table.
CPLErr | GDALSetDefaultRAT (GDALRasterBandH, GDALRasterAttributeTableH)
| Set default Raster Attribute Table.
CPLErr | GDALAddDerivedBandPixelFunc (const char *pszName, GDALDerivedPixelFunc pfnPixelFunc)
| This adds a pixel function to the global list of available pixel functions for derived bands.
CPLErr | GDALAddDerivedBandPixelFuncWithArgs (const char *pszName, GDALDerivedPixelFuncWithArgs pfnPixelFunc, const char *pszMetadata)
| This adds a pixel function to the global list of available pixel functions for derived bands.
CPLErr | GDALVRTRegisterProcessedDatasetFunc (const char *pszFuncName, void *pUserData, const char *pszXMLMetadata, GDALDataType eRequestedInputDT, const GDALDataType *paeSupportedInputDT, size_t nSupportedInputDTSize, const int *panSupportedInputBandCount, size_t nSupportedInputBandCountSize, GDALVRTProcessedDatasetFuncInit pfnInit, GDALVRTProcessedDatasetFuncFree pfnFree, GDALVRTProcessedDatasetFuncProcess pfnProcess, CSLConstList papszOptions)
| Register a function to be used by VRTProcessedDataset.
GDALRasterBandH | GDALGetMaskBand (GDALRasterBandH hBand)
| Return the mask band associated with the band.
int | GDALGetMaskFlags (GDALRasterBandH hBand)
| Return the status flags of the mask band associated with the band.
CPLErr | GDALCreateMaskBand (GDALRasterBandH hBand, int nFlags)
| Adds a mask band to the current band.
bool | GDALIsMaskBand (GDALRasterBandH hBand)
| Returns whether a band is a mask band.
int | GDALGetDataCoverageStatus (GDALRasterBandH hBand, int nXOff, int nYOff, int nXSize, int nYSize, int nMaskFlagStop, double *pdfDataPct)
| Get the coverage status of a sub-window of the raster.
GDALAsyncStatusType | GDALARGetNextUpdatedRegion (GDALAsyncReaderH hARIO, double dfTimeout, int *pnXBufOff, int *pnYBufOff, int *pnXBufSize, int *pnYBufSize)
| Get async IO update.
int | GDALARLockBuffer (GDALAsyncReaderH hARIO, double dfTimeout)
| Lock image buffer.
void | GDALARUnlockBuffer (GDALAsyncReaderH hARIO)
| Unlock image buffer.
int | GDALGeneralCmdLineProcessor (int nArgc, char ***ppapszArgv, int nOptions)
| General utility option processing.
void | GDALSwapWords (void *pData, int nWordSize, int nWordCount, int nWordSkip)
| Byte swap words in-place.
void | GDALSwapWordsEx (void *pData, int nWordSize, size_t nWordCount, int nWordSkip)
| Byte swap words in-place.
void | GDALCopyWords (const void *pSrcData, GDALDataType eSrcType, int nSrcPixelOffset, void *pDstData, GDALDataType eDstType, int nDstPixelOffset, int nWordCount)
| Copy pixel words from buffer to buffer.
void | GDALCopyWords64 (const void *pSrcData, GDALDataType eSrcType, int nSrcPixelOffset, void *pDstData, GDALDataType eDstType, int nDstPixelOffset, GPtrDiff_t nWordCount)
| Copy pixel words from buffer to buffer.
void | GDALCopyBits (const GByte *pabySrcData, int nSrcOffset, int nSrcStep, GByte *pabyDstData, int nDstOffset, int nDstStep, int nBitCount, int nStepCount)
| Bitwise word copying.
void | GDALDeinterleave (const void *pSourceBuffer, GDALDataType eSourceDT, int nComponents, void **ppDestBuffer, GDALDataType eDestDT, size_t nIters)
double | GDALGetNoDataReplacementValue (GDALDataType, double)
| Returns a replacement value for a nodata value or 0 if dfNoDataValue is out of range for the specified data type (dt).
int | GDALLoadWorldFile (const char *, double *)
| Read ESRI world file.
int | GDALReadWorldFile (const char *, const char *, double *)
| Read ESRI world file.
int | GDALWriteWorldFile (const char *, const char *, double *)
| Write ESRI world file.
int | GDALLoadTabFile (const char *, double *, char **, int *, GDAL_GCP **)
| Helper function for translator implementer wanting support for MapInfo .tab files.
int | GDALReadTabFile (const char *, double *, char **, int *, GDAL_GCP **)
| Helper function for translator implementer wanting support for MapInfo .tab files.
int | GDALLoadOziMapFile (const char *, double *, char **, int *, GDAL_GCP **)
| Helper function for translator implementer wanting support for OZI .map.
int | GDALReadOziMapFile (const char *, double *, char **, int *, GDAL_GCP **)
| Helper function for translator implementer wanting support for OZI .map.
const char * | GDALDecToDMS (double, const char *, int)
| Translate a decimal degrees value to a DMS string with hemisphere.
double | GDALPackedDMSToDec (double)
| Convert a packed DMS value (DDDMMMSSS.SS) into decimal degrees.
double | GDALDecToPackedDMS (double)
| Convert decimal degrees into packed DMS value (DDDMMMSSS.SS).
const char * | GDALVersionInfo (const char *)
| Get runtime version information.
int | GDALCheckVersion (int nVersionMajor, int nVersionMinor, const char *pszCallingComponentName)
| Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor.
int | GDALExtractRPCInfoV2 (CSLConstList, GDALRPCInfoV2 *)
| Extract RPC info from metadata, and apply to an RPCInfo structure.
GDALColorTableH | GDALCreateColorTable (GDALPaletteInterp)
| Construct a new color table.
void | GDALDestroyColorTable (GDALColorTableH)
| Destroys a color table.
GDALColorTableH | GDALCloneColorTable (GDALColorTableH)
| Make a copy of a color table.
GDALPaletteInterp | GDALGetPaletteInterpretation (GDALColorTableH)
| Fetch palette interpretation.
int | GDALGetColorEntryCount (GDALColorTableH)
| Get number of color entries in table.
const GDALColorEntry * | GDALGetColorEntry (GDALColorTableH, int)
| Fetch a color entry from table.
int | GDALGetColorEntryAsRGB (GDALColorTableH, int, GDALColorEntry *)
| Fetch a table entry in RGB format.
void | GDALSetColorEntry (GDALColorTableH, int, const GDALColorEntry *)
| Set entry in color table.
void | GDALCreateColorRamp (GDALColorTableH hTable, int nStartIndex, const GDALColorEntry *psStartColor, int nEndIndex, const GDALColorEntry *psEndColor)
| Create color ramp.
GDALRasterAttributeTableH | GDALCreateRasterAttributeTable (void)
| Construct empty table.
void | GDALDestroyRasterAttributeTable (GDALRasterAttributeTableH)
| Destroys a RAT.
int | GDALRATGetColumnCount (GDALRasterAttributeTableH)
| Fetch table column count.
const char * | GDALRATGetNameOfCol (GDALRasterAttributeTableH, int)
| Fetch name of indicated column.
GDALRATFieldUsage | GDALRATGetUsageOfCol (GDALRasterAttributeTableH, int)
| Fetch column usage value.
GDALRATFieldType | GDALRATGetTypeOfCol (GDALRasterAttributeTableH, int)
| Fetch column type.
int | GDALRATGetColOfUsage (GDALRasterAttributeTableH, GDALRATFieldUsage)
| Fetch column index for given usage.
int | GDALRATGetRowCount (GDALRasterAttributeTableH)
| Fetch row count.
const char * | GDALRATGetValueAsString (GDALRasterAttributeTableH, int, int)
| Fetch field value as a string.
int | GDALRATGetValueAsInt (GDALRasterAttributeTableH, int, int)
| Fetch field value as a integer.
double | GDALRATGetValueAsDouble (GDALRasterAttributeTableH, int, int)
| Fetch field value as a double.
void | GDALRATSetValueAsString (GDALRasterAttributeTableH, int, int, const char *)
| Set field value from string.
void | GDALRATSetValueAsInt (GDALRasterAttributeTableH, int, int, int)
| Set field value from integer.
void | GDALRATSetValueAsDouble (GDALRasterAttributeTableH, int, int, double)
| Set field value from double.
int | GDALRATChangesAreWrittenToFile (GDALRasterAttributeTableH hRAT)
| Determine whether changes made to this RAT are reflected directly in the dataset.
CPLErr | GDALRATValuesIOAsDouble (GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag, int iField, int iStartRow, int iLength, double *pdfData)
| Read or Write a block of doubles to/from the Attribute Table.
CPLErr | GDALRATValuesIOAsInteger (GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag, int iField, int iStartRow, int iLength, int *pnData)
| Read or Write a block of ints to/from the Attribute Table.
CPLErr | GDALRATValuesIOAsString (GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag, int iField, int iStartRow, int iLength, char **papszStrList)
| Read or Write a block of strings to/from the Attribute Table.
void | GDALRATSetRowCount (GDALRasterAttributeTableH, int)
| Set row count.
CPLErr | GDALRATCreateColumn (GDALRasterAttributeTableH, const char *, GDALRATFieldType, GDALRATFieldUsage)
| Create new column.
CPLErr | GDALRATSetLinearBinning (GDALRasterAttributeTableH, double, double)
| Set linear binning information.
int | GDALRATGetLinearBinning (GDALRasterAttributeTableH, double *, double *)
| Get linear binning information.
CPLErr | GDALRATSetTableType (GDALRasterAttributeTableH hRAT, const GDALRATTableType eInTableType)
| Set RAT Table Type.
GDALRATTableType | GDALRATGetTableType (GDALRasterAttributeTableH hRAT)
| Get Rat Table Type.
CPLErr | GDALRATInitializeFromColorTable (GDALRasterAttributeTableH, GDALColorTableH)
| Initialize from color table.
GDALColorTableH | GDALRATTranslateToColorTable (GDALRasterAttributeTableH, int nEntryCount)
| Translate to a color table.
void | GDALRATDumpReadable (GDALRasterAttributeTableH, FILE *)
| Dump RAT in readable form.
GDALRasterAttributeTableH | GDALRATClone (const GDALRasterAttributeTableH)
| Copy Raster Attribute Table.
void * | GDALRATSerializeJSON (GDALRasterAttributeTableH)
| Serialize Raster Attribute Table in Json format.
int | GDALRATGetRowOfValue (GDALRasterAttributeTableH, double)
| Get row for pixel value.
void | GDALRATRemoveStatistics (GDALRasterAttributeTableH)
| Remove Statistics from RAT.
GDALRelationshipH | GDALRelationshipCreate (const char *, const char *, const char *, GDALRelationshipCardinality)
| Creates a new relationship.
void | GDALDestroyRelationship (GDALRelationshipH)
| Destroys a relationship.
const char * | GDALRelationshipGetName (GDALRelationshipH)
| Get the name of the relationship.
GDALRelationshipCardinality | GDALRelationshipGetCardinality (GDALRelationshipH)
| Get the cardinality of the relationship.
const char * | GDALRelationshipGetLeftTableName (GDALRelationshipH)
| Get the name of the left (or base/origin) table in the relationship.
const char * | GDALRelationshipGetRightTableName (GDALRelationshipH)
| Get the name of the right (or related/destination) table in the relationship.
const char * | GDALRelationshipGetMappingTableName (GDALRelationshipH)
| Get the name of the mapping table for many-to-many relationships.
void | GDALRelationshipSetMappingTableName (GDALRelationshipH, const char *)
| Sets the name of the mapping table for many-to-many relationships.
char ** | GDALRelationshipGetLeftTableFields (GDALRelationshipH)
| Get the names of the participating fields from the left table in the relationship.
char ** | GDALRelationshipGetRightTableFields (GDALRelationshipH)
| Get the names of the participating fields from the right table in the relationship.
void | GDALRelationshipSetLeftTableFields (GDALRelationshipH, CSLConstList)
| Sets the names of the participating fields from the left table in the relationship.
void | GDALRelationshipSetRightTableFields (GDALRelationshipH, CSLConstList)
| Sets the names of the participating fields from the right table in the relationship.
char ** | GDALRelationshipGetLeftMappingTableFields (GDALRelationshipH)
| Get the names of the mapping table fields which correspond to the participating fields from the left table in the relationship.
char ** | GDALRelationshipGetRightMappingTableFields (GDALRelationshipH)
| Get the names of the mapping table fields which correspond to the participating fields from the right table in the relationship.
void | GDALRelationshipSetLeftMappingTableFields (GDALRelationshipH, CSLConstList)
| Sets the names of the mapping table fields which correspond to the participating fields from the left table in the relationship.
void | GDALRelationshipSetRightMappingTableFields (GDALRelationshipH, CSLConstList)
| Sets the names of the mapping table fields which correspond to the participating fields from the right table in the relationship.
GDALRelationshipType | GDALRelationshipGetType (GDALRelationshipH)
| Get the type of the relationship.
void | GDALRelationshipSetType (GDALRelationshipH, GDALRelationshipType)
| Sets the type of the relationship.
const char * | GDALRelationshipGetForwardPathLabel (GDALRelationshipH)
| Get the label of the forward path for the relationship.
void | GDALRelationshipSetForwardPathLabel (GDALRelationshipH, const char *)
| Sets the label of the forward path for the relationship.
const char * | GDALRelationshipGetBackwardPathLabel (GDALRelationshipH)
| Get the label of the backward path for the relationship.
void | GDALRelationshipSetBackwardPathLabel (GDALRelationshipH, const char *)
| Sets the label of the backward path for the relationship.
const char * | GDALRelationshipGetRelatedTableType (GDALRelationshipH)
| Get the type string of the related table.
void | GDALRelationshipSetRelatedTableType (GDALRelationshipH, const char *)
| Sets the type string of the related table.
void | GDALSetCacheMax (int nBytes)
| Set maximum cache memory.
int | GDALGetCacheMax (void)
| Get maximum cache memory.
int | GDALGetCacheUsed (void)
| Get cache memory used.
void | GDALSetCacheMax64 (GIntBig nBytes)
| Set maximum cache memory.
GIntBig | GDALGetCacheMax64 (void)
| Get maximum cache memory.
GIntBig | GDALGetCacheUsed64 (void)
| Get cache memory used.
int | GDALFlushCacheBlock (void)
| Try to flush one cached raster block.
CPLVirtualMem * | GDALDatasetGetVirtualMem (GDALDatasetH hDS, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eBufType, int nBandCount, int *panBandMap, int nPixelSpace, GIntBig nLineSpace, GIntBig nBandSpace, size_t nCacheSize, size_t nPageSizeHint, int bSingleThreadUsage, CSLConstList papszOptions)
| Create a CPLVirtualMem object from a GDAL dataset object.
CPLVirtualMem * | GDALRasterBandGetVirtualMem (GDALRasterBandH hBand, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eBufType, int nPixelSpace, GIntBig nLineSpace, size_t nCacheSize, size_t nPageSizeHint, int bSingleThreadUsage, CSLConstList papszOptions)
| Create a CPLVirtualMem object from a GDAL raster band object.
CPLVirtualMem * | GDALGetVirtualMemAuto (GDALRasterBandH hBand, GDALRWFlag eRWFlag, int *pnPixelSpace, GIntBig *pnLineSpace, CSLConstList papszOptions)
| Create a CPLVirtualMem object from a GDAL raster band object.
CPLVirtualMem * | GDALDatasetGetTiledVirtualMem (GDALDatasetH hDS, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nTileXSize, int nTileYSize, GDALDataType eBufType, int nBandCount, int *panBandMap, GDALTileOrganization eTileOrganization, size_t nCacheSize, int bSingleThreadUsage, CSLConstList papszOptions)
| Create a CPLVirtualMem object from a GDAL dataset object, with tiling organization.
CPLVirtualMem * | GDALRasterBandGetTiledVirtualMem (GDALRasterBandH hBand, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nTileXSize, int nTileYSize, GDALDataType eBufType, size_t nCacheSize, int bSingleThreadUsage, CSLConstList papszOptions)
| Create a CPLVirtualMem object from a GDAL rasterband object, with tiling organization.
GDALDatasetH | GDALCreatePansharpenedVRT (const char *pszXML, GDALRasterBandH hPanchroBand, int nInputSpectralBands, GDALRasterBandH *pahInputSpectralBands)
| Create a virtual pansharpened dataset.
CPLXMLNode * | GDALGetJPEG2000Structure (const char *pszFilename, CSLConstList papszOptions)
| Dump the structure of a JPEG2000 file as a XML tree.
GDALDatasetH | GDALCreateMultiDimensional (GDALDriverH hDriver, const char *pszName, CSLConstList papszRootGroupOptions, CSLConstList papszOptions)
| Create a new multidimensional dataset with this driver.
GDALExtendedDataTypeH | GDALExtendedDataTypeCreate (GDALDataType eType)
| Return a new GDALExtendedDataType of class GEDTC_NUMERIC.
GDALExtendedDataTypeH | GDALExtendedDataTypeCreateString (size_t nMaxStringLength)
| Return a new GDALExtendedDataType of class GEDTC_STRING.
GDALExtendedDataTypeH | GDALExtendedDataTypeCreateStringEx (size_t nMaxStringLength, GDALExtendedDataTypeSubType eSubType)
| Return a new GDALExtendedDataType of class GEDTC_STRING.
GDALExtendedDataTypeH | GDALExtendedDataTypeCreateCompound (const char *pszName, size_t nTotalSize, size_t nComponents, const GDALEDTComponentH *comps)
| Return a new GDALExtendedDataType of class GEDTC_COMPOUND.
void | GDALExtendedDataTypeRelease (GDALExtendedDataTypeH hEDT)
| Release the GDAL in-memory object associated with a GDALExtendedDataTypeH.
const char * | GDALExtendedDataTypeGetName (GDALExtendedDataTypeH hEDT)
| Return type name.
GDALExtendedDataTypeClass | GDALExtendedDataTypeGetClass (GDALExtendedDataTypeH hEDT)
| Return type class.
GDALDataType | GDALExtendedDataTypeGetNumericDataType (GDALExtendedDataTypeH hEDT)
| Return numeric data type (only valid when GetClass() == GEDTC_NUMERIC)
size_t | GDALExtendedDataTypeGetSize (GDALExtendedDataTypeH hEDT)
| Return data type size in bytes.
size_t | GDALExtendedDataTypeGetMaxStringLength (GDALExtendedDataTypeH hEDT)
| Return the maximum length of a string in bytes.
GDALEDTComponentH * | GDALExtendedDataTypeGetComponents (GDALExtendedDataTypeH hEDT, size_t *pnCount)
| Return the components of the data type (only valid when GetClass() == GEDTC_COMPOUND)
void | GDALExtendedDataTypeFreeComponents (GDALEDTComponentH *components, size_t nCount)
| Free the return of GDALExtendedDataTypeGetComponents().
int | GDALExtendedDataTypeCanConvertTo (GDALExtendedDataTypeH hSourceEDT, GDALExtendedDataTypeH hTargetEDT)
| Return whether this data type can be converted to the other one.
int | GDALExtendedDataTypeEquals (GDALExtendedDataTypeH hFirstEDT, GDALExtendedDataTypeH hSecondEDT)
| Return whether this data type is equal to another one.
GDALExtendedDataTypeSubType | GDALExtendedDataTypeGetSubType (GDALExtendedDataTypeH hEDT)
| Return the subtype of a type.
GDALEDTComponentH | GDALEDTComponentCreate (const char *pszName, size_t nOffset, GDALExtendedDataTypeH hType)
| Create a new GDALEDTComponent.
void | GDALEDTComponentRelease (GDALEDTComponentH hComp)
| Release the GDAL in-memory object associated with a GDALEDTComponentH.
const char * | GDALEDTComponentGetName (GDALEDTComponentH hComp)
| Return the name.
size_t | GDALEDTComponentGetOffset (GDALEDTComponentH hComp)
| Return the offset (in bytes) of the component in the compound data type.
GDALExtendedDataTypeH | GDALEDTComponentGetType (GDALEDTComponentH hComp)
| Return the data type of the component.
GDALGroupH | GDALDatasetGetRootGroup (GDALDatasetH hDS)
| Return the root GDALGroup of this dataset.
void | GDALGroupRelease (GDALGroupH hGroup)
| Release the GDAL in-memory object associated with a GDALGroupH.
const char * | GDALGroupGetName (GDALGroupH hGroup)
| Return the name of the group.
const char * | GDALGroupGetFullName (GDALGroupH hGroup)
| Return the full name of the group.
char ** | GDALGroupGetMDArrayNames (GDALGroupH hGroup, CSLConstList papszOptions)
| Return the list of multidimensional array names contained in this group.
GDALMDArrayH | GDALGroupOpenMDArray (GDALGroupH hGroup, const char *pszMDArrayName, CSLConstList papszOptions)
| Open and return a multidimensional array.
GDALMDArrayH | GDALGroupOpenMDArrayFromFullname (GDALGroupH hGroup, const char *pszMDArrayName, CSLConstList papszOptions)
| Open and return a multidimensional array from its fully qualified name.
GDALMDArrayH | GDALGroupResolveMDArray (GDALGroupH hGroup, const char *pszName, const char *pszStartingPoint, CSLConstList papszOptions)
| Locate an array in a group and its subgroups by name.
char ** | GDALGroupGetGroupNames (GDALGroupH hGroup, CSLConstList papszOptions)
| Return the list of sub-groups contained in this group.
GDALGroupH | GDALGroupOpenGroup (GDALGroupH hGroup, const char *pszSubGroupName, CSLConstList papszOptions)
| Open and return a sub-group.
GDALGroupH | GDALGroupOpenGroupFromFullname (GDALGroupH hGroup, const char *pszMDArrayName, CSLConstList papszOptions)
| Open and return a sub-group from its fully qualified name.
char ** | GDALGroupGetVectorLayerNames (GDALGroupH hGroup, CSLConstList papszOptions)
| Return the list of layer names contained in this group.
OGRLayerH | GDALGroupOpenVectorLayer (GDALGroupH hGroup, const char *pszVectorLayerName, CSLConstList papszOptions)
| Open and return a vector layer.
GDALDimensionH * | GDALGroupGetDimensions (GDALGroupH hGroup, size_t *pnCount, CSLConstList papszOptions)
| Return the list of dimensions contained in this group and used by its arrays.
GDALAttributeH | GDALGroupGetAttribute (GDALGroupH hGroup, const char *pszName)
| Return an attribute by its name.
GDALAttributeH * | GDALGroupGetAttributes (GDALGroupH hGroup, size_t *pnCount, CSLConstList papszOptions)
| Return the list of attributes contained in this group.
CSLConstList | GDALGroupGetStructuralInfo (GDALGroupH hGroup)
| Return structural information on the group.
GDALGroupH | GDALGroupCreateGroup (GDALGroupH hGroup, const char *pszSubGroupName, CSLConstList papszOptions)
| Create a sub-group within a group.
bool | GDALGroupDeleteGroup (GDALGroupH hGroup, const char *pszName, CSLConstList papszOptions)
| Delete a sub-group from a group.
GDALDimensionH | GDALGroupCreateDimension (GDALGroupH hGroup, const char *pszName, const char *pszType, const char *pszDirection, GUInt64 nSize, CSLConstList papszOptions)
| Create a dimension within a group.
GDALMDArrayH | GDALGroupCreateMDArray (GDALGroupH hGroup, const char *pszName, size_t nDimensions, GDALDimensionH *pahDimensions, GDALExtendedDataTypeH hEDT, CSLConstList papszOptions)
| Create a multidimensional array within a group.
bool | GDALGroupDeleteMDArray (GDALGroupH hGroup, const char *pszName, CSLConstList papszOptions)
| Delete an array from a group.
GDALAttributeH | GDALGroupCreateAttribute (GDALGroupH hGroup, const char *pszName, size_t nDimensions, const GUInt64 *panDimensions, GDALExtendedDataTypeH hEDT, CSLConstList papszOptions)
| Create a attribute within a group.
bool | GDALGroupDeleteAttribute (GDALGroupH hGroup, const char *pszName, CSLConstList papszOptions)
| Delete an attribute from a group.
bool | GDALGroupRename (GDALGroupH hGroup, const char *pszNewName)
| Rename the group.
GDALGroupH | GDALGroupSubsetDimensionFromSelection (GDALGroupH hGroup, const char *pszSelection, CSLConstList papszOptions)
| Return a virtual group whose one dimension has been subset according to a selection.
void | GDALMDArrayRelease (GDALMDArrayH hMDArray)
| Release the GDAL in-memory object associated with a GDALMDArray.
const char * | GDALMDArrayGetName (GDALMDArrayH hArray)
| Return array name.
const char * | GDALMDArrayGetFullName (GDALMDArrayH hArray)
| Return array full name.
GUInt64 | GDALMDArrayGetTotalElementsCount (GDALMDArrayH hArray)
| Return the total number of values in the array.
size_t | GDALMDArrayGetDimensionCount (GDALMDArrayH hArray)
| Return the number of dimensions.
GDALDimensionH * | GDALMDArrayGetDimensions (GDALMDArrayH hArray, size_t *pnCount)
| Return the dimensions of the array.
GDALExtendedDataTypeH | GDALMDArrayGetDataType (GDALMDArrayH hArray)
| Return the data type.
int | GDALMDArrayRead (GDALMDArrayH hArray, const GUInt64 *arrayStartIdx, const size_t *count, const GInt64 *arrayStep, const GPtrDiff_t *bufferStride, GDALExtendedDataTypeH bufferDatatype, void *pDstBuffer, const void *pDstBufferAllocStart, size_t nDstBufferllocSize)
| Read part or totality of a multidimensional array.
int | GDALMDArrayWrite (GDALMDArrayH hArray, const GUInt64 *arrayStartIdx, const size_t *count, const GInt64 *arrayStep, const GPtrDiff_t *bufferStride, GDALExtendedDataTypeH bufferDatatype, const void *pSrcBuffer, const void *psrcBufferAllocStart, size_t nSrcBufferllocSize)
| Write part or totality of a multidimensional array.
int | GDALMDArrayAdviseRead (GDALMDArrayH hArray, const GUInt64 *arrayStartIdx, const size_t *count)
| Advise driver of upcoming read requests.
int | GDALMDArrayAdviseReadEx (GDALMDArrayH hArray, const GUInt64 *arrayStartIdx, const size_t *count, CSLConstList papszOptions)
| Advise driver of upcoming read requests.
GDALAttributeH | GDALMDArrayGetAttribute (GDALMDArrayH hArray, const char *pszName)
| Return an attribute by its name.
GDALAttributeH * | GDALMDArrayGetAttributes (GDALMDArrayH hArray, size_t *pnCount, CSLConstList papszOptions)
| Return the list of attributes contained in this array.
GDALAttributeH | GDALMDArrayCreateAttribute (GDALMDArrayH hArray, const char *pszName, size_t nDimensions, const GUInt64 *panDimensions, GDALExtendedDataTypeH hEDT, CSLConstList papszOptions)
| Create a attribute within an array.
bool | GDALMDArrayDeleteAttribute (GDALMDArrayH hArray, const char *pszName, CSLConstList papszOptions)
| Delete an attribute from an array.
bool | GDALMDArrayResize (GDALMDArrayH hArray, const GUInt64 *panNewDimSizes, CSLConstList papszOptions)
| Resize an array to new dimensions.
const void * | GDALMDArrayGetRawNoDataValue (GDALMDArrayH hArray)
| Return the nodata value as a "raw" value.
double | GDALMDArrayGetNoDataValueAsDouble (GDALMDArrayH hArray, int *pbHasNoDataValue)
| Return the nodata value as a double.
int64_t | GDALMDArrayGetNoDataValueAsInt64 (GDALMDArrayH hArray, int *pbHasNoDataValue)
| Return the nodata value as a Int64.
uint64_t | GDALMDArrayGetNoDataValueAsUInt64 (GDALMDArrayH hArray, int *pbHasNoDataValue)
| Return the nodata value as a UInt64.
int | GDALMDArraySetRawNoDataValue (GDALMDArrayH hArray, const void *)
| Set the nodata value as a "raw" value.
int | GDALMDArraySetNoDataValueAsDouble (GDALMDArrayH hArray, double dfNoDataValue)
| Set the nodata value as a double.
int | GDALMDArraySetNoDataValueAsInt64 (GDALMDArrayH hArray, int64_t nNoDataValue)
| Set the nodata value as a Int64.
int | GDALMDArraySetNoDataValueAsUInt64 (GDALMDArrayH hArray, uint64_t nNoDataValue)
| Set the nodata value as a UInt64.
int | GDALMDArraySetScale (GDALMDArrayH hArray, double dfScale)
| Set the scale value to apply to raw values.
int | GDALMDArraySetScaleEx (GDALMDArrayH hArray, double dfScale, GDALDataType eStorageType)
| Set the scale value to apply to raw values.
double | GDALMDArrayGetScale (GDALMDArrayH hArray, int *pbHasValue)
| Get the scale value to apply to raw values.
double | GDALMDArrayGetScaleEx (GDALMDArrayH hArray, int *pbHasValue, GDALDataType *peStorageType)
| Get the scale value to apply to raw values.
int | GDALMDArraySetOffset (GDALMDArrayH hArray, double dfOffset)
| Set the scale value to apply to raw values.
int | GDALMDArraySetOffsetEx (GDALMDArrayH hArray, double dfOffset, GDALDataType eStorageType)
| Set the scale value to apply to raw values.
double | GDALMDArrayGetOffset (GDALMDArrayH hArray, int *pbHasValue)
| Get the scale value to apply to raw values.
double | GDALMDArrayGetOffsetEx (GDALMDArrayH hArray, int *pbHasValue, GDALDataType *peStorageType)
| Get the scale value to apply to raw values.
GUInt64 * | GDALMDArrayGetBlockSize (GDALMDArrayH hArray, size_t *pnCount)
| Return the "natural" block size of the array along all dimensions.
int | GDALMDArraySetUnit (GDALMDArrayH hArray, const char *)
| Set the variable unit.
const char * | GDALMDArrayGetUnit (GDALMDArrayH hArray)
| Return the array unit.
int | GDALMDArraySetSpatialRef (GDALMDArrayH, OGRSpatialReferenceH)
| Assign a spatial reference system object to the array.
OGRSpatialReferenceH | GDALMDArrayGetSpatialRef (GDALMDArrayH hArray)
| Return the spatial reference system object associated with the array.
size_t * | GDALMDArrayGetProcessingChunkSize (GDALMDArrayH hArray, size_t *pnCount, size_t nMaxChunkMemory)
| Return an optimal chunk size for read/write operations, given the natural block size and memory constraints specified.
CSLConstList | GDALMDArrayGetStructuralInfo (GDALMDArrayH hArray)
| Return structural information on the array.
GDALMDArrayH | GDALMDArrayGetView (GDALMDArrayH hArray, const char *pszViewExpr)
| Return a view of the array using slicing or field access.
GDALMDArrayH | GDALMDArrayTranspose (GDALMDArrayH hArray, size_t nNewAxisCount, const int *panMapNewAxisToOldAxis)
| Return a view of the array whose axis have been reordered.
GDALMDArrayH | GDALMDArrayGetUnscaled (GDALMDArrayH hArray)
| Return an array that is the unscaled version of the current one.
GDALMDArrayH | GDALMDArrayGetMask (GDALMDArrayH hArray, CSLConstList papszOptions)
| Return an array that is a mask for the current array.
GDALDatasetH | GDALMDArrayAsClassicDataset (GDALMDArrayH hArray, size_t iXDim, size_t iYDim)
| Return a view of this array as a "classic" GDALDataset (ie 2D)
GDALDatasetH | GDALMDArrayAsClassicDatasetEx (GDALMDArrayH hArray, size_t iXDim, size_t iYDim, GDALGroupH hRootGroup, CSLConstList papszOptions)
| Return a view of this array as a "classic" GDALDataset (ie 2D)
CPLErr | GDALMDArrayGetStatistics (GDALMDArrayH hArray, GDALDatasetH, int bApproxOK, int bForce, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev, GUInt64 *pnValidCount, GDALProgressFunc pfnProgress, void *pProgressData)
| Fetch statistics.
int | GDALMDArrayComputeStatistics (GDALMDArrayH hArray, GDALDatasetH, int bApproxOK, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev, GUInt64 *pnValidCount, GDALProgressFunc, void *pProgressData)
| Compute statistics.
int | GDALMDArrayComputeStatisticsEx (GDALMDArrayH hArray, GDALDatasetH, int bApproxOK, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev, GUInt64 *pnValidCount, GDALProgressFunc, void *pProgressData, CSLConstList papszOptions)
| Compute statistics.
GDALMDArrayH | GDALMDArrayGetResampled (GDALMDArrayH hArray, size_t nNewDimCount, const GDALDimensionH *pahNewDims, GDALRIOResampleAlg resampleAlg, OGRSpatialReferenceH hTargetSRS, CSLConstList papszOptions)
| Return an array that is a resampled / reprojected view of the current array.
GDALMDArrayH | GDALMDArrayGetGridded (GDALMDArrayH hArray, const char *pszGridOptions, GDALMDArrayH hXArray, GDALMDArrayH hYArray, CSLConstList papszOptions)
| Return a gridded array from scattered point data, that is from an array whose last dimension is the indexing variable of X and Y arrays.
GDALMDArrayH * | GDALMDArrayGetCoordinateVariables (GDALMDArrayH hArray, size_t *pnCount)
| Return coordinate variables.
void | GDALReleaseArrays (GDALMDArrayH *arrays, size_t nCount)
| Free the return of GDALMDArrayGetCoordinateVariables()
int | GDALMDArrayCache (GDALMDArrayH hArray, CSLConstList papszOptions)
| Cache the content of the array into an auxiliary filename.
bool | GDALMDArrayRename (GDALMDArrayH hArray, const char *pszNewName)
| Rename the array.
GDALRasterAttributeTableH | GDALCreateRasterAttributeTableFromMDArrays (GDALRATTableType eTableType, int nArrays, const GDALMDArrayH *ahArrays, const GDALRATFieldUsage *paeUsages)
| Return a virtual Raster Attribute Table from several GDALMDArray's.
void | GDALAttributeRelease (GDALAttributeH hAttr)
| Release the GDAL in-memory object associated with a GDALAttribute.
void | GDALReleaseAttributes (GDALAttributeH *attributes, size_t nCount)
| Free the return of GDALGroupGetAttributes() or GDALMDArrayGetAttributes()
const char * | GDALAttributeGetName (GDALAttributeH hAttr)
| Return the name of the attribute.
const char * | GDALAttributeGetFullName (GDALAttributeH hAttr)
| Return the full name of the attribute.
GUInt64 | GDALAttributeGetTotalElementsCount (GDALAttributeH hAttr)
| Return the total number of values in the attribute.
size_t | GDALAttributeGetDimensionCount (GDALAttributeH hAttr)
| Return the number of dimensions.
GUInt64 * | GDALAttributeGetDimensionsSize (GDALAttributeH hAttr, size_t *pnCount)
| Return the dimension sizes of the attribute.
GDALExtendedDataTypeH | GDALAttributeGetDataType (GDALAttributeH hAttr)
| Return the data type.
GByte * | GDALAttributeReadAsRaw (GDALAttributeH hAttr, size_t *pnSize)
| Return the raw value of an attribute.
void | GDALAttributeFreeRawResult (GDALAttributeH hAttr, GByte *raw, size_t nSize)
| Free the return of GDALAttributeAsRaw()
const char * | GDALAttributeReadAsString (GDALAttributeH hAttr)
| Return the value of an attribute as a string.
int | GDALAttributeReadAsInt (GDALAttributeH hAttr)
| Return the value of an attribute as a integer.
double | GDALAttributeReadAsDouble (GDALAttributeH hAttr)
| Return the value of an attribute as a double.
char ** | GDALAttributeReadAsStringArray (GDALAttributeH hAttr)
| Return the value of an attribute as an array of strings.
int * | GDALAttributeReadAsIntArray (GDALAttributeH hAttr, size_t *pnCount)
| Return the value of an attribute as an array of integers.
double * | GDALAttributeReadAsDoubleArray (GDALAttributeH hAttr, size_t *pnCount)
| Return the value of an attribute as an array of doubles.
int | GDALAttributeWriteRaw (GDALAttributeH hAttr, const void *, size_t)
| Write an attribute from raw values expressed in GetDataType()
int | GDALAttributeWriteString (GDALAttributeH hAttr, const char *)
| Write an attribute from a string value.
int | GDALAttributeWriteStringArray (GDALAttributeH hAttr, CSLConstList)
| Write an attribute from an array of strings.
int | GDALAttributeWriteInt (GDALAttributeH hAttr, int)
| Write an attribute from a integer value.
int | GDALAttributeWriteDouble (GDALAttributeH hAttr, double)
| Write an attribute from a double value.
int | GDALAttributeWriteDoubleArray (GDALAttributeH hAttr, const double *, size_t)
| Write an attribute from an array of double.
bool | GDALAttributeRename (GDALAttributeH hAttr, const char *pszNewName)
| Rename the attribute.
void | GDALDimensionRelease (GDALDimensionH hDim)
| Release the GDAL in-memory object associated with a GDALDimension.
void | GDALReleaseDimensions (GDALDimensionH *dims, size_t nCount)
| Free the return of GDALGroupGetDimensions() or GDALMDArrayGetDimensions()
const char * | GDALDimensionGetName (GDALDimensionH hDim)
| Return dimension name.
const char * | GDALDimensionGetFullName (GDALDimensionH hDim)
| Return dimension full name.
const char * | GDALDimensionGetType (GDALDimensionH hDim)
| Return dimension type.
const char * | GDALDimensionGetDirection (GDALDimensionH hDim)
| Return dimension direction.
GUInt64 | GDALDimensionGetSize (GDALDimensionH hDim)
| Return the size, that is the number of values along the dimension.
GDALMDArrayH | GDALDimensionGetIndexingVariable (GDALDimensionH hDim)
| Return the variable that is used to index the dimension (if there is one).
int | GDALDimensionSetIndexingVariable (GDALDimensionH hDim, GDALMDArrayH hArray)
| Set the variable that is used to index the dimension.
bool | GDALDimensionRename (GDALDimensionH hDim, const char *pszNewName)
| Rename the dimension.

## Detailed Description

Public (C callable) GDAL entry points.

## Macro Definition Documentation

## ◆ GDAL_CHECK_VERSION

#define GDAL_CHECK_VERSION | ( |  | pszCallingComponentName | ) |

Value:
GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, \
pszCallingComponentName)
GDALCheckVersion
int GDALCheckVersion(int nVersionMajor, int nVersionMinor, const char *pszCallingComponentName)
Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor.
Definition gdal_misc.cpp:2719

Helper macro for GDALCheckVersion()

See also
  GDALCheckVersion()

## ◆ GDAL_DATA_COVERAGE_STATUS_DATA

#define GDAL_DATA_COVERAGE_STATUS_DATA 0x02

Flag returned by GDALGetDataCoverageStatus() when there is (potentially) data in the queried window.

Can be combined with the binary or operator with GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED or GDAL_DATA_COVERAGE_STATUS_EMPTY

## ◆ GDAL_DATA_COVERAGE_STATUS_EMPTY

#define GDAL_DATA_COVERAGE_STATUS_EMPTY 0x04

Flag returned by GDALGetDataCoverageStatus() when there is nodata in the queried window.

This is typically identified by the concept of missing block in formats that supports it. Can be combined with the binary or operator with GDAL_DATA_COVERAGE_STATUS_DATA

## ◆ GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED

#define GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED 0x01

Flag returned by GDALGetDataCoverageStatus() when the driver does not implement GetDataCoverageStatus().

This flag should be returned together with GDAL_DATA_COVERAGE_STATUS_DATA

## ◆ GDAL_DCAP_COORDINATE_EPOCH

#define GDAL_DCAP_COORDINATE_EPOCH "DCAP_COORDINATE_EPOCH"

Capability set by drivers which support storing/retrieving coordinate epoch for dynamic CRS.

Since
  GDAL 3.4

## ◆ GDAL_DCAP_CREATE

#define GDAL_DCAP_CREATE "DCAP_CREATE"

Capability set by a driver that implements the Create() API.

If GDAL_DCAP_CREATE is set, but GDAL_DCAP_CREATECOPY not, a generic CreateCopy() implementation is available and will use the Create() API of the driver. So to test if some CreateCopy() implementation is available, generic or specialize, test for both GDAL_DCAP_CREATE and GDAL_DCAP_CREATECOPY.

## ◆ GDAL_DCAP_CREATE_FIELD

#define GDAL_DCAP_CREATE_FIELD "DCAP_CREATE_FIELD"

Capability set by a driver that can create fields.

Since
  GDAL 3.6

## ◆ GDAL_DCAP_CREATE_LAYER

#define GDAL_DCAP_CREATE_LAYER "DCAP_CREATE_LAYER"

Capability set by a driver that can create layers.

Since
  GDAL 3.6

## ◆ GDAL_DCAP_CREATE_MULTIDIMENSIONAL

#define GDAL_DCAP_CREATE_MULTIDIMENSIONAL "DCAP_CREATE_MULTIDIMENSIONAL"

Capability set by a driver that implements the CreateMultidimensional() API.

Since
  GDAL 3.1

## ◆ GDAL_DCAP_CREATE_RELATIONSHIP

#define GDAL_DCAP_CREATE_RELATIONSHIP "DCAP_CREATE_RELATIONSHIP"

Capability set by drivers for formats which support creating table relationships.

Since
  GDAL 3.6

## ◆ GDAL_DCAP_CREATECOPY

#define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"

Capability set by a driver that implements the CreateCopy() API.

If GDAL_DCAP_CREATECOPY is not defined, but GDAL_DCAP_CREATE is set, a generic CreateCopy() implementation is available and will use the Create() API of the driver. So to test if some CreateCopy() implementation is available, generic or specialize, test for both GDAL_DCAP_CREATE and GDAL_DCAP_CREATECOPY.

## ◆ GDAL_DCAP_CREATECOPY_MULTIDIMENSIONAL

#define GDAL_DCAP_CREATECOPY_MULTIDIMENSIONAL "DCAP_CREATECOPY_MULTIDIMENSIONAL"

Capability set by a driver that implements the CreateCopy() API, but with multidimensional raster as input and output.

Since
  GDAL 3.1

## ◆ GDAL_DCAP_CURVE_GEOMETRIES

#define GDAL_DCAP_CURVE_GEOMETRIES "DCAP_CURVE_GEOMETRIES"

Capability set by a driver that can support curved geometries.

Since
  GDAL 3.6

## ◆ GDAL_DCAP_DEFAULT_FIELDS

#define GDAL_DCAP_DEFAULT_FIELDS "DCAP_DEFAULT_FIELDS"

Capability set by a driver that can create fields with DEFAULT values.

Since
  GDAL 2.0

## ◆ GDAL_DCAP_DELETE_FIELD

#define GDAL_DCAP_DELETE_FIELD "DCAP_DELETE_FIELD"

Capability set by a driver that can delete fields.

Since
  GDAL 3.6

## ◆ GDAL_DCAP_DELETE_LAYER

#define GDAL_DCAP_DELETE_LAYER "DCAP_DELETE_LAYER"

Capability set by a driver that can delete layers.

Since
  GDAL 3.6

## ◆ GDAL_DCAP_DELETE_RELATIONSHIP

#define GDAL_DCAP_DELETE_RELATIONSHIP "DCAP_DELETE_RELATIONSHIP"

Capability set by drivers for formats which support deleting table relationships.

Since
  GDAL 3.6

## ◆ GDAL_DCAP_FEATURE_STYLES

#define GDAL_DCAP_FEATURE_STYLES "DCAP_FEATURE_STYLES"

Capability set by drivers which support either reading or writing feature styles.

Consider using the more granular GDAL_DCAP_FEATURE_STYLES_READ or GDAL_DCAP_FEATURE_STYLES_WRITE capabilities instead.

Since
  GDAL 2.3

## ◆ GDAL_DCAP_FEATURE_STYLES_READ

#define GDAL_DCAP_FEATURE_STYLES_READ "DCAP_FEATURE_STYLES_READ"

Capability set by drivers which support reading feature styles.

Since
  GDAL 3.7

## ◆ GDAL_DCAP_FEATURE_STYLES_WRITE

#define GDAL_DCAP_FEATURE_STYLES_WRITE "DCAP_FEATURE_STYLES_WRITE"

Capability set by drivers which support writing feature styles.

Since
  GDAL 3.7

## ◆ GDAL_DCAP_FIELD_DOMAINS

#define GDAL_DCAP_FIELD_DOMAINS "DCAP_FIELD_DOMAINS"

Capability set by drivers for formats which support reading field domains.

Since
  GDAL 3.5

## ◆ GDAL_DCAP_FLUSHCACHE_CONSISTENT_STATE

#define GDAL_DCAP_FLUSHCACHE_CONSISTENT_STATE "DCAP_FLUSHCACHE_CONSISTENT_STATE"

Capability set by drivers whose FlushCache() implementation returns a dataset that can be opened afterwards and seen in a consistent state, without requiring the dataset on which FlushCache() has been called to be closed.

Since
  GDAL 3.8

## ◆ GDAL_DCAP_GNM

#define GDAL_DCAP_GNM "DCAP_GNM"

Capability set by a driver having geographical network model capability.

Since
  GDAL 2.1

## ◆ GDAL_DCAP_HONOR_GEOM_COORDINATE_PRECISION

#define GDAL_DCAP_HONOR_GEOM_COORDINATE_PRECISION "DCAP_HONOR_GEOM_COORDINATE_PRECISION"

Capability set by drivers which honor the OGRCoordinatePrecision settings of geometry fields at layer creation and/or for OGRLayer::CreateGeomField().

Note that while those drivers honor the settings at feature writing time, they might not be able to store the precision settings in layer metadata, hence on reading it might not be possible to recover the precision with which coordinates have been written.

Since
  GDAL 3.9

## ◆ GDAL_DCAP_MEASURED_GEOMETRIES

#define GDAL_DCAP_MEASURED_GEOMETRIES "DCAP_MEASURED_GEOMETRIES"

Capability set by a driver that can support measured geometries.

Since
  GDAL 3.6

## ◆ GDAL_DCAP_MULTIDIM_RASTER

#define GDAL_DCAP_MULTIDIM_RASTER "DCAP_MULTIDIM_RASTER"

Capability set by a driver that supports multidimensional data.

Since
  GDAL 3.1

## ◆ GDAL_DCAP_MULTIPLE_VECTOR_LAYERS

#define GDAL_DCAP_MULTIPLE_VECTOR_LAYERS "DCAP_MULTIPLE_VECTOR_LAYERS"

Capability set by drivers for formats which support multiple vector layers.

Note: some GDAL drivers expose "virtual" layer support while the underlying formats themselves do not. This capability is only set for drivers of formats which have a native concept of multiple vector layers (such as GeoPackage).

Since
  GDAL 3.4

## ◆ GDAL_DCAP_NONSPATIAL

#define GDAL_DCAP_NONSPATIAL "DCAP_NONSPATIAL"

Capability set by a non-spatial driver having no support for geometries.

E.g. non-spatial vector drivers (e.g. spreadsheet format drivers) do not support geometries, and accordingly will have this capability present.

Since
  GDAL 2.3

## ◆ GDAL_DCAP_NOTNULL_FIELDS

#define GDAL_DCAP_NOTNULL_FIELDS "DCAP_NOTNULL_FIELDS"

Capability set by a driver that can create fields with NOT NULL constraint.

Since
  GDAL 2.0

## ◆ GDAL_DCAP_NOTNULL_GEOMFIELDS

#define GDAL_DCAP_NOTNULL_GEOMFIELDS "DCAP_NOTNULL_GEOMFIELDS"

Capability set by a driver that can create geometry fields with NOT NULL constraint.

Since
  GDAL 2.0

## ◆ GDAL_DCAP_RASTER

#define GDAL_DCAP_RASTER "DCAP_RASTER"

Capability set by a driver having raster capability.

Since
  GDAL 2.0

## ◆ GDAL_DCAP_RELATIONSHIPS

#define GDAL_DCAP_RELATIONSHIPS "DCAP_RELATIONSHIPS"

Capability set by drivers for formats which support reading table relationships.

Since
  GDAL 3.6

## ◆ GDAL_DCAP_RENAME_LAYERS

#define GDAL_DCAP_RENAME_LAYERS "DCAP_RENAME_LAYERS"

Capability set by drivers for formats which support renaming vector layers.

Since
  GDAL 3.5

## ◆ GDAL_DCAP_REORDER_FIELDS

#define GDAL_DCAP_REORDER_FIELDS "DCAP_REORDER_FIELDS"

Capability set by a driver that can reorder fields.

Since
  GDAL 3.6

## ◆ GDAL_DCAP_UNIQUE_FIELDS

#define GDAL_DCAP_UNIQUE_FIELDS "DCAP_UNIQUE_FIELDS"

Capability set by a driver that can create fields with UNIQUE constraint.

Since
  GDAL 3.2

## ◆ GDAL_DCAP_UPDATE_RELATIONSHIP

#define GDAL_DCAP_UPDATE_RELATIONSHIP "DCAP_UPDATE_RELATIONSHIP"

Capability set by drivers for formats which support updating existing table relationships.

Since
  GDAL 3.6

## ◆ GDAL_DCAP_VECTOR

#define GDAL_DCAP_VECTOR "DCAP_VECTOR"

Capability set by a driver having vector capability.

Since
  GDAL 2.0

## ◆ GDAL_DCAP_VECTOR_TRANSLATE_FROM

#define GDAL_DCAP_VECTOR_TRANSLATE_FROM "DCAP_VECTOR_TRANSLATE_FROM"

Capability set by a driver that implements the VectorTranslateFrom() API.

Since
  GDAL 3.8

## ◆ GDAL_DCAP_Z_GEOMETRIES

#define GDAL_DCAP_Z_GEOMETRIES "DCAP_Z_GEOMETRIES"

Capability set by a driver that can support the Z dimension for geometries.

Since
  GDAL 3.6

## ◆ GDAL_DIM_TYPE_HORIZONTAL_X

#define GDAL_DIM_TYPE_HORIZONTAL_X "HORIZONTAL_X"

Value for GDALDimension::GetType() specifying the X axis of a horizontal CRS.

Since
  GDAL 3.1

## ◆ GDAL_DIM_TYPE_HORIZONTAL_Y

#define GDAL_DIM_TYPE_HORIZONTAL_Y "HORIZONTAL_Y"

Value for GDALDimension::GetType() specifying the Y axis of a horizontal CRS.

Since
  GDAL 3.1

## ◆ GDAL_DIM_TYPE_PARAMETRIC

#define GDAL_DIM_TYPE_PARAMETRIC "PARAMETRIC"

Value for GDALDimension::GetType() specifying a parametric axis.

Since
  GDAL 3.1

## ◆ GDAL_DIM_TYPE_TEMPORAL

#define GDAL_DIM_TYPE_TEMPORAL "TEMPORAL"

Value for GDALDimension::GetType() specifying a temporal axis.

Since
  GDAL 3.1

## ◆ GDAL_DIM_TYPE_VERTICAL

#define GDAL_DIM_TYPE_VERTICAL "VERTICAL"

Value for GDALDimension::GetType() specifying a vertical axis.

Since
  GDAL 3.1

## ◆ GDAL_DMD_ALTER_FIELD_DEFN_FLAGS

#define GDAL_DMD_ALTER_FIELD_DEFN_FLAGS "GDAL_DMD_ALTER_FIELD_DEFN_FLAGS"

List of (space separated) flags supported by the OGRLayer::AlterFieldDefn() API.

Supported values are "Name", "Type", "WidthPrecision", "Nullable", "Default", "Unique", "Domain", "AlternativeName" and "Comment", corresponding respectively to the ALTER_NAME_FLAG, ALTER_TYPE_FLAG, ALTER_WIDTH_PRECISION_FLAG, ALTER_NULLABLE_FLAG, ALTER_DEFAULT_FLAG, ALTER_UNIQUE_FLAG, ALTER_DOMAIN_FLAG, ALTER_ALTERNATIVE_NAME_FLAG and ALTER_COMMENT_FLAG flags.

Note that advertizing one of these flags doesn't necessarily mean that all modifications of the corresponding property can be made. For example, altering the field type may be restricted by the current type of the field, etc.

See also
  GDAL_DMD_CREATION_FIELD_DEFN_FLAGS for capabilities supported when creating new fields.

Since
  GDAL 3.6

## ◆ GDAL_DMD_ALTER_GEOM_FIELD_DEFN_FLAGS

#define GDAL_DMD_ALTER_GEOM_FIELD_DEFN_FLAGS "DMD_ALTER_GEOM_FIELD_DEFN_FLAGS"

List of (space separated) flags supported by the OGRLayer::AlterGeomFieldDefn() API.

Supported values are "Name", "Type", "Nullable", "SRS", "CoordinateEpoch", corresponding respectively to the ALTER_GEOM_FIELD_DEFN_NAME_FLAG, ALTER_GEOM_FIELD_DEFN_TYPE_FLAG, ALTER_GEOM_FIELD_DEFN_NULLABLE_FLAG, ALTER_GEOM_FIELD_DEFN_SRS_FLAG, ALTER_GEOM_FIELD_DEFN_SRS_COORD_EPOCH_FLAG flags. Note that advertizing one of these flags doesn't necessarily mean that all modifications of the corresponding property can be made. For example, altering the geometry type may be restricted by the type of the geometries in the field, or changing the nullable state to non-nullable is not possible if null geometries are present, etc.

Since
  GDAL 3.6

## ◆ GDAL_DMD_CONNECTION_PREFIX

#define GDAL_DMD_CONNECTION_PREFIX "DMD_CONNECTION_PREFIX"

Connection prefix to provide as the file name of the open function.

Typically set for non-file based drivers. Generally used with open options.

Since
  GDAL 2.0

## ◆ GDAL_DMD_CREATION_FIELD_DEFN_FLAGS

#define GDAL_DMD_CREATION_FIELD_DEFN_FLAGS "DMD_CREATION_FIELD_DEFN_FLAGS"

List of (space separated) capability flags supported by the CreateField() API.

Supported values are:

- "WidthPrecision": field width and precision is supported.
- "Nullable": field (non-)nullable status is supported.
- "Unique": field unique constraint is supported.
- "Default": field default value is supported.
- "AlternativeName": field alternative name is supported.
- "Comment": field comment is supported.
- "Domain": field can be associated with a domain.

See also
  GDAL_DMD_ALTER_FIELD_DEFN_FLAGS for capabilities supported when altering existing fields.

Since
  GDAL 3.7

## ◆ GDAL_DMD_CREATION_FIELD_DOMAIN_TYPES

#define GDAL_DMD_CREATION_FIELD_DOMAIN_TYPES "DMD_CREATION_FIELD_DOMAIN_TYPES"

List of (space separated) field domain types supported by the AddFieldDomain() API.

Supported values are Coded, Range and Glob, corresponding to the OGRFieldDomainType::OFDT_CODED, OGRFieldDomainType::OFDT_RANGE, and OGRFieldDomainType::OFDT_GLOB field domain types respectively.

Since
  GDAL 3.5

## ◆ GDAL_DMD_CREATIONFIELDDATASUBTYPES

#define GDAL_DMD_CREATIONFIELDDATASUBTYPES "DMD_CREATIONFIELDDATASUBTYPES"

List of (space separated) vector field sub-types supported by the CreateField() API.

Since
  GDAL 2.3

## ◆ GDAL_DMD_CREATIONFIELDDATATYPES

#define GDAL_DMD_CREATIONFIELDDATATYPES "DMD_CREATIONFIELDDATATYPES"

List of (space separated) vector field types supported by the CreateField() API.

Since
  GDAL 2.0

## ◆ GDAL_DMD_EXTENSIONS

#define GDAL_DMD_EXTENSIONS "DMD_EXTENSIONS"

List of (space separated) extensions handled by the driver.

Since
  GDAL 2.0

## ◆ GDAL_DMD_GEOMETRY_FLAGS

#define GDAL_DMD_GEOMETRY_FLAGS "GDAL_DMD_GEOMETRY_FLAGS"

List of (space separated) flags which reflect the geometry handling behavior of a driver.

Supported values are currently:

- "EquatesMultiAndSingleLineStringDuringWrite" and "EquatesMultiAndSinglePolygonDuringWrite". These flags indicate that the driver does not differentiate between single-part and multi-part linestring and polygon geometries when writing features respectively.

Since
  GDAL 3.6

## ◆ GDAL_DMD_ILLEGAL_FIELD_NAMES

#define GDAL_DMD_ILLEGAL_FIELD_NAMES "GDAL_DMD_ILLEGAL_FIELD_NAMES"

List of (space separated) field names which are considered illegal by the driver and should not be used when creating/altering fields.

Since
  GDAL 3.7

## ◆ GDAL_DMD_MULTIDIM_ARRAY_CREATIONOPTIONLIST

#define GDAL_DMD_MULTIDIM_ARRAY_CREATIONOPTIONLIST "DMD_MULTIDIM_ARRAY_CREATIONOPTIONLIST"

XML snippet with multidimensional array creation options.

Since
  GDAL 3.1

## ◆ GDAL_DMD_MULTIDIM_ARRAY_OPENOPTIONLIST

#define GDAL_DMD_MULTIDIM_ARRAY_OPENOPTIONLIST "DMD_MULTIDIM_ARRAY_OPENOPTIONLIST"

XML snippet with multidimensional array open options.

Since
  GDAL 3.6

## ◆ GDAL_DMD_MULTIDIM_ATTRIBUTE_CREATIONOPTIONLIST

#define GDAL_DMD_MULTIDIM_ATTRIBUTE_CREATIONOPTIONLIST "DMD_MULTIDIM_ATTRIBUTE_CREATIONOPTIONLIST"

XML snippet with multidimensional attribute creation options.

Since
  GDAL 3.1

## ◆ GDAL_DMD_MULTIDIM_DATASET_CREATIONOPTIONLIST

#define GDAL_DMD_MULTIDIM_DATASET_CREATIONOPTIONLIST "DMD_MULTIDIM_DATASET_CREATIONOPTIONLIST"

XML snippet with multidimensional dataset creation options.

Since
  GDAL 3.1

## ◆ GDAL_DMD_MULTIDIM_DIMENSION_CREATIONOPTIONLIST

#define GDAL_DMD_MULTIDIM_DIMENSION_CREATIONOPTIONLIST "DMD_MULTIDIM_DIMENSION_CREATIONOPTIONLIST"

XML snippet with multidimensional dimension creation options.

Since
  GDAL 3.1

## ◆ GDAL_DMD_MULTIDIM_GROUP_CREATIONOPTIONLIST

#define GDAL_DMD_MULTIDIM_GROUP_CREATIONOPTIONLIST "DMD_MULTIDIM_GROUP_CREATIONOPTIONLIST"

XML snippet with multidimensional group creation options.

Since
  GDAL 3.1

## ◆ GDAL_DMD_NUMERIC_FIELD_WIDTH_INCLUDES_DECIMAL_SEPARATOR

#define GDAL_DMD_NUMERIC_FIELD_WIDTH_INCLUDES_DECIMAL_SEPARATOR "DMD_NUMERIC_FIELD_WIDTH_INCLUDES_DECIMAL_SEPARATOR"

Capability set by a vector driver that supports field width and precision.

This capability reflects that a vector driver includes the decimal separator in the field width of fields of type OFTReal.

See GDAL_DMD_NUMERIC_FIELD_WIDTH_INCLUDES_SIGN for a related capability flag.

Since
  GDAL 3.7

## ◆ GDAL_DMD_NUMERIC_FIELD_WIDTH_INCLUDES_SIGN

#define GDAL_DMD_NUMERIC_FIELD_WIDTH_INCLUDES_SIGN "DMD_NUMERIC_FIELD_WIDTH_INCLUDES_SIGN"

Capability set by a vector driver that supports field width and precision.

This capability reflects that a vector driver includes the sign in the field width of fields of type OFTReal.

See GDAL_DMD_NUMERIC_FIELD_WIDTH_INCLUDES_DECIMAL_SEPARATOR for a related capability flag.

Since
  GDAL 3.7

## ◆ GDAL_DMD_OPENOPTIONLIST

#define GDAL_DMD_OPENOPTIONLIST "DMD_OPENOPTIONLIST"

XML snippet with open options.

Since
  GDAL 2.0

## ◆ GDAL_DMD_RELATIONSHIP_FLAGS

#define GDAL_DMD_RELATIONSHIP_FLAGS "GDAL_DMD_RELATIONSHIP_FLAGS"

List of (space separated) flags indicating the features of relationships are supported by the driver.

Supported values are:

- "OneToOne": supports one-to-one relationships, see GDALRelationshipCardinality::GRC_ONE_TO_ONE
- "OneToMany": supports one-to-many relationships, see GDALRelationshipCardinality::GRC_ONE_TO_MANY
- "ManyToOne": supports many-to-one relationships, see GDALRelationshipCardinality::GRC_MANY_TO_ONE
- "ManyToMany": supports many-to-many relationships, see GDALRelationshipCardinality::GRC_MANY_TO_MANY
- "Composite": supports composite relationship types, see GDALRelationshipType::GRT_COMPOSITE
- "Association": supports association relationship types, see GDALRelationshipType::GRT_ASSOCIATION
- "Aggregation": supports aggregation relationship types, see GDALRelationshipType::GRT_AGGREGATION
- "MultipleFieldKeys": multiple fields can be used for relationship keys. If not present then only a single field name can be used.
- "ForwardPathLabel": supports forward path labels
- "BackwardPathLabel": supports backward path labels

Since
  GDAL 3.6

## ◆ GDAL_DMD_RELATIONSHIP_RELATED_TABLE_TYPES

#define GDAL_DMD_RELATIONSHIP_RELATED_TABLE_TYPES "GDAL_DMD_RELATIONSHIP_RELATED_TABLE_TYPES"

List of (space separated) standard related table types which are recognised by the driver.

See GDALRelationshipGetRelatedTableType/GDALRelationshipSetRelatedTableType

Since
  GDAL 3.7

## ◆ GDAL_DMD_SUBDATASETS

#define GDAL_DMD_SUBDATASETS "DMD_SUBDATASETS"

Capability set by a driver that exposes Subdatasets.

This capability reflects that a raster driver supports child layers, such as NetCDF or multi-table raster Geopackages.

See GDAL_DCAP_MULTIPLE_VECTOR_LAYERS for a similar capability flag for vector drivers.

## ◆ GDAL_DMD_SUPPORTED_SQL_DIALECTS

#define GDAL_DMD_SUPPORTED_SQL_DIALECTS "DMD_SUPPORTED_SQL_DIALECTS"

List of (space separated) SQL dialects supported by the driver.

The default SQL dialect for the driver will always be the first listed value.

Standard values are:

- "OGRSQL": the OGR SQL dialect, see https://gdal.org/user/ogr_sql_dialect.html
- "SQLITE": the SQLite dialect, see https://gdal.org/user/sql_sqlite_dialect.html
- "NATIVE": for drivers with an RDBMS backend this value indicates that the SQL will be passed directly to that database backend, and therefore the RDBMS' native dialect will be used

Other dialect values may also be present for some drivers (for some of them, the query string to use might not even by SQL but a dedicated query language). For further details on their interpretation, see the documentation for the respective driver.

Since
  GDAL 3.6

## ◆ GDAL_OF_ALL

#define GDAL_OF_ALL 0x00

Allow raster and vector drivers to be used.

Used by GDALOpenEx().

Since
  GDAL 2.0

## ◆ GDAL_OF_ARRAY_BLOCK_ACCESS

#define GDAL_OF_ARRAY_BLOCK_ACCESS 0x100

Use a array-based storage strategy for cached blocks.

GDAL_OF_DEFAULT_BLOCK_ACCESS, GDAL_OF_ARRAY_BLOCK_ACCESS and GDAL_OF_HASHSET_BLOCK_ACCESS are mutually exclusive.

Used by GDALOpenEx().

Since
  GDAL 2.1

## ◆ GDAL_OF_DEFAULT_BLOCK_ACCESS

#define GDAL_OF_DEFAULT_BLOCK_ACCESS 0

Let GDAL decide if a array-based or hashset-based storage strategy for cached blocks must be used.

GDAL_OF_DEFAULT_BLOCK_ACCESS, GDAL_OF_ARRAY_BLOCK_ACCESS and GDAL_OF_HASHSET_BLOCK_ACCESS are mutually exclusive.

Used by GDALOpenEx().

Since
  GDAL 2.1

## ◆ GDAL_OF_GNM

#define GDAL_OF_GNM 0x08

Allow gnm drivers to be used.

Used by GDALOpenEx().

Since
  GDAL 2.1

## ◆ GDAL_OF_HASHSET_BLOCK_ACCESS

#define GDAL_OF_HASHSET_BLOCK_ACCESS 0x200

Use a hashset-based storage strategy for cached blocks.

GDAL_OF_DEFAULT_BLOCK_ACCESS, GDAL_OF_ARRAY_BLOCK_ACCESS and GDAL_OF_HASHSET_BLOCK_ACCESS are mutually exclusive.

Used by GDALOpenEx().

Since
  GDAL 2.1

## ◆ GDAL_OF_INTERNAL

#define GDAL_OF_INTERNAL 0x80

Open as internal dataset.

Such dataset isn't registered in the global list of opened dataset. Cannot be used with GDAL_OF_SHARED.

Used by GDALOpenEx().

Since
  GDAL 2.0

## ◆ GDAL_OF_MULTIDIM_RASTER

#define GDAL_OF_MULTIDIM_RASTER 0x10

Allow multidimensional raster drivers to be used.

Used by GDALOpenEx().

Since
  GDAL 3.1

## ◆ GDAL_OF_RASTER

#define GDAL_OF_RASTER 0x02

Allow raster drivers to be used.

Used by GDALOpenEx().

Since
  GDAL 2.0

## ◆ GDAL_OF_READONLY

#define GDAL_OF_READONLY 0x00

Open in read-only mode.

Used by GDALOpenEx().

Since
  GDAL 2.0

## ◆ GDAL_OF_SHARED

#define GDAL_OF_SHARED 0x20

Open in shared mode.

Used by GDALOpenEx().

Since
  GDAL 2.0

## ◆ GDAL_OF_UPDATE

#define GDAL_OF_UPDATE 0x01

Open in update mode.

Used by GDALOpenEx().

Since
  GDAL 2.0

## ◆ GDAL_OF_VECTOR

#define GDAL_OF_VECTOR 0x04

Allow vector drivers to be used.

Used by GDALOpenEx().

Since
  GDAL 2.0

## ◆ GDAL_OF_VERBOSE_ERROR

#define GDAL_OF_VERBOSE_ERROR 0x40

Emit error message in case of failed open.

Used by GDALOpenEx().

Since
  GDAL 2.0

## ◆ INIT_RASTERIO_EXTRA_ARG

#define INIT_RASTERIO_EXTRA_ARG | ( |  | s | ) |

Value:
do \
{ \
(s).nVersion = RASTERIO_EXTRA_ARG_CURRENT_VERSION; \
(s).eResampleAlg = GRIORA_NearestNeighbour; \
(s).pfnProgress = CPL_NULLPTR; \
(s).pProgressData = CPL_NULLPTR; \
(s).bFloatingPointWindowValidity = FALSE; \
} while (0)
GRIORA_NearestNeighbour
@ GRIORA_NearestNeighbour
Definition gdal.h:144

Macro to initialize an instance of GDALRasterIOExtraArg structure.

Since
  GDAL 2.0

## Typedef Documentation

## ◆ GDALDerivedPixelFunc

typedef CPLErr(* GDALDerivedPixelFunc) (void **papoSources, int nSources, void *pData, int nBufXSize, int nBufYSize, GDALDataType eSrcType, GDALDataType eBufType, int nPixelSpace, int nLineSpace)

Type of functions to pass to GDALAddDerivedBandPixelFunc.

Since
  GDAL 2.2

## ◆ GDALDerivedPixelFuncWithArgs

typedef CPLErr(* GDALDerivedPixelFuncWithArgs) (void **papoSources, int nSources, void *pData, int nBufXSize, int nBufYSize, GDALDataType eSrcType, GDALDataType eBufType, int nPixelSpace, int nLineSpace, CSLConstList papszFunctionArgs)

Type of functions to pass to GDALAddDerivedBandPixelFuncWithArgs.

Since
  GDAL 3.4

## ◆ GDALQueryLoggerFunc

typedef void(* GDALQueryLoggerFunc) (const char *pszSQL, const char *pszError, int64_t lNumRecords, int64_t lExecutionTimeMilliseconds, void *pQueryLoggerArg)

Type of functions to pass to GDALDatasetSetQueryLoggerFunc.

Since
  GDAL 3.7

## ◆ GDALRelationshipH

typedef void* GDALRelationshipH

Opaque type used for the C bindings of the C++ GDALRelationship class.

Since
  GDAL 3.6

## ◆ GDALSubdatasetInfoH

typedef struct GDALSubdatasetInfo* GDALSubdatasetInfoH

Opaque type used for the C bindings of the C++ GDALSubdatasetInfo class.

Since
  GDAL 3.8

## ◆ GDALVRTProcessedDatasetFuncFree

typedef void(* GDALVRTProcessedDatasetFuncFree) (const char *pszFuncName, void *pUserData, VRTPDWorkingDataPtr pWorkingData)

Free function to pass to GDALVRTRegisterProcessedDatasetFunc.

Parameters

  pszFuncName | Function name. Must be unique and not null.
  pUserData | User data. May be nullptr. Must remain valid during the lifetime of GDAL.
  pWorkingData | Value of the *ppWorkingData output parameter of GDALVRTProcessedDatasetFuncInit.

Since
  GDAL 3.9

## ◆ GDALVRTProcessedDatasetFuncInit

typedef CPLErr(* GDALVRTProcessedDatasetFuncInit) (const char *pszFuncName, void *pUserData, CSLConstList papszFunctionArgs, int nInBands, GDALDataType eInDT, double *padfInNoData, int *pnOutBands, GDALDataType *peOutDT, double **ppadfOutNoData, const char *pszVRTPath, VRTPDWorkingDataPtr *ppWorkingData)

Initialization function to pass to GDALVRTRegisterProcessedDatasetFunc.

This initialization function is called for each step of a VRTProcessedDataset that uses the related algorithm. The initialization function returns the output data type, output band count and potentially initializes a working structure, typically parsing arguments.

Parameters

  | pszFuncName | Function name. Must be unique and not null.
  | pUserData | User data. May be nullptr. Must remain valid during the lifetime of GDAL.
  | papszFunctionArgs | Function arguments as a list of key=value pairs.
  | nInBands | Number of input bands.
  | eInDT | Input data type.
  [in,out] | padfInNoData | Array of nInBands values for the input nodata value. The init function may also override them.
  [in,out] | pnOutBands | Pointer whose value must be set to the number of output bands. This will be set to 0 by the caller when calling the function, unless this is the final step, in which case it will be initialized with the number of expected output bands.
  [out] | peOutDT | Pointer whose value must be set to the output data type.
  [in,out] | ppadfOutNoData | Pointer to an array of *pnOutBands values for the output nodata value that the function must set. For non-final steps, *ppadfOutNoData will be nullptr and it is the responsibility of the function to CPLMalloc()'ate it. If this is the final step, it will be already allocated and initialized with the expected nodata values from the output dataset (if the init function need to reallocate it, it must use CPLRealloc())
  | pszVRTPath | Directory of the VRT
  [out] | ppWorkingData | Pointer whose value must be set to a working structure, or nullptr.

Returns
  CE_None in case of success, error otherwise.

Since
  GDAL 3.9

## ◆ GDALVRTProcessedDatasetFuncProcess

typedef CPLErr(* GDALVRTProcessedDatasetFuncProcess) (const char *pszFuncName, void *pUserData, VRTPDWorkingDataPtr pWorkingData, CSLConstList papszFunctionArgs, int nBufXSize, int nBufYSize, const void *pInBuffer, size_t nInBufferSize, GDALDataType eInDT, int nInBands, const double *padfInNoData, void *pOutBuffer, size_t nOutBufferSize, GDALDataType eOutDT, int nOutBands, const double *padfOutNoData, double dfSrcXOff, double dfSrcYOff, double dfSrcXSize, double dfSrcYSize, const double adfSrcGT[], const char *pszVRTPath, CSLConstList papszExtra)

Processing function to pass to GDALVRTRegisterProcessedDatasetFunc.

Parameters

  pszFuncName | Function name. Must be unique and not null.
  pUserData | User data. May be nullptr. Must remain valid during the lifetime of GDAL.
  pWorkingData | Value of the *ppWorkingData output parameter of GDALVRTProcessedDatasetFuncInit.
  papszFunctionArgs | Function arguments as a list of key=value pairs.
  nBufXSize | Width in pixels of pInBuffer and pOutBuffer
  nBufYSize | Height in pixels of pInBuffer and pOutBuffer
  pInBuffer | Input buffer. It is pixel-interleaved (i.e. R00,G00,B00,R01,G01,B01, etc.)
  nInBufferSize | Size in bytes of pInBuffer
  eInDT | Data type of pInBuffer
  nInBands | Number of bands in pInBuffer.
  padfInNoData | Input nodata values.
  pOutBuffer | Output buffer. It is pixel-interleaved (i.e. R00,G00,B00,R01,G01,B01, etc.)
  nOutBufferSize | Size in bytes of pOutBuffer
  eOutDT | Data type of pOutBuffer
  nOutBands | Number of bands in pOutBuffer.
  padfOutNoData | Input nodata values.
  dfSrcXOff | Source X coordinate in pixel of the top-left of the region
  dfSrcYOff | Source Y coordinate in pixel of the top-left of the region
  dfSrcXSize | Width in pixels of the region
  dfSrcYSize | Height in pixels of the region
  adfSrcGT | Source geotransform
  pszVRTPath | Directory of the VRT
  papszExtra | Extra arguments (unused for now)

Since
  GDAL 3.9

## ◆ GSpacing

typedef GIntBig GSpacing

Type to express pixel, line or band spacing.

Signed 64 bit integer.

## Enumeration Type Documentation

## ◆ GDALAccess

enum GDALAccess

Flag indicating read/write, or read-only access to data.

Enumerator
GA_ReadOnly | Read only (no update) access
GA_Update | Read/write access.

## ◆ GDALColorInterp

enum GDALColorInterp

Types of color interpretation for raster bands.

Enumerator
GCI_Undefined | Undefined
GCI_GrayIndex | Greyscale
GCI_PaletteIndex | Paletted (see associated color table)
GCI_RedBand | Red band of RGBA image
GCI_GreenBand | Green band of RGBA image
GCI_BlueBand | Blue band of RGBA image
GCI_AlphaBand | Alpha (0=transparent, 255=opaque)
GCI_HueBand | Hue band of HLS image
GCI_SaturationBand | Saturation band of HLS image
GCI_LightnessBand | Lightness band of HLS image
GCI_CyanBand | Cyan band of CMYK image
GCI_MagentaBand | Magenta band of CMYK image
GCI_YellowBand | Yellow band of CMYK image
GCI_BlackBand | Black band of CMYK image
GCI_YCbCr_YBand | Y Luminance
GCI_YCbCr_CbBand | Cb Chroma
GCI_YCbCr_CrBand | Cr Chroma
GCI_Max | Max current value (equals to GCI_YCbCr_CrBand currently)

## ◆ GDALDataType

enum GDALDataType

Pixel data types

Enumerator
GDT_Unknown | Unknown or unspecified type
GDT_Byte | Eight bit unsigned integer
GDT_Int8 | 8-bit signed integer (GDAL >= 3.7)
GDT_UInt16 | Sixteen bit unsigned integer
GDT_Int16 | Sixteen bit signed integer
GDT_UInt32 | Thirty two bit unsigned integer
GDT_Int32 | Thirty two bit signed integer
GDT_UInt64 | 64 bit unsigned integer (GDAL >= 3.5)
GDT_Int64 | 64 bit signed integer (GDAL >= 3.5)
GDT_Float32 | Thirty two bit floating point
GDT_Float64 | Sixty four bit floating point
GDT_CInt16 | Complex Int16
GDT_CInt32 | Complex Int32
GDT_CFloat32 | Complex Float32
GDT_CFloat64 | Complex Float64

## ◆ GDALExtendedDataTypeClass

enum GDALExtendedDataTypeClass

Enumeration giving the class of a GDALExtendedDataType.

Since
  GDAL 3.1

Enumerator
GEDTC_NUMERIC | Numeric value. Based on GDALDataType enumeration
GEDTC_STRING | String value.
GEDTC_COMPOUND | Compound data type.

## ◆ GDALExtendedDataTypeSubType

enum GDALExtendedDataTypeSubType

Enumeration giving the subtype of a GDALExtendedDataType.

Since
  GDAL 3.4

Enumerator
GEDTST_NONE | None.
GEDTST_JSON | JSon. Only applies to GEDTC_STRING

## ◆ GDALPaletteInterp

enum GDALPaletteInterp

Types of color interpretations for a GDALColorTable.

Enumerator
GPI_Gray | Grayscale (in GDALColorEntry.c1)
GPI_RGB | Red, Green, Blue and Alpha in (in c1, c2, c3 and c4)
GPI_CMYK | Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4)
GPI_HLS | Hue, Lightness and Saturation (in c1, c2, and c3)

## ◆ GDALRATFieldType

enum GDALRATFieldType

Field type of raster attribute table.

Enumerator
GFT_Integer | Integer field
GFT_Real | Floating point (double) field
GFT_String | String field

## ◆ GDALRATFieldUsage

enum GDALRATFieldUsage

Field usage of raster attribute table.

Enumerator
GFU_Generic | General purpose field.
GFU_PixelCount | Histogram pixel count
GFU_Name | Class name
GFU_Min | Class range minimum
GFU_Max | Class range maximum
GFU_MinMax | Class value (min=max)
GFU_Red | Red class color (0-255)
GFU_Green | Green class color (0-255)
GFU_Blue | Blue class color (0-255)
GFU_Alpha | Alpha (0=transparent,255=opaque)
GFU_RedMin | Color Range Red Minimum
GFU_GreenMin | Color Range Green Minimum
GFU_BlueMin | Color Range Blue Minimum
GFU_AlphaMin | Color Range Alpha Minimum
GFU_RedMax | Color Range Red Maximum
GFU_GreenMax | Color Range Green Maximum
GFU_BlueMax | Color Range Blue Maximum
GFU_AlphaMax | Color Range Alpha Maximum
GFU_MaxCount | Maximum GFU value (equals to GFU_AlphaMax+1 currently)

## ◆ GDALRATTableType

enum GDALRATTableType

RAT table type (thematic or athematic)

Since
  GDAL 2.4

Enumerator
GRTT_THEMATIC | Thematic table type
GRTT_ATHEMATIC | Athematic table type

## ◆ GDALRelationshipCardinality

enum GDALRelationshipCardinality

Cardinality of relationship.

Since
  GDAL 3.6

Enumerator
GRC_ONE_TO_ONE | One-to-one.
GRC_ONE_TO_MANY | One-to-many.
GRC_MANY_TO_ONE | Many-to-one.
GRC_MANY_TO_MANY | Many-to-many.

## ◆ GDALRelationshipType

enum GDALRelationshipType

Type of relationship.

Since
  GDAL 3.6

Enumerator
GRT_COMPOSITE | Composite relationship.
GRT_ASSOCIATION | Association relationship.
GRT_AGGREGATION | Aggregation relationship.

## ◆ GDALRIOResampleAlg

enum GDALRIOResampleAlg

RasterIO() resampling method.

Since
  GDAL 2.0

Enumerator
GRIORA_NearestNeighbour | Nearest neighbour
GRIORA_Bilinear | Bilinear (2x2 kernel)
GRIORA_Cubic | Cubic Convolution Approximation (4x4 kernel)
GRIORA_CubicSpline | Cubic B-Spline Approximation (4x4 kernel)
GRIORA_Lanczos | Lanczos windowed sinc interpolation (6x6 kernel)
GRIORA_Average | Average
GRIORA_Mode | Mode (selects the value which appears most often of all the sampled points)
GRIORA_Gauss | Gauss blurring
GRIORA_RMS | RMS: Root Mean Square / Quadratic Mean. For complex numbers, applies on the real and imaginary part independently.

## ◆ GDALRWFlag

enum GDALRWFlag

Read/Write flag for RasterIO() method

Enumerator
GF_Read | Read data
GF_Write | Write data

## ◆ GDALTileOrganization

enum GDALTileOrganization

! Enumeration to describe the tile organization

Enumerator
GTO_TIP | Tile Interleaved by Pixel: tile (0,0) with internal band interleaved by pixel organization, tile (1, 0), ...
GTO_BIT | Band Interleaved by Tile : tile (0,0) of first band, tile (0,0) of second band, ... tile (1,0) of first band, tile (1,0) of second band, ...
GTO_BSQ | Band SeQuential : all the tiles of first band, all the tiles of following band...

## Function Documentation

## ◆ GDALAddBand()

CPLErr GDALAddBand | ( | GDALDatasetH | hDataset,
|  | GDALDataType | eType,
|  | CSLConstList | papszOptions
| ) |  |

Add a band to a dataset.

See also
  GDALDataset::AddBand().

## ◆ GDALAddDerivedBandPixelFunc()

CPLErr GDALAddDerivedBandPixelFunc | ( | const char * | pszName,
|  | GDALDerivedPixelFunc | pfnNewFunction
| ) |  |

This adds a pixel function to the global list of available pixel functions for derived bands.

Pixel functions must be registered in this way before a derived band tries to access data.

Derived bands are stored with only the name of the pixel function that it will apply, and if a pixel function matching the name is not found the IRasterIO() call will do nothing.

Parameters

  pszName | Name used to access pixel function
  pfnNewFunction | Pixel function associated with name. An existing pixel function registered with the same name will be replaced with the new one.

Returns
  CE_None, invalid (NULL) parameters are currently ignored.

## ◆ GDALAddDerivedBandPixelFuncWithArgs()

CPLErr GDALAddDerivedBandPixelFuncWithArgs | ( | const char * | pszName,
|  | GDALDerivedPixelFuncWithArgs | pfnNewFunction,
|  | const char * | pszMetadata
| ) |  |

This adds a pixel function to the global list of available pixel functions for derived bands.

Pixel functions must be registered in this way before a derived band tries to access data.

Derived bands are stored with only the name of the pixel function that it will apply, and if a pixel function matching the name is not found the IRasterIO() call will do nothing.

Parameters

  pszName | Name used to access pixel function
  pfnNewFunction | Pixel function associated with name. An existing pixel function registered with the same name will be replaced with the new one.
  pszMetadata | Pixel function metadata (not currently implemented)

Returns
  CE_None, invalid (NULL) parameters are currently ignored.

Since
  GDAL 3.4

## ◆ GDALAdjustValueToDataType()

double GDALAdjustValueToDataType | ( | GDALDataType | eDT,
|  | double | dfValue,
|  | int * | pbClamped,
|  | int * | pbRounded
| ) |  |

Adjust a value to the output data type.

Adjustment consist in clamping to minimum/maximum values of the data type and rounding for integral types.

Parameters

  eDT | target data type.
  dfValue | value to adjust.
  pbClamped | pointer to a integer(boolean) to indicate if clamping has been made, or NULL
  pbRounded | pointer to a integer(boolean) to indicate if rounding has been made, or NULL

Returns
  adjusted value

Since
  GDAL 2.1

## ◆ GDALAllRegister()

void GDALAllRegister | ( | void |  | ) |

Register all known configured GDAL drivers.

This function will drive any of the following that are configured into GDAL. See raster list and vector full list

This function should generally be called once at the beginning of the application.

## ◆ GDALApplyGeoTransform()

void GDALApplyGeoTransform | ( | const double * | padfGeoTransform,
|  | double | dfPixel,
|  | double | dfLine,
|  | double * | pdfGeoX,
|  | double * | pdfGeoY
| ) |  |

Apply GeoTransform to x/y coordinate.

Applies the following computation, converting a (pixel, line) coordinate into a georeferenced (geo_x, geo_y) location.

*pdfGeoX = padfGeoTransform[0] + dfPixel * padfGeoTransform[1]
+ dfLine * padfGeoTransform[2];
*pdfGeoY = padfGeoTransform[3] + dfPixel * padfGeoTransform[4]
+ dfLine * padfGeoTransform[5];

Parameters

  padfGeoTransform | Six coefficient GeoTransform to apply.
  dfPixel | Input pixel position.
  dfLine | Input line position.
  pdfGeoX | output location where geo_x (easting/longitude) location is placed.
  pdfGeoY | output location where geo_y (northing/latitude) location is placed.

## ◆ GDALARGetNextUpdatedRegion()

GDALAsyncStatusType GDALARGetNextUpdatedRegion | ( | GDALAsyncReaderH | hARIO,
|  | double | dfTimeout,
|  | int * | pnBufXOff,
|  | int * | pnBufYOff,
|  | int * | pnBufXSize,
|  | int * | pnBufYSize
| ) |  |

Get async IO update.

Provide an opportunity for an asynchronous IO request to update the image buffer and return an indication of the area of the buffer that has been updated.

The dfTimeout parameter can be used to wait for additional data to become available. The timeout does not limit the amount of time this method may spend actually processing available data.

The following return status are possible.

- GARIO_PENDING: No imagery was altered in the buffer, but there is still activity pending, and the application should continue to call GetNextUpdatedRegion() as time permits.
- GARIO_UPDATE: Some of the imagery has been updated, but there is still activity pending.
- GARIO_ERROR: Something has gone wrong. The asynchronous request should be ended.
- GARIO_COMPLETE: An update has occurred and there is no more pending work on this request. The request should be ended and the buffer used.

This is the same as GDALAsyncReader::GetNextUpdatedRegion()

Parameters

  hARIO | handle to the async reader.
  dfTimeout | the number of seconds to wait for additional updates. Use -1 to wait indefinitely, or zero to not wait at all if there is no data available.
  pnBufXOff | location to return the X offset of the area of the request buffer that has been updated.
  pnBufYOff | location to return the Y offset of the area of the request buffer that has been updated.
  pnBufXSize | location to return the X size of the area of the request buffer that has been updated.
  pnBufYSize | location to return the Y size of the area of the request buffer that has been updated.

Returns
  GARIO_ status, details described above.

## ◆ GDALARLockBuffer()

int GDALARLockBuffer | ( | GDALAsyncReaderH | hARIO,
|  | double | dfTimeout
| ) |  |

Lock image buffer.

Locks the image buffer passed into GDALDataset::BeginAsyncReader(). This is useful to ensure the image buffer is not being modified while it is being used by the application. UnlockBuffer() should be used to release this lock when it is no longer needed.

This is the same as GDALAsyncReader::LockBuffer()

Parameters

  hARIO | handle to async reader.
  dfTimeout | the time in seconds to wait attempting to lock the buffer. -1.0 to wait indefinitely and 0 to not wait at all if it can't be acquired immediately. Default is -1.0 (infinite wait).

Returns
  TRUE if successful, or FALSE on an error.

## ◆ GDALARUnlockBuffer()

void GDALARUnlockBuffer | ( | GDALAsyncReaderH | hARIO | ) |

Unlock image buffer.

Releases a lock on the image buffer previously taken with LockBuffer().

This is the same as GDALAsyncReader::UnlockBuffer()

Parameters

  hARIO | handle to async reader.

## ◆ GDALAttributeGetDataType()

GDALExtendedDataTypeH GDALAttributeGetDataType | ( | GDALAttributeH | hAttr | ) |

Return the data type.

The return must be freed with GDALExtendedDataTypeRelease().

## ◆ GDALAttributeGetDimensionCount()

size_t GDALAttributeGetDimensionCount | ( | GDALAttributeH | hAttr | ) |

Return the number of dimensions.

This is the same as the C++ method GDALAbstractMDArray::GetDimensionCount()

## ◆ GDALAttributeGetDimensionsSize()

GUInt64 * GDALAttributeGetDimensionsSize | ( | GDALAttributeH | hAttr,
|  | size_t * | pnCount
| ) |  |

Return the dimension sizes of the attribute.

The returned array must be freed with CPLFree()

Parameters

  hAttr | Attribute.
  pnCount | Pointer to the number of values returned. Must NOT be NULL.

Returns
  an array of *pnCount values.

## ◆ GDALAttributeGetFullName()

const char * GDALAttributeGetFullName | ( | GDALAttributeH | hAttr | ) |

Return the full name of the attribute.

The returned pointer is valid until hAttr is released.

This is the same as the C++ method GDALAttribute::GetFullName().

## ◆ GDALAttributeGetName()

const char * GDALAttributeGetName | ( | GDALAttributeH | hAttr | ) |

Return the name of the attribute.

The returned pointer is valid until hAttr is released.

This is the same as the C++ method GDALAttribute::GetName().

## ◆ GDALAttributeGetTotalElementsCount()

GUInt64 GDALAttributeGetTotalElementsCount | ( | GDALAttributeH | hAttr | ) |

Return the total number of values in the attribute.

This is the same as the C++ method GDALAbstractMDArray::GetTotalElementsCount()

## ◆ GDALAttributeReadAsDouble()

double GDALAttributeReadAsDouble | ( | GDALAttributeH | hAttr | ) |

Return the value of an attribute as a double.

This function will only return the first element if there are several.

It can fail if its value can be converted to double.

This is the same as the C++ method GDALAttribute::ReadAsDouble()

Returns
  a double value.

## ◆ GDALAttributeReadAsDoubleArray()

double * GDALAttributeReadAsDoubleArray | ( | GDALAttributeH | hAttr,
|  | size_t * | pnCount
| ) |  |

Return the value of an attribute as an array of doubles.

This is the same as the C++ method GDALAttribute::ReadAsDoubleArray()

Parameters

  hAttr | Attribute
  pnCount | Pointer to the number of values returned. Must NOT be NULL.

Returns
  array to be freed with CPLFree(), or nullptr.

## ◆ GDALAttributeReadAsInt()

int GDALAttributeReadAsInt | ( | GDALAttributeH | hAttr | ) |

Return the value of an attribute as a integer.

This function will only return the first element if there are several.

It can fail if its value can be converted to integer.

This is the same as the C++ method GDALAttribute::ReadAsInt()

Returns
  a integer, or INT_MIN in case of error.

## ◆ GDALAttributeReadAsIntArray()

int * GDALAttributeReadAsIntArray | ( | GDALAttributeH | hAttr,
|  | size_t * | pnCount
| ) |  |

Return the value of an attribute as an array of integers.

This is the same as the C++ method GDALAttribute::ReadAsIntArray()

Parameters

  hAttr | Attribute
  pnCount | Pointer to the number of values returned. Must NOT be NULL.

Returns
  array to be freed with CPLFree(), or nullptr.

## ◆ GDALAttributeReadAsRaw()

GByte * GDALAttributeReadAsRaw | ( | GDALAttributeH | hAttr,
|  | size_t * | pnSize
| ) |  |

Return the raw value of an attribute.

This is the same as the C++ method GDALAttribute::ReadAsRaw().

The returned buffer must be freed with GDALAttributeFreeRawResult()

Parameters

  hAttr | Attribute.
  pnSize | Pointer to the number of bytes returned. Must NOT be NULL.

Returns
  a buffer of *pnSize bytes.

## ◆ GDALAttributeReadAsString()

const char * GDALAttributeReadAsString | ( | GDALAttributeH | hAttr | ) |

Return the value of an attribute as a string.

The returned string should not be freed, and its lifetime does not excess a next call to ReadAsString() on the same object, or the deletion of the object itself.

This function will only return the first element if there are several.

This is the same as the C++ method GDALAttribute::ReadAsString()

Returns
  a string, or nullptr.

## ◆ GDALAttributeReadAsStringArray()

char ** GDALAttributeReadAsStringArray | ( | GDALAttributeH | hAttr | ) |

Return the value of an attribute as an array of strings.

This is the same as the C++ method GDALAttribute::ReadAsStringArray()

The return value must be freed with CSLDestroy().

## ◆ GDALAttributeRelease()

void GDALAttributeRelease | ( | GDALAttributeH | hAttr | ) |

Release the GDAL in-memory object associated with a GDALAttribute.

Note: when applied on a object coming from a driver, this does not destroy the object in the file, database, etc...

## ◆ GDALAttributeRename()

bool GDALAttributeRename | ( | GDALAttributeH | hAttr,
|  | const char * | pszNewName
| ) |  |

Rename the attribute.

This is not implemented by all drivers.

Drivers known to implement it: MEM, netCDF.

This is the same as the C++ method GDALAbstractMDArray::Rename()

Returns
  true in case of success

Since
  GDAL 3.8

## ◆ GDALAttributeWriteDouble()

int GDALAttributeWriteDouble | ( | GDALAttributeH | hAttr,
|  | double | dfVal
| ) |  |

Write an attribute from a double value.

Type conversion will be performed if needed. If the attribute contains multiple values, only the first one will be updated.

This is the same as the C++ method GDALAttribute::Write(double);

Parameters

  hAttr | Attribute
  dfVal | Value.

Returns
  TRUE in case of success.

## ◆ GDALAttributeWriteDoubleArray()

int GDALAttributeWriteDoubleArray | ( | GDALAttributeH | hAttr,
|  | const double * | padfValues,
|  | size_t | nCount
| ) |  |

Write an attribute from an array of double.

Type conversion will be performed if needed.

Exactly GetTotalElementsCount() strings must be provided

This is the same as the C++ method GDALAttribute::Write(const double *, size_t)

Parameters

  hAttr | Attribute
  padfValues | Array of double.
  nCount | Should be equal to GetTotalElementsCount().

Returns
  TRUE in case of success.

## ◆ GDALAttributeWriteInt()

int GDALAttributeWriteInt | ( | GDALAttributeH | hAttr,
|  | int | nVal
| ) |  |

Write an attribute from a integer value.

Type conversion will be performed if needed. If the attribute contains multiple values, only the first one will be updated.

This is the same as the C++ method GDALAttribute::WriteInt()

Parameters

  hAttr | Attribute
  nVal | Value.

Returns
  TRUE in case of success.

## ◆ GDALAttributeWriteRaw()

int GDALAttributeWriteRaw | ( | GDALAttributeH | hAttr,
|  | const void * | pabyValue,
|  | size_t | nLength
| ) |  |

Write an attribute from raw values expressed in GetDataType()

The values should be provided in the type of GetDataType() and there should be exactly GetTotalElementsCount() of them. If GetDataType() is a string, each value should be a char* pointer.

This is the same as the C++ method GDALAttribute::Write(const void*, size_t).

Parameters

  hAttr | Attribute
  pabyValue | Buffer of nLen bytes.
  nLength | Size of pabyValue in bytes. Should be equal to GetTotalElementsCount() * GetDataType().GetSize()

Returns
  TRUE in case of success.

## ◆ GDALAttributeWriteString()

int GDALAttributeWriteString | ( | GDALAttributeH | hAttr,
|  | const char * | pszVal
| ) |  |

Write an attribute from a string value.

Type conversion will be performed if needed. If the attribute contains multiple values, only the first one will be updated.

This is the same as the C++ method GDALAttribute::Write(const char*)

Parameters

  hAttr | Attribute
  pszVal | Pointer to a string.

Returns
  TRUE in case of success.

## ◆ GDALAttributeWriteStringArray()

int GDALAttributeWriteStringArray | ( | GDALAttributeH | hAttr,
|  | CSLConstList | papszValues
| ) |  |

Write an attribute from an array of strings.

Type conversion will be performed if needed.

Exactly GetTotalElementsCount() strings must be provided

This is the same as the C++ method GDALAttribute::Write(CSLConstList)

Parameters

  hAttr | Attribute
  papszValues | Array of strings.

Returns
  TRUE in case of success.

## ◆ GDALBeginAsyncReader()

GDALAsyncReaderH GDALBeginAsyncReader | ( | GDALDatasetH | hDS,
|  | int | nXOff,
|  | int | nYOff,
|  | int | nXSize,
|  | int | nYSize,
|  | void * | pBuf,
|  | int | nBufXSize,
|  | int | nBufYSize,
|  | GDALDataType | eBufType,
|  | int | nBandCount,
|  | int * | panBandMap,
|  | int | nPixelSpace,
|  | int | nLineSpace,
|  | int | nBandSpace,
|  | CSLConstList | papszOptions
| ) |  |

Sets up an asynchronous data request.

This method establish an asynchronous raster read request for the indicated window on the dataset into the indicated buffer. The parameters for windowing, buffer size, buffer type and buffer organization are similar to those for GDALDataset::RasterIO(); however, this call only launches the request and filling the buffer is accomplished via calls to GetNextUpdatedRegion() on the return GDALAsyncReader session object.

Once all processing for the created session is complete, or if no further refinement of the request is required, the GDALAsyncReader object should be destroyed with the GDALDataset::EndAsyncReader() method.

Note that the data buffer (pData) will potentially continue to be updated as long as the session lives, but it is not deallocated when the session (GDALAsyncReader) is destroyed with EndAsyncReader(). It should be deallocated by the application at that point.

Additional information on asynchronous IO in GDAL may be found at: https://gdal.org/development/rfc/rfc24_progressive_data_support.html

This method is the same as the C++ GDALDataset::BeginAsyncReader() method.

Parameters

  hDS | handle to the dataset object.
  nXOff | The pixel offset to the top left corner of the region of the band to be accessed. This would be zero to start from the left side.
  nYOff | The line offset to the top left corner of the region of the band to be accessed. This would be zero to start from the top.
  nXSize | The width of the region of the band to be accessed in pixels.
  nYSize | The height of the region of the band to be accessed in lines.
  pBuf | The buffer into which the data should be read. This buffer must contain at least nBufXSize * nBufYSize * nBandCount words of type eBufType. It is organized in left to right,top to bottom pixel order. Spacing is controlled by the nPixelSpace, and nLineSpace parameters.
  nBufXSize | the width of the buffer image into which the desired region is to be read, or from which it is to be written.
  nBufYSize | the height of the buffer image into which the desired region is to be read, or from which it is to be written.
  eBufType | the type of the pixel values in the pData data buffer. The pixel values will automatically be translated to/from the GDALRasterBand data type as needed.
  nBandCount | the number of bands being read or written.
  panBandMap | the list of nBandCount band numbers being read/written. Note band numbers are 1 based. This may be NULL to select the first nBandCount bands.
  nPixelSpace | The byte offset from the start of one pixel value in pData to the start of the next pixel value within a scanline. If defaulted (0) the size of the datatype eBufType is used.
  nLineSpace | The byte offset from the start of one scanline in pData to the start of the next. If defaulted the size of the datatype eBufType * nBufXSize is used.
  nBandSpace | the byte offset from the start of one bands data to the start of the next. If defaulted (zero) the value will be nLineSpace * nBufYSize implying band sequential organization of the data buffer.
  papszOptions | Driver specific control options in a string list or NULL. Consult driver documentation for options supported.

Returns
  handle representing the request.

## ◆ GDALBuildOverviews()

CPLErr GDALBuildOverviews | ( | GDALDatasetH | hDataset,
|  | const char * | pszResampling,
|  | int | nOverviews,
|  | const int * | panOverviewList,
|  | int | nListBands,
|  | const int * | panBandList,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData
| ) |  |

Build raster overview(s)

See also
  GDALDataset::BuildOverviews() and GDALBuildOverviews()

## ◆ GDALBuildOverviewsEx()

CPLErr GDALBuildOverviewsEx | ( | GDALDatasetH | hDataset,
|  | const char * | pszResampling,
|  | int | nOverviews,
|  | const int * | panOverviewList,
|  | int | nListBands,
|  | const int * | panBandList,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData,
|  | CSLConstList | papszOptions
| ) |  |

Build raster overview(s)

See also
  GDALDataset::BuildOverviews()

Since
  GDAL 3.6

## ◆ GDALCheckVersion()

int GDALCheckVersion | ( | int | nVersionMajor,
|  | int | nVersionMinor,
|  | const char * | pszCallingComponentName
| ) |  |

Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor.

The purpose of this method is to ensure that calling code will run with the GDAL version it is compiled for. It is primarily intended for external plugins.

Parameters

  nVersionMajor | Major version to be tested against
  nVersionMinor | Minor version to be tested against
  pszCallingComponentName | If not NULL, in case of version mismatch, the method will issue a failure mentioning the name of the calling component.

Returns
  TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor, FALSE otherwise.

## ◆ GDALCloneColorTable()

GDALColorTableH GDALCloneColorTable | ( | GDALColorTableH | hTable | ) |

Make a copy of a color table.

This function is the same as the C++ method GDALColorTable::Clone()

## ◆ GDALClose()

CPLErr GDALClose | ( | GDALDatasetH | hDS | ) |

Close GDAL dataset.

For non-shared datasets (opened with GDALOpen()) the dataset is closed using the C++ "delete" operator, recovering all dataset related resources. For shared datasets (opened with GDALOpenShared()) the dataset is dereferenced, and closed only if the referenced count has dropped below 1.

Parameters

  hDS | The dataset to close. May be cast from a "GDALDataset *".

Returns
  CE_None in case of success (return value since GDAL 3.7). On a shared dataset whose reference count is not dropped below 1, CE_None will be returned.

## ◆ GDALComposeGeoTransforms()

void GDALComposeGeoTransforms | ( | const double * | padfGT1,
|  | const double * | padfGT2,
|  | double * | padfGTOut
| ) |  |

Compose two geotransforms.

The resulting geotransform is the equivalent to padfGT1 and then padfGT2 being applied to a point.

Parameters

  padfGT1 | the first geotransform, six values.
  padfGT2 | the second geotransform, six values.
  padfGTOut | the output geotransform, six values, may safely be the same array as padfGT1 or padfGT2.

## ◆ GDALComputeBandStats()

CPLErr GDALComputeBandStats | ( | GDALRasterBandH | hSrcBand,
|  | int | nSampleStep,
|  | double * | pdfMean,
|  | double * | pdfStdDev,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData
| ) |  |

Undocumented.

Parameters

  hSrcBand | undocumented.
  nSampleStep | Step between scanlines used to compute statistics. When nSampleStep is equal to 1, all scanlines will be processed.
  pdfMean | undocumented.
  pdfStdDev | undocumented.
  pfnProgress | undocumented.
  pProgressData | undocumented.

Returns
  undocumented

## ◆ GDALComputeRasterMinMax()

CPLErr GDALComputeRasterMinMax | ( | GDALRasterBandH | hBand,
|  | int | bApproxOK,
|  | double | adfMinMax[2]
| ) |  |

Compute the min/max values for a band.

See also
  GDALRasterBand::ComputeRasterMinMax()

Note
  Prior to GDAL 3.6, this function returned void

## ◆ GDALComputeRasterStatistics()

CPLErr GDALComputeRasterStatistics | ( | GDALRasterBandH | hBand,
|  | int | bApproxOK,
|  | double * | pdfMin,
|  | double * | pdfMax,
|  | double * | pdfMean,
|  | double * | pdfStdDev,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData
| ) |  |

Compute image statistics.

See also
  GDALRasterBand::ComputeStatistics()

## ◆ GDALCopyBits()

void GDALCopyBits | ( | const GByte * | pabySrcData,
|  | int | nSrcOffset,
|  | int | nSrcStep,
|  | GByte * | pabyDstData,
|  | int | nDstOffset,
|  | int | nDstStep,
|  | int | nBitCount,
|  | int | nStepCount
| ) |  |

Bitwise word copying.

A function for moving sets of partial bytes around. Loosely speaking this is a bitwise analog to GDALCopyWords().

It copies nStepCount "words" where each word is nBitCount bits long. The nSrcStep and nDstStep are the number of bits from the start of one word to the next (same as nBitCount if they are packed). The nSrcOffset and nDstOffset are the offset into the source and destination buffers to start at, also measured in bits.

All bit offsets are assumed to start from the high order bit in a byte (i.e. most significant bit first). Currently this function is not very optimized, but it may be improved for some common cases in the future as needed.

Parameters

  pabySrcData | the source data buffer.
  nSrcOffset | the offset (in bits) in pabySrcData to the start of the first word to copy.
  nSrcStep | the offset in bits from the start one source word to the start of the next.
  pabyDstData | the destination data buffer.
  nDstOffset | the offset (in bits) in pabyDstData to the start of the first word to copy over.
  nDstStep | the offset in bits from the start one word to the start of the next.
  nBitCount | the number of bits in a word to be copied.
  nStepCount | the number of words to copy.

## ◆ GDALCopyDatasetFiles()

CPLErr GDALCopyDatasetFiles | ( | GDALDriverH | hDriver,
|  | const char * | pszNewName,
|  | const char * | pszOldName
| ) |  |

Copy the files of a dataset.

See also
  GDALDriver::CopyFiles()

## ◆ GDALCopyWords()

void GDALCopyWords | ( | const void * | pSrcData,
|  | GDALDataType | eSrcType,
|  | int | nSrcPixelStride,
|  | void * | pDstData,
|  | GDALDataType | eDstType,
|  | int | nDstPixelStride,
|  | int | nWordCount
| ) |  |

Copy pixel words from buffer to buffer.

See also
  GDALCopyWords64()

## ◆ GDALCopyWords64()

void GDALCopyWords64 | ( | const void * | pSrcData,
|  | GDALDataType | eSrcType,
|  | int | nSrcPixelStride,
|  | void * | pDstData,
|  | GDALDataType | eDstType,
|  | int | nDstPixelStride,
|  | GPtrDiff_t | nWordCount
| ) |  |

Copy pixel words from buffer to buffer.

This function is used to copy pixel word values from one memory buffer to another, with support for conversion between data types, and differing step factors. The data type conversion is done using the normal GDAL rules. Values assigned to a lower range integer type are clipped. For instance assigning GDT_Int16 values to a GDT_Byte buffer will cause values less the 0 to be set to 0, and values larger than 255 to be set to 255. Assignment from floating point to integer uses default C type casting semantics. Assignment from non-complex to complex will result in the imaginary part being set to zero on output. Assignment from complex to non-complex will result in the complex portion being lost and the real component being preserved (not magnitude!).

No assumptions are made about the source or destination words occurring on word boundaries. It is assumed that all values are in native machine byte order.

Parameters

  pSrcData | Pointer to source data to be converted.
  eSrcType | the source data type (see GDALDataType enum)
  nSrcPixelStride | Source pixel stride (i.e. distance between 2 words), in bytes
  pDstData | Pointer to buffer where destination data should go
  eDstType | the destination data type (see GDALDataType enum)
  nDstPixelStride | Destination pixel stride (i.e. distance between 2 words), in bytes
  nWordCount | number of words to be copied

Note
  When adding a new data type to GDAL, you must do the following to support it properly within the GDALCopyWords function:
  1. Add the data type to the switch on eSrcType in GDALCopyWords. This should invoke the appropriate GDALCopyWordsFromT wrapper.
  2. Add the data type to the switch on eDstType in GDALCopyWordsFromT. This should call the appropriate GDALCopyWordsT template.
  3. If appropriate, overload the appropriate CopyWord template in the above namespace. This will ensure that any conversion issues are handled (cases like the float -> int32 case, where the min/max) values are subject to roundoff error.

## ◆ GDALCreate()

GDALDatasetH GDALCreate | ( | GDALDriverH | hDriver,
|  | const char * | pszFilename,
|  | int | nXSize,
|  | int | nYSize,
|  | int | nBands,
|  | GDALDataType | eBandType,
|  | CSLConstList | papszOptions
| ) |  |

Create a new dataset with this driver.

See also
  GDALDriver::Create()

## ◆ GDALCreateColorRamp()

void GDALCreateColorRamp | ( | GDALColorTableH | hTable,
|  | int | nStartIndex,
|  | const GDALColorEntry * | psStartColor,
|  | int | nEndIndex,
|  | const GDALColorEntry * | psEndColor
| ) |  |

Create color ramp.

This function is the same as the C++ method GDALColorTable::CreateColorRamp()

## ◆ GDALCreateColorTable()

GDALColorTableH GDALCreateColorTable | ( | GDALPaletteInterp | eInterp | ) |

Construct a new color table.

This function is the same as the C++ method GDALColorTable::GDALColorTable()

## ◆ GDALCreateCopy()

GDALDatasetH GDALCreateCopy | ( | GDALDriverH | hDriver,
|  | const char * | pszFilename,
|  | GDALDatasetH | hSrcDS,
|  | int | bStrict,
|  | CSLConstList | papszOptions,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData
| ) |  |

Create a copy of a dataset.

See also
  GDALDriver::CreateCopy()

## ◆ GDALCreateDatasetMaskBand()

CPLErr GDALCreateDatasetMaskBand | ( | GDALDatasetH | hDS,
|  | int | nFlags
| ) |  |

Adds a mask band to the dataset.

See also
  GDALDataset::CreateMaskBand()

## ◆ GDALCreateDriver()

GDALDriverH GDALCreateDriver | ( | void |  | ) |

Create a GDALDriver.

Creates a driver in the GDAL heap.

## ◆ GDALCreateMaskBand()

CPLErr GDALCreateMaskBand | ( | GDALRasterBandH | hBand,
|  | int | nFlags
| ) |  |

Adds a mask band to the current band.

See also
  GDALRasterBand::CreateMaskBand()

## ◆ GDALCreateMultiDimensional()

GDALDatasetH GDALCreateMultiDimensional | ( | GDALDriverH | hDriver,
|  | const char * | pszName,
|  | CSLConstList | papszRootGroupOptions,
|  | CSLConstList | papszOptions
| ) |  |

Create a new multidimensional dataset with this driver.

This is the same as the C++ method GDALDriver::CreateMultiDimensional().

## ◆ GDALCreatePansharpenedVRT()

GDALDatasetH GDALCreatePansharpenedVRT | ( | const char * | pszXML,
|  | GDALRasterBandH | hPanchroBand,
|  | int | nInputSpectralBands,
|  | GDALRasterBandH * | pahInputSpectralBands
| ) |  |

Create a virtual pansharpened dataset.

This function will create a virtual pansharpened dataset.

Note that no reference will be taken on the passed bands. Consequently, they or their dataset to which they belong to must be kept open until this virtual pansharpened dataset is closed.

The returned dataset will have no associated filename for itself. If you want to write the virtual dataset description to a file, use the GDALSetDescription() function (or SetDescription() method) on the dataset to assign a filename before it is closed.

Parameters

  pszXML | Pansharpened VRT XML where <SpectralBand> elements have no explicit SourceFilename and SourceBand. The spectral bands in the XML will be assigned the successive values of the pahInputSpectralBands array. Must not be NULL.
  hPanchroBand | Panchromatic band. Must not be NULL.
  nInputSpectralBands | Number of input spectral bands. Must be greater than zero.
  pahInputSpectralBands | Array of nInputSpectralBands spectral bands.

Returns
  NULL on failure, or a new virtual dataset handle on success to be closed with GDALClose().

Since
  GDAL 2.1

## ◆ GDALCreateRasterAttributeTable()

GDALRasterAttributeTableH GDALCreateRasterAttributeTable | ( | void |  | ) |

Construct empty table.

This function is the same as the C++ method GDALDefaultRasterAttributeTable::GDALDefaultRasterAttributeTable()

## ◆ GDALCreateRasterAttributeTableFromMDArrays()

GDALRasterAttributeTableH GDALCreateRasterAttributeTableFromMDArrays | ( | GDALRATTableType | eTableType,
|  | int | nArrays,
|  | const GDALMDArrayH * | ahArrays,
|  | const GDALRATFieldUsage * | paeUsages
| ) |  |

Return a virtual Raster Attribute Table from several GDALMDArray's.

All arrays must be single-dimensional and be indexed by the same dimension.

This is the same as the C++ method GDALCreateRasterAttributeTableFromMDArrays().

Parameters

  eTableType | RAT table type
  nArrays | Number of elements in ahArrays parameter
  ahArrays | Array of nArrays GDALMDArray's (none of them should be nullptr)
  paeUsages | Array of nArray GDALRATFieldUsage, or nullptr to use defaults

Returns
  a new Raster Attribute Table to free with GDALDestroyRasterAttributeTable(), or nullptr in case of error

Since
  3.9

## ◆ GDALDatasetAbortSQL()

OGRErr GDALDatasetAbortSQL | ( | GDALDatasetH | hDS | ) |

Abort any SQL statement running in the data store.

This function can be safely called from any thread (pending that the dataset object is still alive). Driver implementations will make sure that it can be called in a thread-safe way.

This might not be implemented by all drivers. At time of writing, only SQLite, GPKG and PG drivers implement it

This method is the same as the C++ method GDALDataset::AbortSQL()

Since
  GDAL 3.2.0

Parameters

  hDS | the dataset handle.

Returns
  OGRERR_NONE on success, or OGRERR_UNSUPPORTED_OPERATION if AbortSQL is not supported for this datasource. .

## ◆ GDALDatasetAddFieldDomain()

bool GDALDatasetAddFieldDomain | ( | GDALDatasetH | hDS,
|  | OGRFieldDomainH | hFieldDomain,
|  | char ** | ppszFailureReason
| ) |  |

Add a field domain to the dataset.

Only a few drivers will support this operation, and some of them might only support it only for some types of field domains. At the time of writing (GDAL 3.3), only the Memory and GeoPackage drivers support this operation. A dataset having at least some support for this operation should report the ODsCAddFieldDomain dataset capability.

Anticipated failures will not be emitted through the CPLError() infrastructure, but will be reported in the ppszFailureReason output parameter.

Parameters

  hDS | Dataset handle.
  hFieldDomain | The domain definition. Contrary to the C++ version, the passed object is copied.
  ppszFailureReason | Output parameter. Will contain an error message if an error occurs (*ppszFailureReason to be freed with CPLFree). May be NULL.

Returns
  true in case of success.

Since
  GDAL 3.3

## ◆ GDALDatasetAddRelationship()

bool GDALDatasetAddRelationship | ( | GDALDatasetH | hDS,
|  | GDALRelationshipH | hRelationship,
|  | char ** | ppszFailureReason
| ) |  |

Add a relationship to the dataset.

Only a few drivers will support this operation, and some of them might only support it only for some types of relationships.

A dataset having at least some support for this operation should report the GDsCAddRelationship dataset capability.

Anticipated failures will not be emitted through the CPLError() infrastructure, but will be reported in the failureReason output parameter.

When adding a many-to-many relationship (GDALRelationshipCardinality::GRC_MANY_TO_MANY), it is possible to omit the mapping table name (see GDALRelationshipGetMappingTableName) to instruct the driver to create an appropriately named and structured mapping table. Some dataset formats require particular naming conventions and field structures for the mapping table, and delegating the construction of the mapping table to the driver will avoid these pitfalls.

Parameters

  hDS | Dataset handle.
  hRelationship | The relationship definition. Contrary to the C++ version, the passed object is copied.
  ppszFailureReason | Output parameter. Will contain an error message if an error occurs (*ppszFailureReason to be freed with CPLFree). May be NULL.

Returns
  true in case of success.

Since
  GDAL 3.6

## ◆ GDALDatasetAdviseRead()

CPLErr GDALDatasetAdviseRead | ( | GDALDatasetH | hDS,
|  | int | nXOff,
|  | int | nYOff,
|  | int | nXSize,
|  | int | nYSize,
|  | int | nBufXSize,
|  | int | nBufYSize,
|  | GDALDataType | eDT,
|  | int | nBandCount,
|  | int * | panBandMap,
|  | CSLConstList | papszOptions
| ) |  |

Advise driver of upcoming read requests.

See also
  GDALDataset::AdviseRead()

## ◆ GDALDatasetClearStatistics()

void GDALDatasetClearStatistics | ( | GDALDatasetH | hDS | ) |

Clear statistics.

This is the same as the C++ method GDALDataset::ClearStatistics().

Since
  GDAL 3.2

## ◆ GDALDatasetCommitTransaction()

OGRErr GDALDatasetCommitTransaction | ( | GDALDatasetH | hDS | ) |

For datasources which support transactions, CommitTransaction commits a transaction.

If no transaction is active, or the commit fails, will return OGRERR_FAILURE. Datasources which do not support transactions will always return OGRERR_UNSUPPORTED_OPERATION.

Depending on drivers, this may or may not abort layer sequential readings that are active.

This function is the same as the C++ method GDALDataset::CommitTransaction()

Returns
  OGRERR_NONE on success.

Since
  GDAL 2.0

## ◆ GDALDatasetCopyLayer()

OGRLayerH GDALDatasetCopyLayer | ( | GDALDatasetH | hDS,
|  | OGRLayerH | hSrcLayer,
|  | const char * | pszNewName,
|  | CSLConstList | papszOptions
| ) |  |

Duplicate an existing layer.

This function creates a new layer, duplicate the field definitions of the source layer and then duplicate each features of the source layer. The papszOptions argument can be used to control driver specific creation options. These options are normally documented in the format specific documentation. The source layer may come from another dataset.

This method is the same as the C++ method GDALDataset::CopyLayer()

Since
  GDAL 2.0

Parameters

  hDS | the dataset handle.
  hSrcLayer | source layer.
  pszNewName | the name of the layer to create.
  papszOptions | a StringList of name=value options. Options are driver specific.

Returns
  a handle to the layer, or NULL if an error occurs.

## ◆ GDALDatasetCopyWholeRaster()

CPLErr GDALDatasetCopyWholeRaster | ( | GDALDatasetH | hSrcDS,
|  | GDALDatasetH | hDstDS,
|  | CSLConstList | papszOptions,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData
| ) |  |

Copy all dataset raster data.

This function copies the complete raster contents of one dataset to another similarly configured dataset. The source and destination dataset must have the same number of bands, and the same width and height. The bands do not have to have the same data type.

This function is primarily intended to support implementation of driver specific CreateCopy() functions. It implements efficient copying, in particular "chunking" the copy in substantial blocks and, if appropriate, performing the transfer in a pixel interleaved fashion.

Currently the only papszOptions value supported are :

- "INTERLEAVE=PIXEL/BAND" to force pixel (resp. band) interleaved read and write access pattern (this does not modify the layout of the destination data)
- "COMPRESSED=YES" to force alignment on target dataset block sizes to achieve best compression.
- "SKIP_HOLES=YES" to skip chunks for which GDALGetDataCoverageStatus() returns GDAL_DATA_COVERAGE_STATUS_EMPTY (GDAL >= 2.2)

More options may be supported in the future.

Parameters

  hSrcDS | the source dataset
  hDstDS | the destination dataset
  papszOptions | transfer hints in "StringList" Name=Value format.
  pfnProgress | progress reporting function.
  pProgressData | callback data for progress function.

Returns
  CE_None on success, or CE_Failure on failure.

## ◆ GDALDatasetCreateLayer()

OGRLayerH GDALDatasetCreateLayer | ( | GDALDatasetH | hDS,
|  | const char * | pszName,
|  | OGRSpatialReferenceH | hSpatialRef,
|  | OGRwkbGeometryType | eGType,
|  | CSLConstList | papszOptions
| ) |  |

This function attempts to create a new layer on the dataset with the indicated name, coordinate system, geometry type.

The papszOptions argument can be used to control driver specific creation options. These options are normally documented in the format specific documentation.

This method is the same as the C++ method GDALDataset::CreateLayer().

Example:

#include "gdal.h"
#include "cpl_string.h"
...
OGRLayerH hLayer;
char **papszOptions;
if( !GDALDatasetTestCapability( hDS, ODsCCreateLayer ) )
{
...
}
papszOptions = CSLSetNameValue( papszOptions, "DIM", "2" );
hLayer = GDALDatasetCreateLayer( hDS, "NewLayer", NULL, wkbUnknown,
papszOptions );
CSLDestroy( papszOptions );
if( hLayer == NULL )
{
...
}
cpl_string.h
Various convenience functions for working with strings and string lists.
gdal.h
Public (C callable) GDAL entry points.
GDALDatasetCreateLayer
OGRLayerH GDALDatasetCreateLayer(GDALDatasetH, const char *, OGRSpatialReferenceH, OGRwkbGeometryType, CSLConstList)
This function attempts to create a new layer on the dataset with the indicated name,...
Definition gdaldataset.cpp:5165
GDALDatasetTestCapability
int GDALDatasetTestCapability(GDALDatasetH, const char *)
Test if capability is available.
Definition gdaldataset.cpp:7902
OGRLayerH
void * OGRLayerH
Opaque type for a layer (OGRLayer)
Definition ogr_api.h:688
wkbUnknown
@ wkbUnknown
unknown type, non-standard
Definition ogr_core.h:417
ODsCCreateLayer
#define ODsCCreateLayer
Dataset capability for layer creation.
Definition ogr_core.h:1058

Since
  GDAL 2.0

Parameters

  hDS | the dataset handle
  pszName | the name for the new layer. This should ideally not match any existing layer on the datasource.
  hSpatialRef | the coordinate system to use for the new layer, or NULL if no coordinate system is available.
  eGType | the geometry type for the layer. Use wkbUnknown if there are no constraints on the types geometry to be written.
  papszOptions | a StringList of name=value options. Options are driver specific.

Returns
  NULL is returned on failure, or a new OGRLayer handle on success.

## ◆ GDALDatasetCreateLayerFromGeomFieldDefn()

OGRLayerH GDALDatasetCreateLayerFromGeomFieldDefn | ( | GDALDatasetH | hDS,
|  | const char * | pszName,
|  | OGRGeomFieldDefnH | hGeomFieldDefn,
|  | CSLConstList | papszOptions
| ) |  |

This function attempts to create a new layer on the dataset with the indicated name and geometry field.

When poGeomFieldDefn is not null, most drivers should honor poGeomFieldDefn->GetType() and poGeomFieldDefn->GetSpatialRef(). Drivers that honor poGeomFieldDefn->GetCoordinatePrecision() will declare the GDAL_DCAP_HONOR_GEOM_COORDINATE_PRECISION capability. Drivers may honor poGeomFieldDefn->GetNameRef() and poGeomFieldDefn->IsNullable(), but there are very few currently.

Note that even if a geometry coordinate precision is set and a driver honors the GDAL_DCAP_HONOR_GEOM_COORDINATE_PRECISION capability, geometries passed to OGRLayer::CreateFeature() and OGRLayer::SetFeature() are assumed to be compatible with the coordinate precision. That is they are assumed to be valid once their coordinates are rounded to it. If it might not be the case, the user may set the OGR_APPLY_GEOM_SET_PRECISION configuration option before calling CreateFeature() or SetFeature() to force the OGRGeometry::SetPrecision() method to be called on the passed geometries.

The papszOptions argument can be used to control driver specific creation options. These options are normally documented in the format specific documentation.

This method is the same as the C++ method GDALDataset::CreateLayer().

Parameters

  hDS | the dataset handle
  pszName | the name for the new layer. This should ideally not match any existing layer on the datasource.
  hGeomFieldDefn | the geometry field definition. May be NULL to indicate a non-spatial file (or if adding geometry fields later with OGR_L_CreateGeomField() for drivers supporting that interface).
  papszOptions | a StringList of name=value options. Options are driver specific.

Returns
  NULL is returned on failure, or a new OGRLayer handle on success.

Since
  GDAL 3.9

## ◆ GDALDatasetDeleteFieldDomain()

bool GDALDatasetDeleteFieldDomain | ( | GDALDatasetH | hDS,
|  | const char * | pszName,
|  | char ** | ppszFailureReason
| ) |  |

Removes a field domain from the dataset.

Only a few drivers will support this operation.

At the time of writing (GDAL 3.5), only the Memory and GeoPackage drivers support this operation. A dataset having at least some support for this operation should report the ODsCDeleteFieldDomain dataset capability.

Anticipated failures will not be emitted through the CPLError() infrastructure, but will be reported in the ppszFailureReason output parameter.

Parameters

  hDS | Dataset handle.
  pszName | The domain name.
  ppszFailureReason | Output parameter. Will contain an error message if an error occurs (*ppszFailureReason to be freed with CPLFree). May be NULL.

Returns
  true in case of success.

Since
  GDAL 3.3

## ◆ GDALDatasetDeleteLayer()

OGRErr GDALDatasetDeleteLayer | ( | GDALDatasetH | hDS,
|  | int | iLayer
| ) |  |

Delete the indicated layer from the datasource.

If this function is supported the ODsCDeleteLayer capability will test TRUE on the GDALDataset.

This method is the same as the C++ method GDALDataset::DeleteLayer().

Since
  GDAL 2.0

Parameters

  hDS | the dataset handle.
  iLayer | the index of the layer to delete.

Returns
  OGRERR_NONE on success, or OGRERR_UNSUPPORTED_OPERATION if deleting layers is not supported for this datasource.

## ◆ GDALDatasetDeleteRelationship()

bool GDALDatasetDeleteRelationship | ( | GDALDatasetH | hDS,
|  | const char * | pszName,
|  | char ** | ppszFailureReason
| ) |  |

Removes a relationship from the dataset.

Only a few drivers will support this operation.

A dataset having at least some support for this operation should report the GDsCDeleteRelationship dataset capability.

Anticipated failures will not be emitted through the CPLError() infrastructure, but will be reported in the ppszFailureReason output parameter.

Parameters

  hDS | Dataset handle.
  pszName | The relationship name.
  ppszFailureReason | Output parameter. Will contain an error message if an error occurs (*ppszFailureReason to be freed with CPLFree). May be NULL.

Returns
  true in case of success.

Since
  GDAL 3.6

## ◆ GDALDatasetExecuteSQL()

OGRLayerH GDALDatasetExecuteSQL | ( | GDALDatasetH | hDS,
|  | const char * | pszStatement,
|  | OGRGeometryH | hSpatialFilter,
|  | const char * | pszDialect
| ) |  |

Execute an SQL statement against the data store.

The result of an SQL query is either NULL for statements that are in error, or that have no results set, or an OGRLayer pointer representing a results set from the query. Note that this OGRLayer is in addition to the layers in the data store and must be destroyed with ReleaseResultSet() before the dataset is closed (destroyed).

This method is the same as the C++ method GDALDataset::ExecuteSQL()

For more information on the SQL dialect supported internally by OGR review the OGR SQL document. Some drivers (i.e. Oracle and PostGIS) pass the SQL directly through to the underlying RDBMS.

Starting with OGR 1.10, the SQLITE dialect can also be used.

Since
  GDAL 2.0

Parameters

  hDS | the dataset handle.
  pszStatement | the SQL statement to execute.
  hSpatialFilter | geometry which represents a spatial filter. Can be NULL.
  pszDialect | allows control of the statement dialect. If set to NULL, the OGR SQL engine will be used, except for RDBMS drivers that will use their dedicated SQL engine, unless OGRSQL is explicitly passed as the dialect. Starting with OGR 1.10, the SQLITE dialect can also be used.

Returns
  an OGRLayer containing the results of the query. Deallocate with GDALDatasetReleaseResultSet().

## ◆ GDALDatasetGetCompressionFormats()

char ** GDALDatasetGetCompressionFormats | ( | GDALDatasetH | hDS,
|  | int | nXOff,
|  | int | nYOff,
|  | int | nXSize,
|  | int | nYSize,
|  | int | nBandCount,
|  | const int * | panBandList
| ) |  |

Return the compression formats that can be natively obtained for the window of interest and requested bands.

For example, a tiled dataset may be able to return data in a compressed format if the window of interest matches exactly a tile. For some formats, drivers may also be able to merge several tiles together (not currently implemented though).

Each format string is a pseudo MIME type, whose first part can be passed as the pszFormat argument of ReadCompressedData(), with additional parameters specified as key=value with a semi-colon separator.

The amount and types of optional parameters passed after the MIME type is format dependent, and driver dependent (some drivers might not be able to return those extra information without doing a rather costly processing).

For example, a driver might return "JPEG;frame_type=SOF0_baseline;" "bit_depth=8;num_components=3;subsampling=4:2:0;colorspace=YCbCr", and consequently "JPEG" can be passed as the pszFormat argument of ReadCompressedData(). For JPEG, implementations can use the GDALGetCompressionFormatForJPEG() helper method to generate a string like above from a JPEG codestream.

Several values might be returned. For example, the JPEGXL driver will return "JXL", but also potentially "JPEG" if the JPEGXL codestream includes a JPEG reconstruction box.

In the general case this method will return an empty list.

This is the same as C++ method GDALDataset::GetCompressionFormats().

Parameters

  hDS | Dataset handle.
  nXOff | The pixel offset to the top left corner of the region of the band to be accessed. This would be zero to start from the left side.
  nYOff | The line offset to the top left corner of the region of the band to be accessed. This would be zero to start from the top.
  nXSize | The width of the region of the band to be accessed in pixels.
  nYSize | The height of the region of the band to be accessed in lines.
  nBandCount | the number of bands being requested.
  panBandList | the list of nBandCount band numbers. Note band numbers are 1 based. This may be NULL to select the first nBandCount bands.

Returns
  a list of compatible formats (which may be empty) that should be freed with CSLDestroy(), or nullptr.

Since
  GDAL 3.7

## ◆ GDALDatasetGetFieldDomain()

OGRFieldDomainH GDALDatasetGetFieldDomain | ( | GDALDatasetH | hDS,
|  | const char * | pszName
| ) |  |

Get a field domain from its name.

This is the same as the C++ method GDALDataset::GetFieldDomain().

Parameters

  hDS | Dataset handle.
  pszName | Name of field domain.

Returns
  the field domain (ownership remains to the dataset), or nullptr if not found.

Since
  GDAL 3.3

## ◆ GDALDatasetGetFieldDomainNames()

char ** GDALDatasetGetFieldDomainNames | ( | GDALDatasetH | hDS,
|  | CSLConstList | papszOptions
| ) |  |

Returns a list of the names of all field domains stored in the dataset.

This is the same as the C++ method GDALDataset::GetFieldDomainNames().

Parameters

  hDS | Dataset handle.
  papszOptions | Driver specific options determining how attributes should be retrieved. Pass nullptr for default behavior.

Returns
  list of field domain names, to be freed with CSLDestroy()

Since
  GDAL 3.5

## ◆ GDALDatasetGetLayer()

OGRLayerH GDALDatasetGetLayer | ( | GDALDatasetH | hDS,
|  | int | iLayer
| ) |  |

Fetch a layer by index.

The returned layer remains owned by the GDALDataset and should not be deleted by the application.

This function is the same as the C++ method GDALDataset::GetLayer()

Since
  GDAL 2.0

Parameters

  hDS | the dataset handle.
  iLayer | a layer number between 0 and GetLayerCount()-1.

Returns
  the layer, or NULL if iLayer is out of range or an error occurs.

## ◆ GDALDatasetGetLayerByName()

OGRLayerH GDALDatasetGetLayerByName | ( | GDALDatasetH | hDS,
|  | const char * | pszName
| ) |  |

Fetch a layer by name.

The returned layer remains owned by the GDALDataset and should not be deleted by the application.

This function is the same as the C++ method GDALDataset::GetLayerByName()

Since
  GDAL 2.0

Parameters

  hDS | the dataset handle.
  pszName | the layer name of the layer to fetch.

Returns
  the layer, or NULL if Layer is not found or an error occurs.

## ◆ GDALDatasetGetLayerCount()

int GDALDatasetGetLayerCount | ( | GDALDatasetH | hDS | ) |

Get the number of layers in this dataset.

This function is the same as the C++ method GDALDataset::GetLayerCount()

Since
  GDAL 2.0

Parameters

  hDS | the dataset handle.

Returns
  layer count.

## ◆ GDALDatasetGetNextFeature()

OGRFeatureH GDALDatasetGetNextFeature | ( | GDALDatasetH | hDS,
|  | OGRLayerH * | phBelongingLayer,
|  | double * | pdfProgressPct,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData
| ) |  |

Fetch the next available feature from this dataset.

This method is intended for the few drivers where OGR_L_GetNextFeature() is not efficient, but in general OGR_L_GetNextFeature() is a more natural API.

The returned feature becomes the responsibility of the caller to delete with OGRFeature::DestroyFeature().

Depending on the driver, this method may return features from layers in a non sequential way. This is what may happen when the ODsCRandomLayerRead capability is declared (for example for the OSM and GMLAS drivers). When datasets declare this capability, it is strongly advised to use GDALDataset::GetNextFeature() instead of OGRLayer::GetNextFeature(), as the later might have a slow, incomplete or stub implementation.

The default implementation, used by most drivers, will however iterate over each layer, and then over each feature within this layer.

This method takes into account spatial and attribute filters set on layers that will be iterated upon.

The ResetReading() method can be used to start at the beginning again.

Depending on drivers, this may also have the side effect of calling OGRLayer::GetNextFeature() on the layers of this dataset.

This method is the same as the C++ method GDALDataset::GetNextFeature()

Parameters

  hDS | dataset handle.
  phBelongingLayer | a pointer to a OGRLayer* variable to receive the layer to which the object belongs to, or NULL. It is possible that the output of *ppoBelongingLayer to be NULL despite the feature not being NULL.
  pdfProgressPct | a pointer to a double variable to receive the percentage progress (in [0,1] range), or NULL. On return, the pointed value might be negative if determining the progress is not possible.
  pfnProgress | a progress callback to report progress (for GetNextFeature() calls that might have a long duration) and offer cancellation possibility, or NULL
  pProgressData | user data provided to pfnProgress, or NULL

Returns
  a feature, or NULL if no more features are available.

Since
  GDAL 2.2

## ◆ GDALDatasetGetRelationship()

GDALRelationshipH GDALDatasetGetRelationship | ( | GDALDatasetH | hDS,
|  | const char * | pszName
| ) |  |

Get a relationship from its name.

This is the same as the C++ method GDALDataset::GetRelationship().

Parameters

  hDS | Dataset handle.
  pszName | Name of relationship.

Returns
  the relationship (ownership remains to the dataset), or nullptr if not found.

Since
  GDAL 3.6

## ◆ GDALDatasetGetRelationshipNames()

char ** GDALDatasetGetRelationshipNames | ( | GDALDatasetH | hDS,
|  | CSLConstList | papszOptions
| ) |  |

Returns a list of the names of all relationships stored in the dataset.

This is the same as the C++ method GDALDataset::GetRelationshipNames().

Parameters

  hDS | Dataset handle.
  papszOptions | Driver specific options determining how relationships should be retrieved. Pass nullptr for default behavior.

Returns
  list of relationship names, to be freed with CSLDestroy()

Since
  GDAL 3.6

## ◆ GDALDatasetGetRootGroup()

GDALGroupH GDALDatasetGetRootGroup | ( | GDALDatasetH | hDS | ) |

Return the root GDALGroup of this dataset.

Only valid for multidimensional datasets.

The returned value must be freed with GDALGroupRelease().

This is the same as the C++ method GDALDataset::GetRootGroup().

Since
  GDAL 3.1

## ◆ GDALDatasetGetStyleTable()

OGRStyleTableH GDALDatasetGetStyleTable | ( | GDALDatasetH | hDS | ) |

Returns dataset style table.

This function is the same as the C++ method GDALDataset::GetStyleTable()

Since
  GDAL 2.0

Parameters

  hDS | the dataset handle

Returns
  handle to a style table which should not be modified or freed by the caller.

## ◆ GDALDatasetGetTiledVirtualMem()

CPLVirtualMem * GDALDatasetGetTiledVirtualMem | ( | GDALDatasetH | hDS,
|  | GDALRWFlag | eRWFlag,
|  | int | nXOff,
|  | int | nYOff,
|  | int | nXSize,
|  | int | nYSize,
|  | int | nTileXSize,
|  | int | nTileYSize,
|  | GDALDataType | eBufType,
|  | int | nBandCount,
|  | int * | panBandMap,
|  | GDALTileOrganization | eTileOrganization,
|  | size_t | nCacheSize,
|  | int | bSingleThreadUsage,
|  | CSLConstList | papszOptions
| ) |  |

Create a CPLVirtualMem object from a GDAL dataset object, with tiling organization.

Only supported on Linux for now.

This method allows creating a virtual memory object for a region of one or more GDALRasterBands from this dataset. The content of the virtual memory object is automatically filled from dataset content when a virtual memory page is first accessed, and it is released (or flushed in case of a "dirty" page) when the cache size limit has been reached.

Contrary to GDALDatasetGetVirtualMem(), pixels will be organized by tiles instead of scanlines. Different ways of organizing pixel within/across tiles can be selected with the eTileOrganization parameter.

If nXSize is not a multiple of nTileXSize or nYSize is not a multiple of nTileYSize, partial tiles will exists at the right and/or bottom of the region of interest. Those partial tiles will also have nTileXSize * nTileYSize dimension, with padding pixels.

The pointer to access the virtual memory object is obtained with CPLVirtualMemGetAddr(). It remains valid until CPLVirtualMemFree() is called. CPLVirtualMemFree() must be called before the dataset object is destroyed.

If p is such a pointer and base_type the C type matching eBufType, for default values of spacing parameters, the element of image coordinates (x, y) (relative to xOff, yOff) for band b can be accessed with:

- for eTileOrganization = GTO_TIP, ((base_type*)p)[tile_number(x,y)*nBandCount*tile_size + offset_in_tile(x,y)*nBandCount + (b-1)].
- for eTileOrganization = GTO_BIT, ((base_type*)p)[(tile_number(x,y)*nBandCount + (b-1)) * tile_size + offset_in_tile(x,y)].
- for eTileOrganization = GTO_BSQ, ((base_type*)p)[(tile_number(x,y) + (b-1)*nTilesCount) * tile_size + offset_in_tile(x,y)].

where nTilesPerRow = ceil(nXSize / nTileXSize) nTilesPerCol = ceil(nYSize / nTileYSize) nTilesCount = nTilesPerRow * nTilesPerCol tile_number(x,y) = (y / nTileYSize) * nTilesPerRow + (x / nTileXSize) offset_in_tile(x,y) = (y % nTileYSize) * nTileXSize + (x % nTileXSize) tile_size = nTileXSize * nTileYSize

Note that for a single band request, all tile organizations are equivalent.

Note that the mechanism used to transparently fill memory pages when they are accessed is the same (but in a controlled way) than what occurs when a memory error occurs in a program. Debugging software will generally interrupt program execution when that happens. If needed, CPLVirtualMemPin() can be used to avoid that by ensuring memory pages are allocated before being accessed.

The size of the region that can be mapped as a virtual memory object depends on hardware and operating system limitations. On Linux AMD64 platforms, the maximum value is 128 TB. On Linux x86 platforms, the maximum value is 2 GB.

Data type translation is automatically done if the data type (eBufType) of the buffer is different than that of the GDALRasterBand.

Parameters

  hDS | Dataset object
  eRWFlag | Either GF_Read to read a region of data, or GF_Write to write a region of data.
  nXOff | The pixel offset to the top left corner of the region of the band to be accessed. This would be zero to start from the left side.
  nYOff | The line offset to the top left corner of the region of the band to be accessed. This would be zero to start from the top.
  nXSize | The width of the region of the band to be accessed in pixels.
  nYSize | The height of the region of the band to be accessed in lines.
  nTileXSize | the width of the tiles.
  nTileYSize | the height of the tiles.
  eBufType | the type of the pixel values in the data buffer. The pixel values will automatically be translated to/from the GDALRasterBand data type as needed.
  nBandCount | the number of bands being read or written.
  panBandMap | the list of nBandCount band numbers being read/written. Note band numbers are 1 based. This may be NULL to select the first nBandCount bands.
  eTileOrganization | tile organization.
  nCacheSize | size in bytes of the maximum memory that will be really allocated (must ideally fit into RAM)
  bSingleThreadUsage | set to TRUE if there will be no concurrent threads that will access the virtual memory mapping. This can optimize performance a bit. If set to FALSE, CPLVirtualMemDeclareThread() must be called.
  papszOptions | NULL terminated list of options. Unused for now.

Returns
  a virtual memory object that must be freed by CPLVirtualMemFree(), or NULL in case of failure.

Since
  GDAL 1.11

## ◆ GDALDatasetGetVirtualMem()

CPLVirtualMem * GDALDatasetGetVirtualMem | ( | GDALDatasetH | hDS,
|  | GDALRWFlag | eRWFlag,
|  | int | nXOff,
|  | int | nYOff,
|  | int | nXSize,
|  | int | nYSize,
|  | int | nBufXSize,
|  | int | nBufYSize,
|  | GDALDataType | eBufType,
|  | int | nBandCount,
|  | int * | panBandMap,
|  | int | nPixelSpace,
|  | GIntBig | nLineSpace,
|  | GIntBig | nBandSpace,
|  | size_t | nCacheSize,
|  | size_t | nPageSizeHint,
|  | int | bSingleThreadUsage,
|  | CSLConstList | papszOptions
| ) |  |

Create a CPLVirtualMem object from a GDAL dataset object.

Only supported on Linux for now.

This method allows creating a virtual memory object for a region of one or more GDALRasterBands from this dataset. The content of the virtual memory object is automatically filled from dataset content when a virtual memory page is first accessed, and it is released (or flushed in case of a "dirty" page) when the cache size limit has been reached.

The pointer to access the virtual memory object is obtained with CPLVirtualMemGetAddr(). It remains valid until CPLVirtualMemFree() is called. CPLVirtualMemFree() must be called before the dataset object is destroyed.

If p is such a pointer and base_type the C type matching eBufType, for default values of spacing parameters, the element of image coordinates (x, y) (relative to xOff, yOff) for band b can be accessed with ((base_type*)p)[x + y * nBufXSize + (b-1)*nBufXSize*nBufYSize].

Note that the mechanism used to transparently fill memory pages when they are accessed is the same (but in a controlled way) than what occurs when a memory error occurs in a program. Debugging software will generally interrupt program execution when that happens. If needed, CPLVirtualMemPin() can be used to avoid that by ensuring memory pages are allocated before being accessed.

The size of the region that can be mapped as a virtual memory object depends on hardware and operating system limitations. On Linux AMD64 platforms, the maximum value is 128 TB. On Linux x86 platforms, the maximum value is 2 GB.

Data type translation is automatically done if the data type (eBufType) of the buffer is different than that of the GDALRasterBand.

Image decimation / replication is currently not supported, i.e. if the size of the region being accessed (nXSize x nYSize) is different from the buffer size (nBufXSize x nBufYSize).

The nPixelSpace, nLineSpace and nBandSpace parameters allow reading into or writing from various organization of buffers. Arbitrary values for the spacing parameters are not supported. Those values must be multiple of the size of thebuffer data type, and must be either band sequential organization (typically nPixelSpace = GDALGetDataTypeSizeBytes(eBufType), nLineSpace = nPixelSpace * nBufXSize, nBandSpace = nLineSpace * nBufYSize), or pixel-interleaved organization (typically nPixelSpace = nBandSpace * nBandCount, nLineSpace = nPixelSpace * nBufXSize, nBandSpace = GDALGetDataTypeSizeBytes(eBufType))

Parameters

  hDS | Dataset object
  eRWFlag | Either GF_Read to read a region of data, or GF_Write to write a region of data.
  nXOff | The pixel offset to the top left corner of the region of the band to be accessed. This would be zero to start from the left side.
  nYOff | The line offset to the top left corner of the region of the band to be accessed. This would be zero to start from the top.
  nXSize | The width of the region of the band to be accessed in pixels.
  nYSize | The height of the region of the band to be accessed in lines.
  nBufXSize | the width of the buffer image into which the desired region is to be read, or from which it is to be written.
  nBufYSize | the height of the buffer image into which the desired region is to be read, or from which it is to be written.
  eBufType | the type of the pixel values in the data buffer. The pixel values will automatically be translated to/from the GDALRasterBand data type as needed.
  nBandCount | the number of bands being read or written.
  panBandMap | the list of nBandCount band numbers being read/written. Note band numbers are 1 based. This may be NULL to select the first nBandCount bands.
  nPixelSpace | The byte offset from the start of one pixel value in the buffer to the start of the next pixel value within a scanline. If defaulted (0) the size of the datatype eBufType is used.
  nLineSpace | The byte offset from the start of one scanline in the buffer to the start of the next. If defaulted (0) the size of the datatype eBufType * nBufXSize is used.
  nBandSpace | the byte offset from the start of one bands data to the start of the next. If defaulted (0) the value will be nLineSpace * nBufYSize implying band sequential organization of the data buffer.
  nCacheSize | size in bytes of the maximum memory that will be really allocated (must ideally fit into RAM)
  nPageSizeHint | hint for the page size. Must be a multiple of the system page size, returned by CPLGetPageSize(). Minimum value is generally 4096. Might be set to 0 to let the function determine a default page size.
  bSingleThreadUsage | set to TRUE if there will be no concurrent threads that will access the virtual memory mapping. This can optimize performance a bit. If set to FALSE, CPLVirtualMemDeclareThread() must be called.
  papszOptions | NULL terminated list of options. Unused for now.

Returns
  a virtual memory object that must be freed by CPLVirtualMemFree(), or NULL in case of failure.

Since
  GDAL 1.11

## ◆ GDALDatasetIsLayerPrivate()

int GDALDatasetIsLayerPrivate | ( | GDALDatasetH | hDS,
|  | int | iLayer
| ) |  |

Returns true if the layer at the specified index is deemed a private or system table, or an internal detail only.

This function is the same as the C++ method GDALDataset::IsLayerPrivate()

Since
  GDAL 3.4

Parameters

  hDS | the dataset handle.
  iLayer | a layer number between 0 and GetLayerCount()-1.

Returns
  true if the layer is a private or system table.

## ◆ GDALDatasetRasterIO()

CPLErr GDALDatasetRasterIO | ( | GDALDatasetH | hDS,
|  | GDALRWFlag | eRWFlag,
|  | int | nXOff,
|  | int | nYOff,
|  | int | nXSize,
|  | int | nYSize,
|  | void * | pData,
|  | int | nBufXSize,
|  | int | nBufYSize,
|  | GDALDataType | eBufType,
|  | int | nBandCount,
|  | int * | panBandMap,
|  | int | nPixelSpace,
|  | int | nLineSpace,
|  | int | nBandSpace
| ) |  |

Read/write a region of image data from multiple bands.

Use GDALDatasetRasterIOEx() if 64 bit spacings or extra arguments (resampling resolution, progress callback, etc. are needed)

See also
  GDALDataset::RasterIO()

## ◆ GDALDatasetRasterIOEx()

CPLErr GDALDatasetRasterIOEx | ( | GDALDatasetH | hDS,
|  | GDALRWFlag | eRWFlag,
|  | int | nXOff,
|  | int | nYOff,
|  | int | nXSize,
|  | int | nYSize,
|  | void * | pData,
|  | int | nBufXSize,
|  | int | nBufYSize,
|  | GDALDataType | eBufType,
|  | int | nBandCount,
|  | int * | panBandMap,
|  | GSpacing | nPixelSpace,
|  | GSpacing | nLineSpace,
|  | GSpacing | nBandSpace,
|  | GDALRasterIOExtraArg * | psExtraArg
| ) |  |

Read/write a region of image data from multiple bands.

See also
  GDALDataset::RasterIO()

Since
  GDAL 2.0

## ◆ GDALDatasetReadCompressedData()

CPLErr GDALDatasetReadCompressedData | ( | GDALDatasetH | hDS,
|  | const char * | pszFormat,
|  | int | nXOff,
|  | int | nYOff,
|  | int | nXSize,
|  | int | nYSize,
|  | int | nBandCount,
|  | const int * | panBandList,
|  | void ** | ppBuffer,
|  | size_t * | pnBufferSize,
|  | char ** | ppszDetailedFormat
| ) |  |

Return the compressed content that can be natively obtained for the window of interest and requested bands.

For example, a tiled dataset may be able to return data in compressed format if the window of interest matches exactly a tile. For some formats, drivers may also be example to merge several tiles together (not currently implemented though).

The implementation should make sure that the content returned forms a valid standalone file. For example, for the GeoTIFF implementation of this method, when extracting a JPEG tile, the method will automatically adds the content of the JPEG Huffman and/or quantization tables that might be stored in the TIFF JpegTables tag, and not in tile data itself.

In the general case this method will return CE_Failure.

This is the same as C++ method GDALDataset:ReadCompressedData().

Parameters

  hDS | Dataset handle.
  pszFormat | Requested compression format (e.g. "JPEG", "WEBP", "JXL"). This is the MIME type of one of the values returned by GetCompressionFormats(). The format string is designed to potentially include at a later point key=value optional parameters separated by a semi-colon character. At time of writing, none are implemented. ReadCompressedData() implementations should verify optional parameters and return CE_Failure if they cannot support one of them.
  nXOff | The pixel offset to the top left corner of the region of the band to be accessed. This would be zero to start from the left side.
  nYOff | The line offset to the top left corner of the region of the band to be accessed. This would be zero to start from the top.
  nXSize | The width of the region of the band to be accessed in pixels.
  nYSize | The height of the region of the band to be accessed in lines.
  nBandCount | the number of bands being requested.
  panBandList | the list of nBandCount band numbers. Note band numbers are 1 based. This may be NULL to select the first nBandCount bands.
  ppBuffer | Pointer to a buffer to store the compressed data or nullptr. If ppBuffer is not nullptr, then pnBufferSize should also not be nullptr. If ppBuffer is not nullptr, and *ppBuffer is not nullptr, then the provided buffer will be filled with the compressed data, provided that pnBufferSize and *pnBufferSize are not nullptr, and *pnBufferSize, indicating the size of *ppBuffer, is sufficiently large to hold the data. If ppBuffer is not nullptr, but *ppBuffer is nullptr, then the method will allocate *ppBuffer using VSIMalloc(), and thus the caller is responsible to free it with VSIFree(). If ppBuffer is nullptr, then the compressed data itself will not be returned, but *pnBufferSize will be updated with an upper bound of the size that would be necessary to hold it (if pnBufferSize != nullptr).
  pnBufferSize | Output buffer size, or nullptr. If ppBuffer != nullptr && *ppBuffer != nullptr, then pnBufferSize should be != nullptr and *pnBufferSize contain the size of *ppBuffer. If the method is successful, *pnBufferSize will be updated with the actual size used.
  ppszDetailedFormat | Pointer to an output string, or nullptr. If ppszDetailedFormat is not nullptr, then, on success, the method will allocate a new string in *ppszDetailedFormat (to be freed with VSIFree()) *ppszDetailedFormat might contain strings like "JPEG;frame_type=SOF0_baseline;bit_depth=8;num_components=3;" "subsampling=4:2:0;colorspace=YCbCr" or simply the MIME type. The string will contain at least as much information as what GetCompressionFormats() returns, and potentially more when ppBuffer != nullptr.

Returns
  CE_None in case of success, CE_Failure otherwise.

Since
  GDAL 3.7

## ◆ GDALDatasetReleaseResultSet()

void GDALDatasetReleaseResultSet | ( | GDALDatasetH | hDS,
|  | OGRLayerH | hLayer
| ) |  |

Release results of ExecuteSQL().

This function should only be used to deallocate OGRLayers resulting from an ExecuteSQL() call on the same GDALDataset. Failure to deallocate a results set before destroying the GDALDataset may cause errors.

This function is the same as the C++ method GDALDataset::ReleaseResultSet()

Since
  GDAL 2.0

Parameters

  hDS | the dataset handle.
  hLayer | the result of a previous ExecuteSQL() call.

## ◆ GDALDatasetResetReading()

void GDALDatasetResetReading | ( | GDALDatasetH | hDS | ) |

Reset feature reading to start on the first feature.

This affects GDALDatasetGetNextFeature().

Depending on drivers, this may also have the side effect of calling OGR_L_ResetReading() on the layers of this dataset.

This method is the same as the C++ method GDALDataset::ResetReading()

Parameters

  hDS | dataset handle

Since
  GDAL 2.2

## ◆ GDALDatasetRollbackTransaction()

OGRErr GDALDatasetRollbackTransaction | ( | GDALDatasetH | hDS | ) |

For datasources which support transactions, RollbackTransaction will roll back a datasource to its state before the start of the current transaction.

If no transaction is active, or the rollback fails, will return OGRERR_FAILURE. Datasources which do not support transactions will always return OGRERR_UNSUPPORTED_OPERATION.

This function is the same as the C++ method GDALDataset::RollbackTransaction().

Returns
  OGRERR_NONE on success.

Since
  GDAL 2.0

## ◆ GDALDatasetSetQueryLoggerFunc()

bool GDALDatasetSetQueryLoggerFunc | ( | GDALDatasetH | hDS,
|  | GDALQueryLoggerFunc | pfnQueryLoggerFunc,
|  | void * | poQueryLoggerArg
| ) |  |

Sets the SQL query logger callback.

When supported by the driver, the callback will be called with the executed SQL text, the error message, the execution time in milliseconds, the number of records fetched/affected and the client status data.

A value of -1 in the execution time or in the number of records indicates that the values are unknown.

Parameters

  hDS | Dataset handle.
  pfnQueryLoggerFunc | Callback function
  poQueryLoggerArg | Opaque client status data

Returns
  true in case of success.

Since
  GDAL 3.7

## ◆ GDALDatasetSetStyleTable()

void GDALDatasetSetStyleTable | ( | GDALDatasetH | hDS,
|  | OGRStyleTableH | hStyleTable
| ) |  |

Set dataset style table.

This function operate exactly as GDALDatasetSetStyleTableDirectly() except that it assumes ownership of the passed table.

This function is the same as the C++ method GDALDataset::SetStyleTable()

Since
  GDAL 2.0

Parameters

  hDS | the dataset handle
  hStyleTable | style table handle to set

## ◆ GDALDatasetSetStyleTableDirectly()

void GDALDatasetSetStyleTableDirectly | ( | GDALDatasetH | hDS,
|  | OGRStyleTableH | hStyleTable
| ) |  |

Set dataset style table.

This function operate exactly as GDALDatasetSetStyleTable() except that it assumes ownership of the passed table.

This function is the same as the C++ method GDALDataset::SetStyleTableDirectly()

Since
  GDAL 2.0

Parameters

  hDS | the dataset handle
  hStyleTable | style table handle to set

## ◆ GDALDatasetStartTransaction()

OGRErr GDALDatasetStartTransaction | ( | GDALDatasetH | hDS,
|  | int | bForce
| ) |  |

For datasources which support transactions, StartTransaction creates a transaction.

If starting the transaction fails, will return OGRERR_FAILURE. Datasources which do not support transactions will always return OGRERR_UNSUPPORTED_OPERATION.

Nested transactions are not supported.

All changes done after the start of the transaction are definitely applied in the datasource if CommitTransaction() is called. They may be canceled by calling RollbackTransaction() instead.

At the time of writing, transactions only apply on vector layers.

Datasets that support transactions will advertise the ODsCTransactions capability. Use of transactions at dataset level is generally preferred to transactions at layer level, whose scope is rarely limited to the layer from which it was started.

In case StartTransaction() fails, neither CommitTransaction() or RollbackTransaction() should be called.

If an error occurs after a successful StartTransaction(), the whole transaction may or may not be implicitly canceled, depending on drivers. (e.g. the PG driver will cancel it, SQLite/GPKG not). In any case, in the event of an error, an explicit call to RollbackTransaction() should be done to keep things balanced.

By default, when bForce is set to FALSE, only "efficient" transactions will be attempted. Some drivers may offer an emulation of transactions, but sometimes with significant overhead, in which case the user must explicitly allow for such an emulation by setting bForce to TRUE. Drivers that offer emulated transactions should advertise the ODsCEmulatedTransactions capability (and not ODsCTransactions).

This function is the same as the C++ method GDALDataset::StartTransaction()

Parameters

  hDS | the dataset handle.
  bForce | can be set to TRUE if an emulation, possibly slow, of a transaction mechanism is acceptable.

Returns
  OGRERR_NONE on success.

Since
  GDAL 2.0

## ◆ GDALDatasetTestCapability()

int GDALDatasetTestCapability | ( | GDALDatasetH | hDS,
|  | const char * | pszCap
| ) |  |

Test if capability is available.

One of the following dataset capability names can be passed into this function, and a TRUE or FALSE value will be returned indicating whether or not the capability is available for this object.

- ODsCCreateLayer: True if this datasource can create new layers.

- ODsCDeleteLayer: True if this datasource can delete existing layers.

- ODsCCreateGeomFieldAfterCreateLayer: True if the layers of this datasource support CreateGeomField() just after layer creation.

- ODsCCurveGeometries: True if this datasource supports curve geometries.

- ODsCTransactions: True if this datasource supports (efficient) transactions.

- ODsCEmulatedTransactions: True if this datasource supports transactions through emulation.

- ODsCRandomLayerRead: True if this datasource has a dedicated GetNextFeature() implementation, potentially returning features from layers in a non sequential way.

- ODsCRandomLayerWrite: True if this datasource supports calling CreateFeature() on layers in a non sequential way.

The #define macro forms of the capability names should be used in preference to the strings themselves to avoid misspelling.

This function is the same as the C++ method GDALDataset::TestCapability()

Since
  GDAL 2.0

Parameters

  hDS | the dataset handle.
  pszCap | the capability to test.

Returns
  TRUE if capability available otherwise FALSE.

## ◆ GDALDatasetUpdateFieldDomain()

bool GDALDatasetUpdateFieldDomain | ( | GDALDatasetH | hDS,
|  | OGRFieldDomainH | hFieldDomain,
|  | char ** | ppszFailureReason
| ) |  |

Updates an existing field domain by replacing its definition.

The existing field domain with matching name will be replaced.

Only a few drivers will support this operation, and some of them might only support it only for some types of field domains. At the time of writing (GDAL 3.5), only the Memory driver supports this operation. A dataset having at least some support for this operation should report the ODsCUpdateFieldDomain dataset capability.

Anticipated failures will not be emitted through the CPLError() infrastructure, but will be reported in the failureReason output parameter.

Parameters

  hDS | Dataset handle.
  hFieldDomain | The domain definition. Contrary to the C++ version, the passed object is copied.
  ppszFailureReason | Output parameter. Will contain an error message if an error occurs (*ppszFailureReason to be freed with CPLFree). May be NULL.

Returns
  true in case of success.

Since
  GDAL 3.5

## ◆ GDALDatasetUpdateRelationship()

bool GDALDatasetUpdateRelationship | ( | GDALDatasetH | hDS,
|  | GDALRelationshipH | hRelationship,
|  | char ** | ppszFailureReason
| ) |  |

Updates an existing relationship by replacing its definition.

The existing relationship with matching name will be replaced.

Only a few drivers will support this operation, and some of them might only support it only for some types of relationships. A dataset having at least some support for this operation should report the GDsCUpdateRelationship dataset capability.

Anticipated failures will not be emitted through the CPLError() infrastructure, but will be reported in the failureReason output parameter.

Parameters

  hDS | Dataset handle.
  hRelationship | The relationship definition. Contrary to the C++ version, the passed object is copied.
  ppszFailureReason | Output parameter. Will contain an error message if an error occurs (*ppszFailureReason to be freed with CPLFree). May be NULL.

Returns
  true in case of success.

Since
  GDAL 3.5

## ◆ GDALDataTypeIsComplex()

int GDALDataTypeIsComplex | ( | GDALDataType | eDataType | ) |

Is data type complex?

Returns
  TRUE if the passed type is complex (one of GDT_CInt16, GDT_CInt32, GDT_CFloat32 or GDT_CFloat64), that is it consists of a real and imaginary component.

## ◆ GDALDataTypeIsConversionLossy()

int GDALDataTypeIsConversionLossy | ( | GDALDataType | eTypeFrom,
|  | GDALDataType | eTypeTo
| ) |  |

Is conversion from eTypeFrom to eTypeTo potentially lossy.

Parameters

  eTypeFrom | input datatype
  eTypeTo | output datatype

Returns
  TRUE if conversion from eTypeFrom to eTypeTo potentially lossy.

Since
  GDAL 2.3

## ◆ GDALDataTypeIsFloating()

int GDALDataTypeIsFloating | ( | GDALDataType | eDataType | ) |

Is data type floating? (might be complex)

Returns
  TRUE if the passed type is floating (one of GDT_Float32, GDT_Float64, GDT_CFloat32, GDT_CFloat64)

Since
  GDAL 2.3

## ◆ GDALDataTypeIsInteger()

int GDALDataTypeIsInteger | ( | GDALDataType | eDataType | ) |

Is data type integer? (might be complex)

Returns
  TRUE if the passed type is integer (one of GDT_Byte, GDT_Int16, GDT_UInt16, GDT_Int32, GDT_UInt32, GDT_CInt16, GDT_CInt32).

Since
  GDAL 2.3

## ◆ GDALDataTypeIsSigned()

int GDALDataTypeIsSigned | ( | GDALDataType | eDataType | ) |

Is data type signed?

Returns
  TRUE if the passed type is signed.

Since
  GDAL 2.3

## ◆ GDALDataTypeUnion()

GDALDataType GDALDataTypeUnion | ( | GDALDataType | eType1,
|  | GDALDataType | eType2
| ) |  |

Return the smallest data type that can fully express both input data types.

Parameters

  eType1 | first data type.
  eType2 | second data type.

Returns
  a data type able to express eType1 and eType2.

## ◆ GDALDataTypeUnionWithValue()

GDALDataType GDALDataTypeUnionWithValue | ( | GDALDataType | eDT,
|  | double | dfValue,
|  | int | bComplex
| ) |  |

Union a data type with the one found for a value.

Parameters

  eDT | the first data type
  dfValue | the value for which to find a data type and union with eDT
  bComplex | if the value is complex

Returns
  a data type able to express eDT and dfValue.

Since
  GDAL 2.3

## ◆ GDALDecToPackedDMS()

double GDALDecToPackedDMS | ( | double | dfDec | ) |

Convert decimal degrees into packed DMS value (DDDMMMSSS.SS).

See CPLDecToPackedDMS().

## ◆ GDALDeinitGCPs()

void GDALDeinitGCPs | ( | int | nCount,
|  | GDAL_GCP * | psGCP
| ) |  |

De-initialize an array of GCPs (initialized with GDALInitGCPs())

Parameters

  nCount | number of GCPs in psGCP
  psGCP | array of GCPs of size nCount.

## ◆ GDALDeinterleave()

void GDALDeinterleave | ( | const void * | pSourceBuffer,
|  | GDALDataType | eSourceDT,
|  | int | nComponents,
|  | void ** | ppDestBuffer,
|  | GDALDataType | eDestDT,
|  | size_t | nIters
| ) |  |

Copy values from a pixel-interleave buffer to multiple per-component buffers.

In pseudo-code

    for(size_t i = 0; i < nIters; ++i)
        for(int iComp = 0; iComp < nComponents; iComp++ )
            ppDestBuffer[iComp][i] = pSourceBuffer[nComponents * i + iComp]

The implementation is optimized for a few cases, like de-interleaving of 3 or 4-components Byte buffers.

Since
  GDAL 3.6

## ◆ GDALDeleteDataset()

CPLErr GDALDeleteDataset | ( | GDALDriverH | hDriver,
|  | const char * | pszFilename
| ) |  |

Delete named dataset.

See also
  GDALDriver::Delete()

## ◆ GDALDeleteRasterNoDataValue()

CPLErr GDALDeleteRasterNoDataValue | ( | GDALRasterBandH | hBand | ) |

Remove the no data value for this band.

See also
  GDALRasterBand::DeleteNoDataValue()

Since
  GDAL 2.1

## ◆ GDALDereferenceDataset()

int GDALDereferenceDataset | ( | GDALDatasetH | hDataset | ) |

Subtract one from dataset reference count.

See also
  GDALDataset::Dereference()

## ◆ GDALDeregisterDriver()

void GDALDeregisterDriver | ( | GDALDriverH | hDriver | ) |

Deregister the passed driver.

See also
  GDALDriverManager::GetDeregisterDriver()

## ◆ GDALDestroyColorTable()

void GDALDestroyColorTable | ( | GDALColorTableH | hTable | ) |

Destroys a color table.

This function is the same as the C++ method GDALColorTable::~GDALColorTable()

## ◆ GDALDestroyDriver()

void GDALDestroyDriver | ( | GDALDriverH | hDriver | ) |

Destroy a GDALDriver.

This is roughly equivalent to deleting the driver, but is guaranteed to take place in the GDAL heap. It is important this that function not be called on a driver that is registered with the GDALDriverManager.

Parameters

  hDriver | the driver to destroy.

## ◆ GDALDestroyDriverManager()

void GDALDestroyDriverManager | ( | void |  | ) |

Destroy the driver manager.

Incidentally unloads all managed drivers.

NOTE: This function is not thread safe. It should not be called while other threads are actively using GDAL.

## ◆ GDALDestroyRasterAttributeTable()

void GDALDestroyRasterAttributeTable | ( | GDALRasterAttributeTableH | hRAT | ) |

Destroys a RAT.

This function is the same as the C++ method GDALRasterAttributeTable::~GDALRasterAttributeTable()

## ◆ GDALDestroyRelationship()

void GDALDestroyRelationship | ( | GDALRelationshipH | hRelationship | ) |

Destroys a relationship.

This function is the same as the C++ method GDALRelationship::~GDALRelationship()

## ◆ GDALDestroySubdatasetInfo()

void GDALDestroySubdatasetInfo | ( | GDALSubdatasetInfoH | hInfo | ) |

Destroys a GDALSubdatasetInfo object.

Parameters

  hInfo | Pointer to GDALSubdatasetInfo object

Since
  GDAL 3.8

Destroys a GDALSubdatasetInfo object.

This function is the same as the C++ method GDALSubdatasetInfo::~GDALSubdatasetInfo()

## ◆ GDALDimensionGetDirection()

const char * GDALDimensionGetDirection | ( | GDALDimensionH | hDim | ) |

Return dimension direction.

This is the same as the C++ method GDALDimension::GetDirection()

## ◆ GDALDimensionGetFullName()

const char * GDALDimensionGetFullName | ( | GDALDimensionH | hDim | ) |

Return dimension full name.

This is the same as the C++ method GDALDimension::GetFullName()

## ◆ GDALDimensionGetIndexingVariable()

GDALMDArrayH GDALDimensionGetIndexingVariable | ( | GDALDimensionH | hDim | ) |

Return the variable that is used to index the dimension (if there is one).

This is the array, typically one-dimensional, describing the values taken by the dimension.

The returned value should be freed with GDALMDArrayRelease().

This is the same as the C++ method GDALDimension::GetIndexingVariable()

## ◆ GDALDimensionGetName()

const char * GDALDimensionGetName | ( | GDALDimensionH | hDim | ) |

Return dimension name.

This is the same as the C++ method GDALDimension::GetName()

## ◆ GDALDimensionGetSize()

GUInt64 GDALDimensionGetSize | ( | GDALDimensionH | hDim | ) |

Return the size, that is the number of values along the dimension.

This is the same as the C++ method GDALDimension::GetSize()

## ◆ GDALDimensionGetType()

const char * GDALDimensionGetType | ( | GDALDimensionH | hDim | ) |

Return dimension type.

This is the same as the C++ method GDALDimension::GetType()

## ◆ GDALDimensionRelease()

void GDALDimensionRelease | ( | GDALDimensionH | hDim | ) |

Release the GDAL in-memory object associated with a GDALDimension.

Note: when applied on a object coming from a driver, this does not destroy the object in the file, database, etc...

## ◆ GDALDimensionRename()

bool GDALDimensionRename | ( | GDALDimensionH | hDim,
|  | const char * | pszNewName
| ) |  |

Rename the dimension.

This is not implemented by all drivers.

Drivers known to implement it: MEM, netCDF.

This is the same as the C++ method GDALDimension::Rename()

Returns
  true in case of success

Since
  GDAL 3.8

## ◆ GDALDimensionSetIndexingVariable()

int GDALDimensionSetIndexingVariable | ( | GDALDimensionH | hDim,
|  | GDALMDArrayH | hArray
| ) |  |

Set the variable that is used to index the dimension.

This is the array, typically one-dimensional, describing the values taken by the dimension.

This is the same as the C++ method GDALDimension::SetIndexingVariable()

Returns
  TRUE in case of success.

## ◆ GDALDropCache()

CPLErr GDALDropCache | ( | GDALDatasetH | hDS | ) |

Drop all write cached data.

See also
  GDALDataset::DropCache().

Returns
  CE_None in case of success

Since
  3.9

## ◆ GDALDropRasterCache()

CPLErr GDALDropRasterCache | ( | GDALRasterBandH | hBand | ) |

Drop raster data cache.

See also
  GDALRasterBand::DropCache()

Since
  3.9

## ◆ GDALDumpOpenDatasets()

int GDALDumpOpenDatasets | ( | FILE * | fp | ) |

List open datasets.

Dumps a list of all open datasets (shared or not) to the indicated text file (may be stdout or stderr). This function is primarily intended to assist in debugging "dataset leaks" and reference counting issues. The information reported includes the dataset name, referenced count, shared status, driver name, size, and band count.

## ◆ GDALDuplicateGCPs()

GDAL_GCP * GDALDuplicateGCPs | ( | int | nCount,
|  | const GDAL_GCP * | pasGCPList
| ) |  |

Duplicate an array of GCPs.

The return must be freed with GDALDeinitGCPs() followed by CPLFree()

Parameters

  nCount | number of GCPs in psGCP
  pasGCPList | array of GCPs of size nCount.

## ◆ GDALEDTComponentCreate()

GDALEDTComponentH GDALEDTComponentCreate | ( | const char * | pszName,
|  | size_t | nOffset,
|  | GDALExtendedDataTypeH | hType
| ) |  |

Create a new GDALEDTComponent.

The returned value must be freed with GDALEDTComponentRelease().

This is the same as the C++ constructor GDALEDTComponent::GDALEDTComponent().

## ◆ GDALEDTComponentGetName()

const char * GDALEDTComponentGetName | ( | GDALEDTComponentH | hComp | ) |

Return the name.

The returned pointer is valid until hComp is released.

This is the same as the C++ method GDALEDTComponent::GetName().

## ◆ GDALEDTComponentGetOffset()

size_t GDALEDTComponentGetOffset | ( | GDALEDTComponentH | hComp | ) |

Return the offset (in bytes) of the component in the compound data type.

This is the same as the C++ method GDALEDTComponent::GetOffset().

## ◆ GDALEDTComponentGetType()

GDALExtendedDataTypeH GDALEDTComponentGetType | ( | GDALEDTComponentH | hComp | ) |

Return the data type of the component.

This is the same as the C++ method GDALEDTComponent::GetType().

## ◆ GDALEDTComponentRelease()

void GDALEDTComponentRelease | ( | GDALEDTComponentH | hComp | ) |

Release the GDAL in-memory object associated with a GDALEDTComponentH.

Note: when applied on a object coming from a driver, this does not destroy the object in the file, database, etc...

## ◆ GDALEndAsyncReader()

void GDALEndAsyncReader | ( | GDALDatasetH | hDS,
|  | GDALAsyncReaderH | hAsyncReaderH
| ) |  |

End asynchronous request.

This method destroys an asynchronous io request and recovers all resources associated with it.

This method is the same as the C++ method GDALDataset::EndAsyncReader().

Parameters

  hDS | handle to the dataset object.
  hAsyncReaderH | handle returned by GDALBeginAsyncReader()

## ◆ GDALExtendedDataTypeCanConvertTo()

int GDALExtendedDataTypeCanConvertTo | ( | GDALExtendedDataTypeH | hSourceEDT,
|  | GDALExtendedDataTypeH | hTargetEDT
| ) |  |

Return whether this data type can be converted to the other one.

This is the same as the C function GDALExtendedDataType::CanConvertTo()

Parameters

  hSourceEDT | Source data type for the conversion being considered.
  hTargetEDT | Target data type for the conversion being considered.

Returns
  TRUE if hSourceEDT can be convert to hTargetEDT. FALSE otherwise.

## ◆ GDALExtendedDataTypeCreate()

GDALExtendedDataTypeH GDALExtendedDataTypeCreate | ( | GDALDataType | eType | ) |

Return a new GDALExtendedDataType of class GEDTC_NUMERIC.

This is the same as the C++ method GDALExtendedDataType::Create()

The returned handle should be freed with GDALExtendedDataTypeRelease().

Parameters

  eType | Numeric data type.

Returns
  a new GDALExtendedDataTypeH handle, or nullptr.

## ◆ GDALExtendedDataTypeCreateCompound()

GDALExtendedDataTypeH GDALExtendedDataTypeCreateCompound | ( | const char * | pszName,
|  | size_t | nTotalSize,
|  | size_t | nComponents,
|  | const GDALEDTComponentH * | comps
| ) |  |

Return a new GDALExtendedDataType of class GEDTC_COMPOUND.

This is the same as the C++ method GDALExtendedDataType::Create(const std::string&, size_t, std::vector<std::unique_ptr<GDALEDTComponent>>&&)

The returned handle should be freed with GDALExtendedDataTypeRelease().

Parameters

  pszName | Type name.
  nTotalSize | Total size of the type in bytes. Should be large enough to store all components.
  nComponents | Number of components in comps array.
  comps | Components.

Returns
  a new GDALExtendedDataTypeH handle, or nullptr.

## ◆ GDALExtendedDataTypeCreateString()

GDALExtendedDataTypeH GDALExtendedDataTypeCreateString | ( | size_t | nMaxStringLength | ) |

Return a new GDALExtendedDataType of class GEDTC_STRING.

This is the same as the C++ method GDALExtendedDataType::CreateString()

The returned handle should be freed with GDALExtendedDataTypeRelease().

Returns
  a new GDALExtendedDataTypeH handle, or nullptr.

## ◆ GDALExtendedDataTypeCreateStringEx()

GDALExtendedDataTypeH GDALExtendedDataTypeCreateStringEx | ( | size_t | nMaxStringLength,
|  | GDALExtendedDataTypeSubType | eSubType
| ) |  |

Return a new GDALExtendedDataType of class GEDTC_STRING.

This is the same as the C++ method GDALExtendedDataType::CreateString()

The returned handle should be freed with GDALExtendedDataTypeRelease().

Returns
  a new GDALExtendedDataTypeH handle, or nullptr.

Since
  GDAL 3.4

## ◆ GDALExtendedDataTypeEquals()

int GDALExtendedDataTypeEquals | ( | GDALExtendedDataTypeH | hFirstEDT,
|  | GDALExtendedDataTypeH | hSecondEDT
| ) |  |

Return whether this data type is equal to another one.

This is the same as the C++ method GDALExtendedDataType::operator==()

Parameters

  hFirstEDT | First data type.
  hSecondEDT | Second data type.

Returns
  TRUE if they are equal. FALSE otherwise.

## ◆ GDALExtendedDataTypeFreeComponents()

void GDALExtendedDataTypeFreeComponents | ( | GDALEDTComponentH * | components,
|  | size_t | nCount
| ) |  |

Free the return of GDALExtendedDataTypeGetComponents().

Parameters

  components | return value of GDALExtendedDataTypeGetComponents()
  nCount | *pnCount value returned by GDALExtendedDataTypeGetComponents()

## ◆ GDALExtendedDataTypeGetClass()

GDALExtendedDataTypeClass GDALExtendedDataTypeGetClass | ( | GDALExtendedDataTypeH | hEDT | ) |

Return type class.

This is the same as the C++ method GDALExtendedDataType::GetClass()

## ◆ GDALExtendedDataTypeGetComponents()

GDALEDTComponentH * GDALExtendedDataTypeGetComponents | ( | GDALExtendedDataTypeH | hEDT,
|  | size_t * | pnCount
| ) |  |

Return the components of the data type (only valid when GetClass() == GEDTC_COMPOUND)

The returned array and its content must be freed with GDALExtendedDataTypeFreeComponents(). If only the array itself needs to be freed, CPLFree() should be called (and GDALExtendedDataTypeRelease() on individual array members).

This is the same as the C++ method GDALExtendedDataType::GetComponents()

Parameters

  hEDT | Data type
  pnCount | Pointer to the number of values returned. Must NOT be NULL.

Returns
  an array of *pnCount components.

## ◆ GDALExtendedDataTypeGetMaxStringLength()

size_t GDALExtendedDataTypeGetMaxStringLength | ( | GDALExtendedDataTypeH | hEDT | ) |

Return the maximum length of a string in bytes.

0 indicates unknown/unlimited string.

This is the same as the C++ method GDALExtendedDataType::GetMaxStringLength()

## ◆ GDALExtendedDataTypeGetName()

const char * GDALExtendedDataTypeGetName | ( | GDALExtendedDataTypeH | hEDT | ) |

Return type name.

This is the same as the C++ method GDALExtendedDataType::GetName()

## ◆ GDALExtendedDataTypeGetNumericDataType()

GDALDataType GDALExtendedDataTypeGetNumericDataType | ( | GDALExtendedDataTypeH | hEDT | ) |

Return numeric data type (only valid when GetClass() == GEDTC_NUMERIC)

This is the same as the C++ method GDALExtendedDataType::GetNumericDataType()

## ◆ GDALExtendedDataTypeGetSize()

size_t GDALExtendedDataTypeGetSize | ( | GDALExtendedDataTypeH | hEDT | ) |

Return data type size in bytes.

This is the same as the C++ method GDALExtendedDataType::GetSize()

## ◆ GDALExtendedDataTypeGetSubType()

GDALExtendedDataTypeSubType GDALExtendedDataTypeGetSubType | ( | GDALExtendedDataTypeH | hEDT | ) |

Return the subtype of a type.

This is the same as the C++ method GDALExtendedDataType::GetSubType()

Parameters

  hEDT | Data type.

Returns
  subtype.

Since
  3.4

## ◆ GDALExtendedDataTypeRelease()

void GDALExtendedDataTypeRelease | ( | GDALExtendedDataTypeH | hEDT | ) |

Release the GDAL in-memory object associated with a GDALExtendedDataTypeH.

Note: when applied on a object coming from a driver, this does not destroy the object in the file, database, etc...

## ◆ GDALExtractRPCInfoV2()

int GDALExtractRPCInfoV2 | ( | CSLConstList | papszMD,
|  | GDALRPCInfoV2 * | psRPC
| ) |  |

Extract RPC info from metadata, and apply to an RPCInfo structure.

The inverse of this function is RPCInfoV2ToMD() in alg/gdal_rpc.cpp

Parameters

  papszMD | Dictionary of metadata representing RPC
  psRPC | (output) Pointer to structure to hold the RPC values.

Returns
  TRUE in case of success. FALSE in case of failure.

## ◆ GDALFillRaster()

CPLErr GDALFillRaster | ( | GDALRasterBandH | hBand,
|  | double | dfRealValue,
|  | double | dfImaginaryValue
| ) |  |

Fill this band with a constant value.

See also
  GDALRasterBand::Fill()

## ◆ GDALFindDataType()

GDALDataType GDALFindDataType | ( | int | nBits,
|  | int | bSigned,
|  | int | bFloating,
|  | int | bComplex
| ) |  |

Finds the smallest data type able to support the given requirements.

Parameters

  nBits | number of bits necessary
  bSigned | if negative values are necessary
  bFloating | if non-integer values necessary
  bComplex | if complex values are necessary

Returns
  a best fit GDALDataType for supporting the requirements

Since
  GDAL 2.3

## ◆ GDALFindDataTypeForValue()

GDALDataType GDALFindDataTypeForValue | ( | double | dValue,
|  | int | bComplex
| ) |  |

Finds the smallest data type able to support the provided value.

Parameters

  dValue | value to support
  bComplex | is the value complex

Returns
  a best fit GDALDataType for supporting the value

Since
  GDAL 2.3

## ◆ GDALFlushCache()

CPLErr GDALFlushCache | ( | GDALDatasetH | hDS | ) |

Flush all write cached data to disk.

See also
  GDALDataset::FlushCache().

Returns
  CE_None in case of success (note: return value added in GDAL 3.7)

## ◆ GDALFlushCacheBlock()

int GDALFlushCacheBlock | ( | void |  | ) |

Try to flush one cached raster block.

This function will search the first unlocked raster block and will flush it to release the associated memory.

Returns
  TRUE if one block was flushed, FALSE if there are no cached blocks or if they are currently locked.

## ◆ GDALFlushRasterCache()

CPLErr GDALFlushRasterCache | ( | GDALRasterBandH | hBand | ) |

Flush raster data cache.

See also
  GDALRasterBand::FlushCache()

## ◆ GDALGCPsToGeoTransform()

int GDALGCPsToGeoTransform | ( | int | nGCPCount,
|  | const GDAL_GCP * | pasGCPs,
|  | double * | padfGeoTransform,
|  | int | bApproxOK
| ) |  |

Generate Geotransform from GCPs.

Given a set of GCPs perform first order fit as a geotransform.

Due to imprecision in the calculations the fit algorithm will often return non-zero rotational coefficients even if given perfectly non-rotated inputs. A special case has been implemented for corner corner coordinates given in TL, TR, BR, BL order. So when using this to get a geotransform from 4 corner coordinates, pass them in this order.

Starting with GDAL 2.2.2, if bApproxOK = FALSE, the GDAL_GCPS_TO_GEOTRANSFORM_APPROX_OK configuration option will be read. If set to YES, then bApproxOK will be overridden with TRUE. Starting with GDAL 2.2.2, when exact fit is asked, the GDAL_GCPS_TO_GEOTRANSFORM_APPROX_THRESHOLD configuration option can be set to give the maximum error threshold in pixel. The default is 0.25.

Parameters

  nGCPCount | the number of GCPs being passed in.
  pasGCPs | the list of GCP structures.
  padfGeoTransform | the six double array in which the affine geotransformation will be returned.
  bApproxOK | If FALSE the function will fail if the geotransform is not essentially an exact fit (within 0.25 pixel) for all GCPs.

Returns
  TRUE on success or FALSE if there aren't enough points to prepare a geotransform, the pointers are ill-determined or if bApproxOK is FALSE and the fit is poor.

## ◆ GDALGeneralCmdLineProcessor()

int GDALGeneralCmdLineProcessor | ( | int | nArgc,
|  | char *** | ppapszArgv,
|  | int | nOptions
| ) |  |

General utility option processing.

This function is intended to provide a variety of generic commandline options for all GDAL commandline utilities. It takes care of the following commandline options:

–version: report version of GDAL in use. –build: report build info about GDAL in use. –license: report GDAL license info. –formats: report all format drivers configured. –format [format]: report details of one format driver. –optfile filename: expand an option file into the argument list. –config key value: set system configuration option. –config key=value: set system configuration option (since GDAL 3.9) –debug [on/off/value]: set debug level. –mempreload dir: preload directory contents into /vsimem –pause: Pause for user input (allows time to attach debugger) –locale [locale]: Install a locale using setlocale() (debugging) –help-general: report detailed help on general options.

The argument array is replaced "in place" and should be freed with CSLDestroy() when no longer needed. The typical usage looks something like the following. Note that the formats should be registered so that the –formats and –format options will work properly.

int main( int argc, char ** argv ) { GDALAllRegister();

argc = GDALGeneralCmdLineProcessor( argc, &argv, 0 ); if( argc < 1 ) exit( -argc );

Parameters

  nArgc | number of values in the argument list.
  ppapszArgv | pointer to the argument list array (will be updated in place).
  nOptions | a or-able combination of GDAL_OF_RASTER and GDAL_OF_VECTOR to determine which drivers should be displayed by –formats. If set to 0, GDAL_OF_RASTER is assumed.

Returns
  updated nArgc argument count. Return of 0 requests terminate without error, return of -1 requests exit with error code.

## ◆ GDALGetAccess()

int GDALGetAccess | ( | GDALDatasetH | hDS | ) |

Return access flag.

See also
  GDALDataset::GetAccess()

## ◆ GDALGetActualBlockSize()

CPLErr GDALGetActualBlockSize | ( | GDALRasterBandH | hBand,
|  | int | nXBlockOff,
|  | int | nYBlockOff,
|  | int * | pnXValid,
|  | int * | pnYValid
| ) |  |

Retrieve the actual block size for a given block offset.

See also
  GDALRasterBand::GetActualBlockSize()

## ◆ GDALGetAsyncStatusTypeByName()

GDALAsyncStatusType GDALGetAsyncStatusTypeByName | ( | const char * | pszName | ) |

Get AsyncStatusType by symbolic name.

Returns a data type corresponding to the given symbolic name. This function is opposite to the GDALGetAsyncStatusTypeName().

Parameters

  pszName | string containing the symbolic name of the type.

Returns
  GDAL AsyncStatus type.

## ◆ GDALGetAsyncStatusTypeName()

const char * GDALGetAsyncStatusTypeName | ( | GDALAsyncStatusType | eAsyncStatusType | ) |

Get name of AsyncStatus data type.

Returns a symbolic name for the AsyncStatus data type. This is essentially the enumerated item name with the GARIO_ prefix removed. So GARIO_COMPLETE returns "COMPLETE". The returned strings are static strings and should not be modified or freed by the application. These strings are useful for reporting datatypes in debug statements, errors and other user output.

Parameters

  eAsyncStatusType | type to get name of.

Returns
  string corresponding to type.

## ◆ GDALGetBandDataset()

GDALDatasetH GDALGetBandDataset | ( | GDALRasterBandH | hBand | ) |

Fetch the owning dataset handle.

See also
  GDALRasterBand::GetDataset()

## ◆ GDALGetBandNumber()

int GDALGetBandNumber | ( | GDALRasterBandH | hBand | ) |

Fetch the band number.

See also
  GDALRasterBand::GetBand()

## ◆ GDALGetBlockSize()

void GDALGetBlockSize | ( | GDALRasterBandH | hBand,
|  | int * | pnXSize,
|  | int * | pnYSize
| ) |  |

Fetch the "natural" block size of this band.

See also
  GDALRasterBand::GetBlockSize()

## ◆ GDALGetCacheMax()

int GDALGetCacheMax | ( | void |  | ) |

Get maximum cache memory.

Gets the maximum amount of memory available to the GDALRasterBlock caching system for caching GDAL read/write imagery.

The first type this function is called, it will read the GDAL_CACHEMAX configuration option to initialize the maximum cache memory. Starting with GDAL 2.1, the value can be expressed as x% of the usable physical RAM (which may potentially be used by other processes). Otherwise it is expected to be a value in MB.

This function cannot return a value higher than 2 GB. Use GDALGetCacheMax64() to get a non-truncated value.

Returns
  maximum in bytes.

## ◆ GDALGetCacheMax64()

GIntBig GDALGetCacheMax64 | ( | void |  | ) |

Get maximum cache memory.

Gets the maximum amount of memory available to the GDALRasterBlock caching system for caching GDAL read/write imagery.

The first type this function is called, it will read the GDAL_CACHEMAX configuration option to initialize the maximum cache memory. Starting with GDAL 2.1, the value can be expressed as x% of the usable physical RAM (which may potentially be used by other processes). Otherwise it is expected to be a value in MB.

Returns
  maximum in bytes.

Since
  GDAL 1.8.0

## ◆ GDALGetCacheUsed()

int GDALGetCacheUsed | ( | void |  | ) |

Get cache memory used.

Returns
  the number of bytes of memory currently in use by the GDALRasterBlock memory caching.

## ◆ GDALGetCacheUsed64()

GIntBig GDALGetCacheUsed64 | ( | void |  | ) |

Get cache memory used.

Returns
  the number of bytes of memory currently in use by the GDALRasterBlock memory caching.

Since
  GDAL 1.8.0

## ◆ GDALGetColorEntry()

const GDALColorEntry * GDALGetColorEntry | ( | GDALColorTableH | hTable,
|  | int | i
| ) |  |

Fetch a color entry from table.

This function is the same as the C++ method GDALColorTable::GetColorEntry()

## ◆ GDALGetColorEntryAsRGB()

int GDALGetColorEntryAsRGB | ( | GDALColorTableH | hTable,
|  | int | i,
|  | GDALColorEntry * | poEntry
| ) |  |

Fetch a table entry in RGB format.

This function is the same as the C++ method GDALColorTable::GetColorEntryAsRGB().

## ◆ GDALGetColorEntryCount()

int GDALGetColorEntryCount | ( | GDALColorTableH | hTable | ) |

Get number of color entries in table.

This function is the same as the C++ method GDALColorTable::GetColorEntryCount()

## ◆ GDALGetColorInterpretationByName()

GDALColorInterp GDALGetColorInterpretationByName | ( | const char * | pszName | ) |

Get color interpretation by symbolic name.

Returns a color interpretation corresponding to the given symbolic name. This function is opposite to the GDALGetColorInterpretationName().

Parameters

  pszName | string containing the symbolic name of the color interpretation.

Returns
  GDAL color interpretation.

Since
  GDAL 1.7.0

## ◆ GDALGetColorInterpretationName()

const char * GDALGetColorInterpretationName | ( | GDALColorInterp | eInterp | ) |

Get name of color interpretation.

Returns a symbolic name for the color interpretation. This is derived from the enumerated item name with the GCI_ prefix removed, but there are some variations. So GCI_GrayIndex returns "Gray" and GCI_RedBand returns "Red". The returned strings are static strings and should not be modified or freed by the application.

Parameters

  eInterp | color interpretation to get name of.

Returns
  string corresponding to color interpretation or NULL pointer if invalid enumerator given.

## ◆ GDALGetDataCoverageStatus()

int GDALGetDataCoverageStatus | ( | GDALRasterBandH | hBand,
|  | int | nXOff,
|  | int | nYOff,
|  | int | nXSize,
|  | int | nYSize,
|  | int | nMaskFlagStop,
|  | double * | pdfDataPct
| ) |  |

Get the coverage status of a sub-window of the raster.

Returns whether a sub-window of the raster contains only data, only empty blocks or a mix of both. This function can be used to determine quickly if it is worth issuing RasterIO / ReadBlock requests in datasets that may be sparse.

Empty blocks are blocks that are generally not physically present in the file, and when read through GDAL, contain only pixels whose value is the nodata value when it is set, or whose value is 0 when the nodata value is not set.

The query is done in an efficient way without reading the actual pixel values. If not possible, or not implemented at all by the driver, GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED | GDAL_DATA_COVERAGE_STATUS_DATA will be returned.

The values that can be returned by the function are the following, potentially combined with the binary or operator :

- GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED : the driver does not implement GetDataCoverageStatus(). This flag should be returned together with GDAL_DATA_COVERAGE_STATUS_DATA.
- GDAL_DATA_COVERAGE_STATUS_DATA: There is (potentially) data in the queried window.
- GDAL_DATA_COVERAGE_STATUS_EMPTY: There is nodata in the queried window. This is typically identified by the concept of missing block in formats that supports it.

Note that GDAL_DATA_COVERAGE_STATUS_DATA might have false positives and should be interpreted more as hint of potential presence of data. For example if a GeoTIFF file is created with blocks filled with zeroes (or set to the nodata value), instead of using the missing block mechanism, GDAL_DATA_COVERAGE_STATUS_DATA will be returned. On the contrary, GDAL_DATA_COVERAGE_STATUS_EMPTY should have no false positives.

The nMaskFlagStop should be generally set to 0. It can be set to a binary-or'ed mask of the above mentioned values to enable a quick exiting of the function as soon as the computed mask matches the nMaskFlagStop. For example, you can issue a request on the whole raster with nMaskFlagStop = GDAL_DATA_COVERAGE_STATUS_EMPTY. As soon as one missing block is encountered, the function will exit, so that you can potentially refine the requested area to find which particular region(s) have missing blocks.

See also
  GDALRasterBand::GetDataCoverageStatus()

Parameters

  hBand | raster band
  nXOff | The pixel offset to the top left corner of the region of the band to be queried. This would be zero to start from the left side.
  nYOff | The line offset to the top left corner of the region of the band to be queried. This would be zero to start from the top.
  nXSize | The width of the region of the band to be queried in pixels.
  nYSize | The height of the region of the band to be queried in lines.
  nMaskFlagStop | 0, or a binary-or'ed mask of possible values GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED, GDAL_DATA_COVERAGE_STATUS_DATA and GDAL_DATA_COVERAGE_STATUS_EMPTY. As soon as the computation of the coverage matches the mask, the computation will be stopped. *pdfDataPct will not be valid in that case.
  pdfDataPct | Optional output parameter whose pointed value will be set to the (approximate) percentage in [0,100] of pixels in the queried sub-window that have valid values. The implementation might not always be able to compute it, in which case it will be set to a negative value.

Returns
  a binary-or'ed combination of possible values GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED, GDAL_DATA_COVERAGE_STATUS_DATA and GDAL_DATA_COVERAGE_STATUS_EMPTY

Note
  Added in GDAL 2.2

## ◆ GDALGetDatasetDriver()

GDALDriverH GDALGetDatasetDriver | ( | GDALDatasetH | hDataset | ) |

Fetch the driver to which this dataset relates.

See also
  GDALDataset::GetDriver()

## ◆ GDALGetDataTypeByName()

GDALDataType GDALGetDataTypeByName | ( | const char * | pszName | ) |

Get data type by symbolic name.

Returns a data type corresponding to the given symbolic name. This function is opposite to the GDALGetDataTypeName().

Parameters

  pszName | string containing the symbolic name of the type.

Returns
  GDAL data type.

## ◆ GDALGetDataTypeName()

const char * GDALGetDataTypeName | ( | GDALDataType | eDataType | ) |

Get name of data type.

Returns a symbolic name for the data type. This is essentially the the enumerated item name with the GDT_ prefix removed. So GDT_Byte returns "Byte". The returned strings are static strings and should not be modified or freed by the application. These strings are useful for reporting datatypes in debug statements, errors and other user output.

Parameters

  eDataType | type to get name of.

Returns
  string corresponding to existing data type or NULL pointer if invalid type given.

## ◆ GDALGetDataTypeSize()

int GDALGetDataTypeSize | ( | GDALDataType | eDataType | ) |

Get data type size in bits.

Deprecated.

Returns the size of a GDT_* type in bits, not bytes!

Use GDALGetDataTypeSizeBytes() for bytes. Use GDALGetDataTypeSizeBits() for bits.

Parameters

  eDataType | type, such as GDT_Byte.

Returns
  the number of bits or zero if it is not recognised.

## ◆ GDALGetDataTypeSizeBits()

int GDALGetDataTypeSizeBits | ( | GDALDataType | eDataType | ) |

Get data type size in bits.

Returns the size of a GDT_* type in bits, not bytes! Use GDALGetDataTypeSizeBytes() for bytes.

Parameters

  eDataType | type, such as GDT_Byte.

Returns
  the number of bits or zero if it is not recognised.

## ◆ GDALGetDataTypeSizeBytes()

int GDALGetDataTypeSizeBytes | ( | GDALDataType | eDataType | ) |

Get data type size in bytes.

Returns the size of a GDT_* type in bytes. In contrast, GDALGetDataTypeSize() returns the size in bits.

Parameters

  eDataType | type, such as GDT_Byte.

Returns
  the number of bytes or zero if it is not recognised.

## ◆ GDALGetDefaultHistogram()

CPLErr GDALGetDefaultHistogram | ( | GDALRasterBandH | hBand,
|  | double * | pdfMin,
|  | double * | pdfMax,
|  | int * | pnBuckets,
|  | int ** | ppanHistogram,
|  | int | bForce,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData
| ) |  |

Fetch default raster histogram.

Use GDALGetRasterHistogramEx() instead to get correct counts for values exceeding 2 billion.

See also
  GDALRasterBand::GDALGetDefaultHistogram()
  GDALGetRasterHistogramEx()

## ◆ GDALGetDefaultHistogramEx()

CPLErr GDALGetDefaultHistogramEx | ( | GDALRasterBandH | hBand,
|  | double * | pdfMin,
|  | double * | pdfMax,
|  | int * | pnBuckets,
|  | GUIntBig ** | ppanHistogram,
|  | int | bForce,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData
| ) |  |

Fetch default raster histogram.

See also
  GDALRasterBand::GetDefaultHistogram()

Since
  GDAL 2.0

## ◆ GDALGetDefaultRAT()

GDALRasterAttributeTableH GDALGetDefaultRAT | ( | GDALRasterBandH | hBand | ) |

Fetch default Raster Attribute Table.

See also
  GDALRasterBand::GetDefaultRAT()

## ◆ GDALGetDescription()

const char * GDALGetDescription | ( | GDALMajorObjectH | hObject | ) |

Fetch object description.

See also
  GDALMajorObject::GetDescription()

## ◆ GDALGetDriver()

GDALDriverH GDALGetDriver | ( | int | iDriver | ) |

Fetch driver by index.

See also
  GDALDriverManager::GetDriver()

## ◆ GDALGetDriverByName()

GDALDriverH GDALGetDriverByName | ( | const char * | pszName | ) |

Fetch a driver based on the short name.

See also
  GDALDriverManager::GetDriverByName()

## ◆ GDALGetDriverCount()

int GDALGetDriverCount | ( | void |  | ) |

Fetch the number of registered drivers.

See also
  GDALDriverManager::GetDriverCount()

## ◆ GDALGetDriverCreationOptionList()

const char * GDALGetDriverCreationOptionList | ( | GDALDriverH | hDriver | ) |

Return the list of creation options of the driver.

Return the list of creation options of the driver used by Create() and CreateCopy() as an XML string

Parameters

  hDriver | the handle of the driver

Returns
  an XML string that describes the list of creation options or empty string. The returned string should not be freed and is owned by the driver.

## ◆ GDALGetDriverHelpTopic()

const char * GDALGetDriverHelpTopic | ( | GDALDriverH | hDriver | ) |

Return the URL to the help that describes the driver.

That URL is relative to the GDAL documentation directory.

For the GeoTIFF driver, this is "frmt_gtiff.html"

Parameters

  hDriver | the handle of the driver

Returns
  the URL to the help that describes the driver or NULL. The returned string should not be freed and is owned by the driver.

## ◆ GDALGetDriverLongName()

const char * GDALGetDriverLongName | ( | GDALDriverH | hDriver | ) |

Return the long name of a driver.

For the GeoTIFF driver, this is "GeoTIFF"

Parameters

  hDriver | the handle of the driver

Returns
  the long name of the driver or empty string. The returned string should not be freed and is owned by the driver.

## ◆ GDALGetDriverShortName()

const char * GDALGetDriverShortName | ( | GDALDriverH | hDriver | ) |

Return the short name of a driver.

This is the string that can be passed to the GDALGetDriverByName() function.

For the GeoTIFF driver, this is "GTiff"

Parameters

  hDriver | the handle of the driver

Returns
  the short name of the driver. The returned string should not be freed and is owned by the driver.

## ◆ GDALGetFileList()

char ** GDALGetFileList | ( | GDALDatasetH | hDS | ) |

Fetch files forming dataset.

See also
  GDALDataset::GetFileList()

## ◆ GDALGetGCPCount()

int GDALGetGCPCount | ( | GDALDatasetH | hDS | ) |

Get number of GCPs.

See also
  GDALDataset::GetGCPCount()

## ◆ GDALGetGCPProjection()

const char * GDALGetGCPProjection | ( | GDALDatasetH | hDS | ) |

Get output projection for GCPs.

See also
  GDALDataset::GetGCPProjection()

## ◆ GDALGetGCPs()

const GDAL_GCP * GDALGetGCPs | ( | GDALDatasetH | hDS | ) |

Fetch GCPs.

See also
  GDALDataset::GetGCPs()

## ◆ GDALGetGCPSpatialRef()

OGRSpatialReferenceH GDALGetGCPSpatialRef | ( | GDALDatasetH | hDS | ) |

Get output spatial reference system for GCPs.

Since
  GDAL 3.0

See also
  GDALDataset::GetGCPSpatialRef()

## ◆ GDALGetGeoTransform()

CPLErr GDALGetGeoTransform | ( | GDALDatasetH | hDS,
|  | double * | padfTransform
| ) |  |

Fetch the affine transformation coefficients.

See also
  GDALDataset::GetGeoTransform()

## ◆ GDALGetInternalHandle()

void * GDALGetInternalHandle | ( | GDALDatasetH | hDS,
|  | const char * | pszRequest
| ) |  |

Fetch a format specific internally meaningful handle.

See also
  GDALDataset::GetInternalHandle()

## ◆ GDALGetJPEG2000Structure()

CPLXMLNode * GDALGetJPEG2000Structure | ( | const char * | pszFilename,
|  | CSLConstList | papszOptions
| ) |  |

Dump the structure of a JPEG2000 file as a XML tree.

Parameters

  pszFilename | filename.
  papszOptions | NULL terminated list of options, or NULL. Allowed options are BINARY_CONTENT=YES, TEXT_CONTENT=YES, CODESTREAM=YES, ALL=YES, JP2_BOXES=YES, CODESTREAM_MARKERS=list_of_marker_names_comma_separated, STOP_AT_SOD=YES, ALLOW_GET_FILE_SIZE=NO.

Returns
  XML tree (to be freed with CPLDestroyXMLNode()) or NULL in case of error

Since
  GDAL 2.0

## ◆ GDALGetMaskBand()

GDALRasterBandH GDALGetMaskBand | ( | GDALRasterBandH | hBand | ) |

Return the mask band associated with the band.

See also
  GDALRasterBand::GetMaskBand()

## ◆ GDALGetMaskFlags()

int GDALGetMaskFlags | ( | GDALRasterBandH | hBand | ) |

Return the status flags of the mask band associated with the band.

See also
  GDALRasterBand::GetMaskFlags()

## ◆ GDALGetMetadata()

char ** GDALGetMetadata | ( | GDALMajorObjectH | hObject,
|  | const char * | pszDomain
| ) |  |

Fetch metadata.

See also
  GDALMajorObject::GetMetadata()

## ◆ GDALGetMetadataDomainList()

char ** GDALGetMetadataDomainList | ( | GDALMajorObjectH | hObject | ) |

Fetch list of metadata domains.

See also
  GDALMajorObject::GetMetadataDomainList()

Since
  GDAL 1.11

## ◆ GDALGetMetadataItem()

const char * GDALGetMetadataItem | ( | GDALMajorObjectH | hObject,
|  | const char * | pszName,
|  | const char * | pszDomain
| ) |  |

Fetch single metadata item.

See also
  GDALMajorObject::GetMetadataItem()

## ◆ GDALGetNoDataReplacementValue()

double GDALGetNoDataReplacementValue | ( | GDALDataType | dt,
|  | double | dfNoDataValue
| ) |  |

Returns a replacement value for a nodata value or 0 if dfNoDataValue is out of range for the specified data type (dt).

For UInt64 and Int64 data type this function cannot reliably trusted because their nodata values might not always be representable exactly as a double, in particular the maximum absolute value for those types is 2^53.

The replacement value is a value that can be used in a computation whose result would match by accident the nodata value, whereas it is meant to be valid. For example, for a dataset with a nodata value of 0, when averaging -1 and 1, one would get normally a value of 0. The replacement nodata value can then be substituted to that 0 value to still get a valid value, as close as practical to the true value, while being different from the nodata value.

Parameters

  dt | Data type
  dfNoDataValue | The no data value

Since
  GDAL 3.9

## ◆ GDALGetNonComplexDataType()

GDALDataType GDALGetNonComplexDataType | ( | GDALDataType | eDataType | ) |

Return the base data type for the specified input.

If the input data type is complex this function returns the base type i.e. the data type of the real and imaginary parts (non-complex). If the input data type is already non-complex, then it is returned unchanged.

Parameters

  eDataType | type, such as GDT_CFloat32.

Returns
  GDAL data type.

## ◆ GDALGetOpenDatasets()

void GDALGetOpenDatasets | ( | GDALDatasetH ** | ppahDSList,
|  | int * | pnCount
| ) |  |

Fetch all open GDAL dataset handles.

See also
  GDALDataset::GetOpenDatasets()

## ◆ GDALGetOutputDriversForDatasetName()

char ** GDALGetOutputDriversForDatasetName | ( | const char * | pszDestDataset,
|  | int | nFlagRasterVector,
|  | bool | bSingleMatch,
|  | bool | bEmitWarning
| ) |  |

Return a list of driver short names that are likely candidates for the provided output file name.

Parameters

  pszDestDataset | Output dataset name (might not exist).
  nFlagRasterVector | GDAL_OF_RASTER, GDAL_OF_VECTOR or binary-or'ed combination of both
  bSingleMatch | Whether a single match is desired, that is to say the returned list will contain at most one item, which will be the first driver in the order they are registered to match the output dataset name. Note that in this mode, if nFlagRasterVector==GDAL_OF_RASTER and pszDestDataset has no extension, GTiff will be selected.
  bEmitWarning | Whether a warning should be emitted when bSingleMatch is true and there are more than 2 candidates.

Returns
  NULL terminated list of driver short names. To be freed with CSLDestroy()

Since
  3.9

## ◆ GDALGetOverview()

GDALRasterBandH GDALGetOverview | ( | GDALRasterBandH | hBand,
|  | int | i
| ) |  |

Fetch overview raster band object.

See also
  GDALRasterBand::GetOverview()

## ◆ GDALGetOverviewCount()

int GDALGetOverviewCount | ( | GDALRasterBandH | hBand | ) |

Return the number of overview layers available.

See also
  GDALRasterBand::GetOverviewCount()

## ◆ GDALGetPaletteInterpretation()

GDALPaletteInterp GDALGetPaletteInterpretation | ( | GDALColorTableH | hTable | ) |

Fetch palette interpretation.

This function is the same as the C++ method GDALColorTable::GetPaletteInterpretation()

## ◆ GDALGetPaletteInterpretationName()

const char * GDALGetPaletteInterpretationName | ( | GDALPaletteInterp | eInterp | ) |

Get name of palette interpretation.

Returns a symbolic name for the palette interpretation. This is the the enumerated item name with the GPI_ prefix removed. So GPI_Gray returns "Gray". The returned strings are static strings and should not be modified or freed by the application.

Parameters

  eInterp | palette interpretation to get name of.

Returns
  string corresponding to palette interpretation.

## ◆ GDALGetProjectionRef()

const char * GDALGetProjectionRef | ( | GDALDatasetH | hDS | ) |

Fetch the projection definition string for this dataset.

See also
  GDALDataset::GetProjectionRef()

## ◆ GDALGetRandomRasterSample()

int GDALGetRandomRasterSample | ( | GDALRasterBandH | hBand,
|  | int | nSamples,
|  | float * | pafSampleBuf
| ) |  |

Undocumented.

Parameters

  hBand | undocumented.
  nSamples | undocumented.
  pafSampleBuf | undocumented.

Returns
  undocumented

## ◆ GDALGetRasterAccess()

GDALAccess GDALGetRasterAccess | ( | GDALRasterBandH | hBand | ) |

Find out if we have update permission for this band.

See also
  GDALRasterBand::GetAccess()

## ◆ GDALGetRasterBand()

GDALRasterBandH GDALGetRasterBand | ( | GDALDatasetH | hDS,
|  | int | nBandId
| ) |  |

Fetch a band object for a dataset.

See also
  GDALDataset::GetRasterBand().

## ◆ GDALGetRasterBandXSize()

int GDALGetRasterBandXSize | ( | GDALRasterBandH | hBand | ) |

Fetch XSize of raster.

See also
  GDALRasterBand::GetXSize()

## ◆ GDALGetRasterBandYSize()

int GDALGetRasterBandYSize | ( | GDALRasterBandH | hBand | ) |

Fetch YSize of raster.

See also
  GDALRasterBand::GetYSize()

## ◆ GDALGetRasterCategoryNames()

char ** GDALGetRasterCategoryNames | ( | GDALRasterBandH | hBand | ) |

Fetch the list of category names for this raster.

See also
  GDALRasterBand::GetCategoryNames()

## ◆ GDALGetRasterColorInterpretation()

GDALColorInterp GDALGetRasterColorInterpretation | ( | GDALRasterBandH | hBand | ) |

How should this band be interpreted as color?

See also
  GDALRasterBand::GetColorInterpretation()

## ◆ GDALGetRasterColorTable()

GDALColorTableH GDALGetRasterColorTable | ( | GDALRasterBandH | hBand | ) |

Fetch the color table associated with band.

See also
  GDALRasterBand::GetColorTable()

## ◆ GDALGetRasterCount()

int GDALGetRasterCount | ( | GDALDatasetH | hDS | ) |

Fetch the number of raster bands on this dataset.

See also
  GDALDataset::GetRasterCount().

## ◆ GDALGetRasterDataType()

GDALDataType GDALGetRasterDataType | ( | GDALRasterBandH | hBand | ) |

Fetch the pixel data type for this band.

See also
  GDALRasterBand::GetRasterDataType()

## ◆ GDALGetRasterHistogram()

CPLErr GDALGetRasterHistogram | ( | GDALRasterBandH | hBand,
|  | double | dfMin,
|  | double | dfMax,
|  | int | nBuckets,
|  | int * | panHistogram,
|  | int | bIncludeOutOfRange,
|  | int | bApproxOK,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData
| ) |  |

Compute raster histogram.

Use GDALGetRasterHistogramEx() instead to get correct counts for values exceeding 2 billion.

See also
  GDALRasterBand::GetHistogram()
  GDALGetRasterHistogramEx()

## ◆ GDALGetRasterHistogramEx()

CPLErr GDALGetRasterHistogramEx | ( | GDALRasterBandH | hBand,
|  | double | dfMin,
|  | double | dfMax,
|  | int | nBuckets,
|  | GUIntBig * | panHistogram,
|  | int | bIncludeOutOfRange,
|  | int | bApproxOK,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData
| ) |  |

Compute raster histogram.

See also
  GDALRasterBand::GetHistogram()

Since
  GDAL 2.0

## ◆ GDALGetRasterMaximum()

double GDALGetRasterMaximum | ( | GDALRasterBandH | hBand,
|  | int * | pbSuccess
| ) |  |

Fetch the maximum value for this band.

See also
  GDALRasterBand::GetMaximum()

## ◆ GDALGetRasterMinimum()

double GDALGetRasterMinimum | ( | GDALRasterBandH | hBand,
|  | int * | pbSuccess
| ) |  |

Fetch the minimum value for this band.

See also
  GDALRasterBand::GetMinimum()

## ◆ GDALGetRasterNoDataValue()

double GDALGetRasterNoDataValue | ( | GDALRasterBandH | hBand,
|  | int * | pbSuccess
| ) |  |

Fetch the no data value for this band.

See also
  GDALRasterBand::GetNoDataValue()

## ◆ GDALGetRasterNoDataValueAsInt64()

int64_t GDALGetRasterNoDataValueAsInt64 | ( | GDALRasterBandH | hBand,
|  | int * | pbSuccess
| ) |  |

Fetch the no data value for this band.

This function should ONLY be called on rasters whose data type is GDT_Int64.

See also
  GDALRasterBand::GetNoDataValueAsInt64()

Since
  GDAL 3.5

## ◆ GDALGetRasterNoDataValueAsUInt64()

uint64_t GDALGetRasterNoDataValueAsUInt64 | ( | GDALRasterBandH | hBand,
|  | int * | pbSuccess
| ) |  |

Fetch the no data value for this band.

This function should ONLY be called on rasters whose data type is GDT_UInt64.

See also
  GDALRasterBand::GetNoDataValueAsUInt64()

Since
  GDAL 3.5

## ◆ GDALGetRasterOffset()

double GDALGetRasterOffset | ( | GDALRasterBandH | hBand,
|  | int * | pbSuccess
| ) |  |

Fetch the raster value offset.

See also
  GDALRasterBand::GetOffset()

## ◆ GDALGetRasterSampleOverview()

GDALRasterBandH GDALGetRasterSampleOverview | ( | GDALRasterBandH | hBand,
|  | int | nDesiredSamples
| ) |  |

Fetch best sampling overview.

Use GDALGetRasterSampleOverviewEx() to be able to specify more than 2 billion samples.

See also
  GDALRasterBand::GetRasterSampleOverview()
  GDALGetRasterSampleOverviewEx()

## ◆ GDALGetRasterSampleOverviewEx()

GDALRasterBandH GDALGetRasterSampleOverviewEx | ( | GDALRasterBandH | hBand,
|  | GUIntBig | nDesiredSamples
| ) |  |

Fetch best sampling overview.

See also
  GDALRasterBand::GetRasterSampleOverview()

Since
  GDAL 2.0

## ◆ GDALGetRasterScale()

double GDALGetRasterScale | ( | GDALRasterBandH | hBand,
|  | int * | pbSuccess
| ) |  |

Fetch the raster value scale.

See also
  GDALRasterBand::GetScale()

## ◆ GDALGetRasterStatistics()

CPLErr GDALGetRasterStatistics | ( | GDALRasterBandH | hBand,
|  | int | bApproxOK,
|  | int | bForce,
|  | double * | pdfMin,
|  | double * | pdfMax,
|  | double * | pdfMean,
|  | double * | pdfStdDev
| ) |  |

Fetch image statistics.

See also
  GDALRasterBand::GetStatistics()

## ◆ GDALGetRasterUnitType()

const char * GDALGetRasterUnitType | ( | GDALRasterBandH | hBand | ) |

Return raster unit type.

See also
  GDALRasterBand::GetUnitType()

## ◆ GDALGetRasterXSize()

int GDALGetRasterXSize | ( | GDALDatasetH | hDataset | ) |

Fetch raster width in pixels.

See also
  GDALDataset::GetRasterXSize().

## ◆ GDALGetRasterYSize()

int GDALGetRasterYSize | ( | GDALDatasetH | hDataset | ) |

Fetch raster height in pixels.

See also
  GDALDataset::GetRasterYSize().

## ◆ GDALGetSpatialRef()

OGRSpatialReferenceH GDALGetSpatialRef | ( | GDALDatasetH | hDS | ) |

Fetch the spatial reference for this dataset.

Since
  GDAL 3.0

See also
  GDALDataset::GetSpatialRef()

## ◆ GDALGetSubdatasetInfo()

GDALSubdatasetInfoH GDALGetSubdatasetInfo | ( | const char * | pszFileName | ) |

Returns a new GDALSubdatasetInfo object with methods to extract and manipulate subdataset information.

If the pszFileName argument is not recognized by any driver as a subdataset descriptor, NULL is returned. The returned object must be freed with GDALDestroySubdatasetInfo().

Parameters

  pszFileName | File name with subdataset information

Note
  This method does not check if the subdataset actually exists.

Returns
  Opaque pointer to a GDALSubdatasetInfo object or NULL if no drivers accepted the file name.

Since
  GDAL 3.8

## ◆ GDALGetVirtualMemAuto()

CPLVirtualMem * GDALGetVirtualMemAuto | ( | GDALRasterBandH | hBand,
|  | GDALRWFlag | eRWFlag,
|  | int * | pnPixelSpace,
|  | GIntBig * | pnLineSpace,
|  | CSLConstList | papszOptions
| ) |  |

Create a CPLVirtualMem object from a GDAL raster band object.

See also
  GDALRasterBand::GetVirtualMemAuto()

## ◆ GDALGroupCreateAttribute()

GDALAttributeH GDALGroupCreateAttribute | ( | GDALGroupH | hGroup,
|  | const char * | pszName,
|  | size_t | nDimensions,
|  | const GUInt64 * | panDimensions,
|  | GDALExtendedDataTypeH | hEDT,
|  | CSLConstList | papszOptions
| ) |  |

Create a attribute within a group.

This is the same as the C++ method GDALGroup::CreateAttribute().

Returns
  the attribute, to be freed with GDALAttributeRelease(), or nullptr.

## ◆ GDALGroupCreateDimension()

GDALDimensionH GDALGroupCreateDimension | ( | GDALGroupH | hGroup,
|  | const char * | pszName,
|  | const char * | pszType,
|  | const char * | pszDirection,
|  | GUInt64 | nSize,
|  | CSLConstList | papszOptions
| ) |  |

Create a dimension within a group.

This is the same as the C++ method GDALGroup::CreateDimension().

Returns
  the dimension, to be freed with GDALDimensionRelease(), or nullptr.

## ◆ GDALGroupCreateGroup()

GDALGroupH GDALGroupCreateGroup | ( | GDALGroupH | hGroup,
|  | const char * | pszSubGroupName,
|  | CSLConstList | papszOptions
| ) |  |

Create a sub-group within a group.

This is the same as the C++ method GDALGroup::CreateGroup().

Returns
  the sub-group, to be freed with GDALGroupRelease(), or nullptr.

## ◆ GDALGroupCreateMDArray()

GDALMDArrayH GDALGroupCreateMDArray | ( | GDALGroupH | hGroup,
|  | const char * | pszName,
|  | size_t | nDimensions,
|  | GDALDimensionH * | pahDimensions,
|  | GDALExtendedDataTypeH | hEDT,
|  | CSLConstList | papszOptions
| ) |  |

Create a multidimensional array within a group.

This is the same as the C++ method GDALGroup::CreateMDArray().

Returns
  the array, to be freed with GDALMDArrayRelease(), or nullptr.

## ◆ GDALGroupDeleteAttribute()

bool GDALGroupDeleteAttribute | ( | GDALGroupH | hGroup,
|  | const char * | pszName,
|  | CSLConstList | papszOptions
| ) |  |

Delete an attribute from a group.

After this call, if a previously obtained instance of the deleted object is still alive, no method other than for freeing it should be invoked.

This is the same as the C++ method GDALGroup::DeleteAttribute().

Returns
  true in case of success.

Since
  GDAL 3.8

## ◆ GDALGroupDeleteGroup()

bool GDALGroupDeleteGroup | ( | GDALGroupH | hGroup,
|  | const char * | pszSubGroupName,
|  | CSLConstList | papszOptions
| ) |  |

Delete a sub-group from a group.

After this call, if a previously obtained instance of the deleted object is still alive, no method other than for freeing it should be invoked.

This is the same as the C++ method GDALGroup::DeleteGroup().

Returns
  true in case of success.

Since
  GDAL 3.8

## ◆ GDALGroupDeleteMDArray()

bool GDALGroupDeleteMDArray | ( | GDALGroupH | hGroup,
|  | const char * | pszName,
|  | CSLConstList | papszOptions
| ) |  |

Delete an array from a group.

After this call, if a previously obtained instance of the deleted object is still alive, no method other than for freeing it should be invoked.

This is the same as the C++ method GDALGroup::DeleteMDArray().

Returns
  true in case of success.

Since
  GDAL 3.8

## ◆ GDALGroupGetAttribute()

GDALAttributeH GDALGroupGetAttribute | ( | GDALGroupH | hGroup,
|  | const char * | pszName
| ) |  |

Return an attribute by its name.

This is the same as the C++ method GDALIHasAttribute::GetAttribute()

The returned attribute must be freed with GDALAttributeRelease().

## ◆ GDALGroupGetAttributes()

GDALAttributeH * GDALGroupGetAttributes | ( | GDALGroupH | hGroup,
|  | size_t * | pnCount,
|  | CSLConstList | papszOptions
| ) |  |

Return the list of attributes contained in this group.

The returned array must be freed with GDALReleaseAttributes(). If only the array itself needs to be freed, CPLFree() should be called (and GDALAttributeRelease() on individual array members).

This is the same as the C++ method GDALGroup::GetAttributes().

Parameters

  hGroup | Group.
  pnCount | Pointer to the number of values returned. Must NOT be NULL.
  papszOptions | Driver specific options determining how attributes should be retrieved. Pass nullptr for default behavior.

Returns
  an array of *pnCount attributes.

## ◆ GDALGroupGetDimensions()

GDALDimensionH * GDALGroupGetDimensions | ( | GDALGroupH | hGroup,
|  | size_t * | pnCount,
|  | CSLConstList | papszOptions
| ) |  |

Return the list of dimensions contained in this group and used by its arrays.

The returned array must be freed with GDALReleaseDimensions(). If only the array itself needs to be freed, CPLFree() should be called (and GDALDimensionRelease() on individual array members).

This is the same as the C++ method GDALGroup::GetDimensions().

Parameters

  hGroup | Group.
  pnCount | Pointer to the number of values returned. Must NOT be NULL.
  papszOptions | Driver specific options determining how dimensions should be retrieved. Pass nullptr for default behavior.

Returns
  an array of *pnCount dimensions.

## ◆ GDALGroupGetFullName()

const char * GDALGroupGetFullName | ( | GDALGroupH | hGroup | ) |

Return the full name of the group.

The returned pointer is valid until hGroup is released.

This is the same as the C++ method GDALGroup::GetFullName().

## ◆ GDALGroupGetGroupNames()

char ** GDALGroupGetGroupNames | ( | GDALGroupH | hGroup,
|  | CSLConstList | papszOptions
| ) |  |

Return the list of sub-groups contained in this group.

This is the same as the C++ method GDALGroup::GetGroupNames().

Returns
  the group names, to be freed with CSLDestroy()

## ◆ GDALGroupGetMDArrayNames()

char ** GDALGroupGetMDArrayNames | ( | GDALGroupH | hGroup,
|  | CSLConstList | papszOptions
| ) |  |

Return the list of multidimensional array names contained in this group.

This is the same as the C++ method GDALGroup::GetGroupNames().

Returns
  the array names, to be freed with CSLDestroy()

## ◆ GDALGroupGetName()

const char * GDALGroupGetName | ( | GDALGroupH | hGroup | ) |

Return the name of the group.

The returned pointer is valid until hGroup is released.

This is the same as the C++ method GDALGroup::GetName().

## ◆ GDALGroupGetStructuralInfo()

CSLConstList GDALGroupGetStructuralInfo | ( | GDALGroupH | hGroup | ) |

Return structural information on the group.

This may be the compression, etc..

The return value should not be freed and is valid until GDALGroup is released or this function called again.

This is the same as the C++ method GDALGroup::GetStructuralInfo().

## ◆ GDALGroupGetVectorLayerNames()

char ** GDALGroupGetVectorLayerNames | ( | GDALGroupH | hGroup,
|  | CSLConstList | papszOptions
| ) |  |

Return the list of layer names contained in this group.

This is the same as the C++ method GDALGroup::GetVectorLayerNames().

Returns
  the group names, to be freed with CSLDestroy()

Since
  3.4

## ◆ GDALGroupOpenGroup()

GDALGroupH GDALGroupOpenGroup | ( | GDALGroupH | hGroup,
|  | const char * | pszSubGroupName,
|  | CSLConstList | papszOptions
| ) |  |

Open and return a sub-group.

This is the same as the C++ method GDALGroup::OpenGroup().

Returns
  the sub-group, to be freed with GDALGroupRelease(), or nullptr.

## ◆ GDALGroupOpenGroupFromFullname()

GDALGroupH GDALGroupOpenGroupFromFullname | ( | GDALGroupH | hGroup,
|  | const char * | pszFullname,
|  | CSLConstList | papszOptions
| ) |  |

Open and return a sub-group from its fully qualified name.

This is the same as the C++ method GDALGroup::OpenGroupFromFullname().

Returns
  the sub-group, to be freed with GDALGroupRelease(), or nullptr.

Since
  GDAL 3.2

## ◆ GDALGroupOpenMDArray()

GDALMDArrayH GDALGroupOpenMDArray | ( | GDALGroupH | hGroup,
|  | const char * | pszMDArrayName,
|  | CSLConstList | papszOptions
| ) |  |

Open and return a multidimensional array.

This is the same as the C++ method GDALGroup::OpenMDArray().

Returns
  the array, to be freed with GDALMDArrayRelease(), or nullptr.

## ◆ GDALGroupOpenMDArrayFromFullname()

GDALMDArrayH GDALGroupOpenMDArrayFromFullname | ( | GDALGroupH | hGroup,
|  | const char * | pszFullname,
|  | CSLConstList | papszOptions
| ) |  |

Open and return a multidimensional array from its fully qualified name.

This is the same as the C++ method GDALGroup::OpenMDArrayFromFullname().

Returns
  the array, to be freed with GDALMDArrayRelease(), or nullptr.

Since
  GDAL 3.2

## ◆ GDALGroupOpenVectorLayer()

OGRLayerH GDALGroupOpenVectorLayer | ( | GDALGroupH | hGroup,
|  | const char * | pszVectorLayerName,
|  | CSLConstList | papszOptions
| ) |  |

Open and return a vector layer.

This is the same as the C++ method GDALGroup::OpenVectorLayer().

Note that the vector layer is owned by its parent GDALDatasetH, and thus the returned handled if only valid while the parent GDALDatasetH is kept opened.

Returns
  the vector layer, or nullptr.

Since
  3.4

## ◆ GDALGroupRelease()

void GDALGroupRelease | ( | GDALGroupH | hGroup | ) |

Release the GDAL in-memory object associated with a GDALGroupH.

Note: when applied on a object coming from a driver, this does not destroy the object in the file, database, etc...

## ◆ GDALGroupRename()

bool GDALGroupRename | ( | GDALGroupH | hGroup,
|  | const char * | pszNewName
| ) |  |

Rename the group.

This is not implemented by all drivers.

Drivers known to implement it: MEM, netCDF.

This is the same as the C++ method GDALGroup::Rename()

Returns
  true in case of success

Since
  GDAL 3.8

## ◆ GDALGroupResolveMDArray()

GDALMDArrayH GDALGroupResolveMDArray | ( | GDALGroupH | hGroup,
|  | const char * | pszName,
|  | const char * | pszStartingPoint,
|  | CSLConstList | papszOptions
| ) |  |

Locate an array in a group and its subgroups by name.

See GDALGroup::ResolveMDArray() for description of the behavior.

Since
  GDAL 3.2

## ◆ GDALGroupSubsetDimensionFromSelection()

GDALGroupH GDALGroupSubsetDimensionFromSelection | ( | GDALGroupH | hGroup,
|  | const char * | pszSelection,
|  | CSLConstList | papszOptions
| ) |  |

Return a virtual group whose one dimension has been subset according to a selection.

This is the same as the C++ method GDALGroup::SubsetDimensionFromSelection().

Returns
  a virtual group, to be freed with GDALGroupRelease(), or nullptr.

## ◆ GDALHasArbitraryOverviews()

int GDALHasArbitraryOverviews | ( | GDALRasterBandH | hBand | ) |

Check for arbitrary overviews.

See also
  GDALRasterBand::HasArbitraryOverviews()

## ◆ GDALIdentifyDriver()

GDALDriverH GDALIdentifyDriver | ( | const char * | pszFilename,
|  | CSLConstList | papszFileList
| ) |  |

Identify the driver that can open a dataset.

This function will try to identify the driver that can open the passed file name by invoking the Identify method of each registered GDALDriver in turn. The first driver that successfully identifies the file name will be returned. If all drivers fail then NULL is returned.

In order to reduce the need for such searches to touch the operating system file system machinery, it is possible to give an optional list of files. This is the list of all files at the same level in the file system as the target file, including the target file. The filenames will not include any path components, and are essentially just the output of VSIReadDir() on the parent directory. If the target object does not have filesystem semantics then the file list should be NULL.

Parameters

  pszFilename | the name of the file to access. In the case of exotic drivers this may not refer to a physical file, but instead contain information for the driver on how to access a dataset.
  papszFileList | an array of strings, whose last element is the NULL pointer. These strings are filenames that are auxiliary to the main filename. The passed value may be NULL.

Returns
  A GDALDriverH handle or NULL on failure. For C++ applications this handle can be cast to a GDALDriver *.

## ◆ GDALIdentifyDriverEx()

GDALDriverH GDALIdentifyDriverEx | ( | const char * | pszFilename,
|  | unsigned int | nIdentifyFlags,
|  | const char *const * | papszAllowedDrivers,
|  | const char *const * | papszFileList
| ) |  |

Identify the driver that can open a dataset.

This function will try to identify the driver that can open the passed file name by invoking the Identify method of each registered GDALDriver in turn. The first driver that successfully identifies the file name will be returned. If all drivers fail then NULL is returned.

In order to reduce the need for such searches to touch the operating system file system machinery, it is possible to give an optional list of files. This is the list of all files at the same level in the file system as the target file, including the target file. The filenames will not include any path components, and are essentially just the output of VSIReadDir() on the parent directory. If the target object does not have filesystem semantics then the file list should be NULL.

Parameters

  pszFilename | the name of the file to access. In the case of exotic drivers this may not refer to a physical file, but instead contain information for the driver on how to access a dataset.
  nIdentifyFlags | a combination of GDAL_OF_RASTER for raster drivers or GDAL_OF_VECTOR for vector drivers. If none of the value is specified, both kinds are implied.
  papszAllowedDrivers | NULL to consider all candidate drivers, or a NULL terminated list of strings with the driver short names that must be considered.
  papszFileList | an array of strings, whose last element is the NULL pointer. These strings are filenames that are auxiliary to the main filename. The passed value may be NULL.

Returns
  A GDALDriverH handle or NULL on failure. For C++ applications this handle can be cast to a GDALDriver *.

Since
  GDAL 2.2

## ◆ GDALInitGCPs()

void GDALInitGCPs | ( | int | nCount,
|  | GDAL_GCP * | psGCP
| ) |  |

Initialize an array of GCPs.

Numeric values are initialized to 0 and strings to the empty string "" allocated with CPLStrdup() An array initialized with GDALInitGCPs() must be de-initialized with GDALDeinitGCPs().

Parameters

  nCount | number of GCPs in psGCP
  psGCP | array of GCPs of size nCount.

## ◆ GDALInvGeoTransform()

int GDALInvGeoTransform | ( | const double * | gt_in,
|  | double * | gt_out
| ) |  |

Invert Geotransform.

This function will invert a standard 3x2 set of GeoTransform coefficients. This converts the equation from being pixel to geo to being geo to pixel.

Parameters

  gt_in | Input geotransform (six doubles - unaltered).
  gt_out | Output geotransform (six doubles - updated).

Returns
  TRUE on success or FALSE if the equation is uninvertable.

## ◆ GDALIsMaskBand()

bool GDALIsMaskBand | ( | GDALRasterBandH | hBand | ) |

Returns whether a band is a mask band.

Mask band must be understood in the broad term: it can be a per-dataset mask band, an alpha band, or an implicit mask band. Typically the return of GetMaskBand()->IsMaskBand() should be true.

This function is the same as the C++ method GDALRasterBand::IsMaskBand()

Returns
  true if the band is a mask band.

See also
  GDALRasterBand::IsMaskBand()

Since
  GDAL 3.5.0

## ◆ GDALLoadOziMapFile()

int GDALLoadOziMapFile | ( | const char * | pszFilename,
|  | double * | padfGeoTransform,
|  | char ** | ppszWKT,
|  | int * | pnGCPCount,
|  | GDAL_GCP ** | ppasGCPs
| ) |  |

Helper function for translator implementer wanting support for OZI .map.

Parameters

  pszFilename | filename of .tab file
  padfGeoTransform | output geotransform. Must hold 6 doubles.
  ppszWKT | output pointer to a string that will be allocated with CPLMalloc().
  pnGCPCount | output pointer to GCP count.
  ppasGCPs | outputer pointer to an array of GCPs.

Returns
  TRUE in case of success, FALSE otherwise.

## ◆ GDALLoadTabFile()

int GDALLoadTabFile | ( | const char * | pszFilename,
|  | double * | padfGeoTransform,
|  | char ** | ppszWKT,
|  | int * | pnGCPCount,
|  | GDAL_GCP ** | ppasGCPs
| ) |  |

Helper function for translator implementer wanting support for MapInfo .tab files.

Parameters

  pszFilename | filename of .tab
  padfGeoTransform | output geotransform. Must hold 6 doubles.
  ppszWKT | output pointer to a string that will be allocated with CPLMalloc().
  pnGCPCount | output pointer to GCP count.
  ppasGCPs | outputer pointer to an array of GCPs.

Returns
  TRUE in case of success, FALSE otherwise.

## ◆ GDALLoadWorldFile()

int GDALLoadWorldFile | ( | const char * | pszFilename,
|  | double * | padfGeoTransform
| ) |  |

Read ESRI world file.

This function reads an ESRI style world file, and formats a geotransform from its contents.

The world file contains an affine transformation with the parameters in a different order than in a geotransform array.

- geotransform[1] : width of pixel
- geotransform[4] : rotational coefficient, zero for north up images.
- geotransform[2] : rotational coefficient, zero for north up images.
- geotransform[5] : height of pixel (but negative)
- geotransform[0] + 0.5 * geotransform[1] + 0.5 * geotransform[2] : x offset to center of top left pixel.
- geotransform[3] + 0.5 * geotransform[4] + 0.5 * geotransform[5] : y offset to center of top left pixel.

Parameters

  pszFilename | the world file name.
  padfGeoTransform | the six double array into which the geotransformation should be placed.

Returns
  TRUE on success or FALSE on failure.

## ◆ GDALMDArrayAdviseRead()

int GDALMDArrayAdviseRead | ( | GDALMDArrayH | hArray,
|  | const GUInt64 * | arrayStartIdx,
|  | const size_t * | count
| ) |  |

Advise driver of upcoming read requests.

This is the same as the C++ method GDALMDArray::AdviseRead()

Returns
  TRUE in case of success.

Since
  GDAL 3.2

## ◆ GDALMDArrayAdviseReadEx()

int GDALMDArrayAdviseReadEx | ( | GDALMDArrayH | hArray,
|  | const GUInt64 * | arrayStartIdx,
|  | const size_t * | count,
|  | CSLConstList | papszOptions
| ) |  |

Advise driver of upcoming read requests.

This is the same as the C++ method GDALMDArray::AdviseRead()

Returns
  TRUE in case of success.

Since
  GDAL 3.4

## ◆ GDALMDArrayAsClassicDataset()

GDALDatasetH GDALMDArrayAsClassicDataset | ( | GDALMDArrayH | hArray,
|  | size_t | iXDim,
|  | size_t | iYDim
| ) |  |

Return a view of this array as a "classic" GDALDataset (ie 2D)

Only 2D or more arrays are supported.

In the case of > 2D arrays, additional dimensions will be represented as raster bands.

The "reverse" method is GDALRasterBand::AsMDArray().

This is the same as the C++ method GDALMDArray::AsClassicDataset().

Parameters

  hArray | Array.
  iXDim | Index of the dimension that will be used as the X/width axis.
  iYDim | Index of the dimension that will be used as the Y/height axis.

Returns
  a new GDALDataset that must be freed with GDALClose(), or nullptr

## ◆ GDALMDArrayAsClassicDatasetEx()

GDALDatasetH GDALMDArrayAsClassicDatasetEx | ( | GDALMDArrayH | hArray,
|  | size_t | iXDim,
|  | size_t | iYDim,
|  | GDALGroupH | hRootGroup,
|  | CSLConstList | papszOptions
| ) |  |

Return a view of this array as a "classic" GDALDataset (ie 2D)

Only 2D or more arrays are supported.

In the case of > 2D arrays, additional dimensions will be represented as raster bands.

The "reverse" method is GDALRasterBand::AsMDArray().

This is the same as the C++ method GDALMDArray::AsClassicDataset().

Parameters

  hArray | Array.
  iXDim | Index of the dimension that will be used as the X/width axis.
  iYDim | Index of the dimension that will be used as the Y/height axis. Ignored if the dimension count is 1.
  hRootGroup | Root group, or NULL. Used with the BAND_METADATA option.
  papszOptions | Cf GDALMDArray::AsClassicDataset()

Returns
  a new GDALDataset that must be freed with GDALClose(), or nullptr

Since
  GDAL 3.8

## ◆ GDALMDArrayCache()

int GDALMDArrayCache | ( | GDALMDArrayH | hArray,
|  | CSLConstList | papszOptions
| ) |  |

Cache the content of the array into an auxiliary filename.

This is the same as the C++ method GDALMDArray::Cache().

Since
  GDAL 3.4

## ◆ GDALMDArrayComputeStatistics()

int GDALMDArrayComputeStatistics | ( | GDALMDArrayH | hArray,
|  | GDALDatasetH | ,
|  | int | bApproxOK,
|  | double * | pdfMin,
|  | double * | pdfMax,
|  | double * | pdfMean,
|  | double * | pdfStdDev,
|  | GUInt64 * | pnValidCount,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData
| ) |  |

Compute statistics.

This is the same as the C++ method GDALMDArray::ComputeStatistics().

Since
  GDAL 3.2

See also
  GDALMDArrayComputeStatisticsEx()

## ◆ GDALMDArrayComputeStatisticsEx()

int GDALMDArrayComputeStatisticsEx | ( | GDALMDArrayH | hArray,
|  | GDALDatasetH | ,
|  | int | bApproxOK,
|  | double * | pdfMin,
|  | double * | pdfMax,
|  | double * | pdfMean,
|  | double * | pdfStdDev,
|  | GUInt64 * | pnValidCount,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData,
|  | CSLConstList | papszOptions
| ) |  |

Compute statistics.

Same as GDALMDArrayComputeStatistics() with extra papszOptions argument.

This is the same as the C++ method GDALMDArray::ComputeStatistics().

Since
  GDAL 3.8

## ◆ GDALMDArrayCreateAttribute()

GDALAttributeH GDALMDArrayCreateAttribute | ( | GDALMDArrayH | hArray,
|  | const char * | pszName,
|  | size_t | nDimensions,
|  | const GUInt64 * | panDimensions,
|  | GDALExtendedDataTypeH | hEDT,
|  | CSLConstList | papszOptions
| ) |  |

Create a attribute within an array.

This is the same as the C++ method GDALMDArray::CreateAttribute().

Returns
  the attribute, to be freed with GDALAttributeRelease(), or nullptr.

## ◆ GDALMDArrayDeleteAttribute()

bool GDALMDArrayDeleteAttribute | ( | GDALMDArrayH | hArray,
|  | const char * | pszName,
|  | CSLConstList | papszOptions
| ) |  |

Delete an attribute from an array.

After this call, if a previously obtained instance of the deleted object is still alive, no method other than for freeing it should be invoked.

This is the same as the C++ method GDALMDArray::DeleteAttribute().

Returns
  true in case of success.

Since
  GDAL 3.8

## ◆ GDALMDArrayGetAttribute()

GDALAttributeH GDALMDArrayGetAttribute | ( | GDALMDArrayH | hArray,
|  | const char * | pszName
| ) |  |

Return an attribute by its name.

This is the same as the C++ method GDALIHasAttribute::GetAttribute()

The returned attribute must be freed with GDALAttributeRelease().

## ◆ GDALMDArrayGetAttributes()

GDALAttributeH * GDALMDArrayGetAttributes | ( | GDALMDArrayH | hArray,
|  | size_t * | pnCount,
|  | CSLConstList | papszOptions
| ) |  |

Return the list of attributes contained in this array.

The returned array must be freed with GDALReleaseAttributes(). If only the array itself needs to be freed, CPLFree() should be called (and GDALAttributeRelease() on individual array members).

This is the same as the C++ method GDALMDArray::GetAttributes().

Parameters

  hArray | Array.
  pnCount | Pointer to the number of values returned. Must NOT be NULL.
  papszOptions | Driver specific options determining how attributes should be retrieved. Pass nullptr for default behavior.

Returns
  an array of *pnCount attributes.

## ◆ GDALMDArrayGetBlockSize()

GUInt64 * GDALMDArrayGetBlockSize | ( | GDALMDArrayH | hArray,
|  | size_t * | pnCount
| ) |  |

Return the "natural" block size of the array along all dimensions.

Some drivers might organize the array in tiles/blocks and reading/writing aligned on those tile/block boundaries will be more efficient.

The returned number of elements in the vector is the same as GetDimensionCount(). A value of 0 should be interpreted as no hint regarding the natural block size along the considered dimension. "Flat" arrays will typically return a vector of values set to 0.

The default implementation will return a vector of values set to 0.

This method is used by GetProcessingChunkSize().

Pedantic note: the returned type is GUInt64, so in the highly unlikeley theoretical case of a 32-bit platform, this might exceed its size_t allocation capabilities.

This is the same as the C++ method GDALAbstractMDArray::GetBlockSize().

Returns
  the block size, in number of elements along each dimension.

## ◆ GDALMDArrayGetCoordinateVariables()

GDALMDArrayH * GDALMDArrayGetCoordinateVariables | ( | GDALMDArrayH | hArray,
|  | size_t * | pnCount
| ) |  |

Return coordinate variables.

The returned array must be freed with GDALReleaseArrays(). If only the array itself needs to be freed, CPLFree() should be called (and GDALMDArrayRelease() on individual array members).

This is the same as the C++ method GDALMDArray::GetCoordinateVariables()

Parameters

  hArray | Array.
  pnCount | Pointer to the number of values returned. Must NOT be NULL.

Returns
  an array of *pnCount arrays.

Since
  3.4

## ◆ GDALMDArrayGetDataType()

GDALExtendedDataTypeH GDALMDArrayGetDataType | ( | GDALMDArrayH | hArray | ) |

Return the data type.

The return must be freed with GDALExtendedDataTypeRelease().

## ◆ GDALMDArrayGetDimensionCount()

size_t GDALMDArrayGetDimensionCount | ( | GDALMDArrayH | hArray | ) |

Return the number of dimensions.

This is the same as the C++ method GDALAbstractMDArray::GetDimensionCount()

## ◆ GDALMDArrayGetDimensions()

GDALDimensionH * GDALMDArrayGetDimensions | ( | GDALMDArrayH | hArray,
|  | size_t * | pnCount
| ) |  |

Return the dimensions of the array.

The returned array must be freed with GDALReleaseDimensions(). If only the array itself needs to be freed, CPLFree() should be called (and GDALDimensionRelease() on individual array members).

This is the same as the C++ method GDALAbstractMDArray::GetDimensions()

Parameters

  hArray | Array.
  pnCount | Pointer to the number of values returned. Must NOT be NULL.

Returns
  an array of *pnCount dimensions.

## ◆ GDALMDArrayGetFullName()

const char * GDALMDArrayGetFullName | ( | GDALMDArrayH | hArray | ) |

Return array full name.

This is the same as the C++ method GDALMDArray::GetFullName()

## ◆ GDALMDArrayGetGridded()

GDALMDArrayH GDALMDArrayGetGridded | ( | GDALMDArrayH | hArray,
|  | const char * | pszGridOptions,
|  | GDALMDArrayH | hXArray,
|  | GDALMDArrayH | hYArray,
|  | CSLConstList | papszOptions
| ) |  |

Return a gridded array from scattered point data, that is from an array whose last dimension is the indexing variable of X and Y arrays.

The returned object should be released with GDALMDArrayRelease().

This is the same as the C++ method GDALMDArray::GetGridded().

Since
  GDAL 3.7

## ◆ GDALMDArrayGetMask()

GDALMDArrayH GDALMDArrayGetMask | ( | GDALMDArrayH | hArray,
|  | CSLConstList | papszOptions
| ) |  |

Return an array that is a mask for the current array.

This array will be of type Byte, with values set to 0 to indicate invalid pixels of the current array, and values set to 1 to indicate valid pixels.

The returned object should be released with GDALMDArrayRelease().

This is the same as the C++ method GDALMDArray::GetMask().

## ◆ GDALMDArrayGetName()

const char * GDALMDArrayGetName | ( | GDALMDArrayH | hArray | ) |

Return array name.

This is the same as the C++ method GDALMDArray::GetName()

## ◆ GDALMDArrayGetNoDataValueAsDouble()

double GDALMDArrayGetNoDataValueAsDouble | ( | GDALMDArrayH | hArray,
|  | int * | pbHasNoDataValue
| ) |  |

Return the nodata value as a double.

The value returned might be nullptr in case of no nodata value. When a nodata value is registered, a non-nullptr will be returned whose size in bytes is GetDataType().GetSize().

This is the same as the C++ method GDALMDArray::GetNoDataValueAsDouble().

Parameters

  hArray | Array handle.
  pbHasNoDataValue | Pointer to a output boolean that will be set to true if a nodata value exists and can be converted to double. Might be nullptr.

Returns
  the nodata value as a double. A 0.0 value might also indicate the absence of a nodata value or an error in the conversion (*pbHasNoDataValue will be set to false then).

## ◆ GDALMDArrayGetNoDataValueAsInt64()

int64_t GDALMDArrayGetNoDataValueAsInt64 | ( | GDALMDArrayH | hArray,
|  | int * | pbHasNoDataValue
| ) |  |

Return the nodata value as a Int64.

This is the same as the C++ method GDALMDArray::GetNoDataValueAsInt64().

Parameters

  hArray | Array handle.
  pbHasNoDataValue | Pointer to a output boolean that will be set to true if a nodata value exists and can be converted to Int64. Might be nullptr.

Returns
  the nodata value as a Int64.

Since
  GDAL 3.5

## ◆ GDALMDArrayGetNoDataValueAsUInt64()

uint64_t GDALMDArrayGetNoDataValueAsUInt64 | ( | GDALMDArrayH | hArray,
|  | int * | pbHasNoDataValue
| ) |  |

Return the nodata value as a UInt64.

This is the same as the C++ method GDALMDArray::GetNoDataValueAsInt64().

Parameters

  hArray | Array handle.
  pbHasNoDataValue | Pointer to a output boolean that will be set to true if a nodata value exists and can be converted to UInt64. Might be nullptr.

Returns
  the nodata value as a UInt64.

Since
  GDAL 3.5

## ◆ GDALMDArrayGetOffset()

double GDALMDArrayGetOffset | ( | GDALMDArrayH | hArray,
|  | int * | pbHasValue
| ) |  |

Get the scale value to apply to raw values.

unscaled_value = raw_value * GetScale() + GetOffset()

This is the same as the C++ method GDALMDArray::GetOffset().

Returns
  the scale value

## ◆ GDALMDArrayGetOffsetEx()

double GDALMDArrayGetOffsetEx | ( | GDALMDArrayH | hArray,
|  | int * | pbHasValue,
|  | GDALDataType * | peStorageType
| ) |  |

Get the scale value to apply to raw values.

unscaled_value = raw_value * GetScale() + GetOffset()

This is the same as the C++ method GDALMDArray::GetOffset().

Returns
  the scale value

Since
  GDAL 3.3

## ◆ GDALMDArrayGetProcessingChunkSize()

size_t * GDALMDArrayGetProcessingChunkSize | ( | GDALMDArrayH | hArray,
|  | size_t * | pnCount,
|  | size_t | nMaxChunkMemory
| ) |  |

Return an optimal chunk size for read/write operations, given the natural block size and memory constraints specified.

This method will use GetBlockSize() to define a chunk whose dimensions are multiple of those returned by GetBlockSize() (unless the block define by GetBlockSize() is larger than nMaxChunkMemory, in which case it will be returned by this method).

This is the same as the C++ method GDALAbstractMDArray::GetProcessingChunkSize().

Parameters

  hArray | Array.
  pnCount | Pointer to the number of values returned. Must NOT be NULL.
  nMaxChunkMemory | Maximum amount of memory, in bytes, to use for the chunk.

Returns
  the chunk size, in number of elements along each dimension.

## ◆ GDALMDArrayGetRawNoDataValue()

const void * GDALMDArrayGetRawNoDataValue | ( | GDALMDArrayH | hArray | ) |

Return the nodata value as a "raw" value.

The value returned might be nullptr in case of no nodata value. When a nodata value is registered, a non-nullptr will be returned whose size in bytes is GetDataType().GetSize().

The returned value should not be modified or freed.

This is the same as the ++ method GDALMDArray::GetRawNoDataValue().

Returns
  nullptr or a pointer to GetDataType().GetSize() bytes.

## ◆ GDALMDArrayGetResampled()

GDALMDArrayH GDALMDArrayGetResampled | ( | GDALMDArrayH | hArray,
|  | size_t | nNewDimCount,
|  | const GDALDimensionH * | pahNewDims,
|  | GDALRIOResampleAlg | resampleAlg,
|  | OGRSpatialReferenceH | hTargetSRS,
|  | CSLConstList | papszOptions
| ) |  |

Return an array that is a resampled / reprojected view of the current array.

This is the same as the C++ method GDALMDArray::GetResampled().

Currently this method can only resample along the last 2 dimensions, unless orthorectifying a NASA EMIT dataset.

The returned object should be released with GDALMDArrayRelease().

Since
  3.4

## ◆ GDALMDArrayGetScale()

double GDALMDArrayGetScale | ( | GDALMDArrayH | hArray,
|  | int * | pbHasValue
| ) |  |

Get the scale value to apply to raw values.

unscaled_value = raw_value * GetScale() + GetOffset()

This is the same as the C++ method GDALMDArray::GetScale().

Returns
  the scale value

## ◆ GDALMDArrayGetScaleEx()

double GDALMDArrayGetScaleEx | ( | GDALMDArrayH | hArray,
|  | int * | pbHasValue,
|  | GDALDataType * | peStorageType
| ) |  |

Get the scale value to apply to raw values.

unscaled_value = raw_value * GetScale() + GetScale()

This is the same as the C++ method GDALMDArray::GetScale().

Returns
  the scale value

Since
  GDAL 3.3

## ◆ GDALMDArrayGetSpatialRef()

OGRSpatialReferenceH GDALMDArrayGetSpatialRef | ( | GDALMDArrayH | hArray | ) |

Return the spatial reference system object associated with the array.

This is the same as the C++ method GDALMDArray::GetSpatialRef().

The returned object must be freed with OSRDestroySpatialReference().

## ◆ GDALMDArrayGetStatistics()

CPLErr GDALMDArrayGetStatistics | ( | GDALMDArrayH | hArray,
|  | GDALDatasetH | ,
|  | int | bApproxOK,
|  | int | bForce,
|  | double * | pdfMin,
|  | double * | pdfMax,
|  | double * | pdfMean,
|  | double * | pdfStdDev,
|  | GUInt64 * | pnValidCount,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData
| ) |  |

Fetch statistics.

This is the same as the C++ method GDALMDArray::GetStatistics().

Since
  GDAL 3.2

## ◆ GDALMDArrayGetStructuralInfo()

CSLConstList GDALMDArrayGetStructuralInfo | ( | GDALMDArrayH | hArray | ) |

Return structural information on the array.

This may be the compression, etc..

The return value should not be freed and is valid until GDALMDArray is released or this function called again.

This is the same as the C++ method GDALMDArray::GetStructuralInfo().

## ◆ GDALMDArrayGetTotalElementsCount()

GUInt64 GDALMDArrayGetTotalElementsCount | ( | GDALMDArrayH | hArray | ) |

Return the total number of values in the array.

This is the same as the C++ method GDALAbstractMDArray::GetTotalElementsCount()

## ◆ GDALMDArrayGetUnit()

const char * GDALMDArrayGetUnit | ( | GDALMDArrayH | hArray | ) |

Return the array unit.

Values should conform as much as possible with those allowed by the NetCDF CF conventions: http://cfconventions.org/Data/cf-conventions/cf-conventions-1.7/cf-conventions.html#units but others might be returned.

Few examples are "meter", "degrees", "second", ... Empty value means unknown.

The return value should not be freed and is valid until GDALMDArray is released or this function called again.

This is the same as the C++ method GDALMDArray::GetUnit().

## ◆ GDALMDArrayGetUnscaled()

GDALMDArrayH GDALMDArrayGetUnscaled | ( | GDALMDArrayH | hArray | ) |

Return an array that is the unscaled version of the current one.

That is each value of the unscaled array will be unscaled_value = raw_value * GetScale() + GetOffset()

Starting with GDAL 3.3, the Write() method is implemented and will convert from unscaled values to raw values.

The returned object should be released with GDALMDArrayRelease().

This is the same as the C++ method GDALMDArray::GetUnscaled().

## ◆ GDALMDArrayGetView()

GDALMDArrayH GDALMDArrayGetView | ( | GDALMDArrayH | hArray,
|  | const char * | pszViewExpr
| ) |  |

Return a view of the array using slicing or field access.

The returned object should be released with GDALMDArrayRelease().

This is the same as the C++ method GDALMDArray::GetView().

## ◆ GDALMDArrayRead()

int GDALMDArrayRead | ( | GDALMDArrayH | hArray,
|  | const GUInt64 * | arrayStartIdx,
|  | const size_t * | count,
|  | const GInt64 * | arrayStep,
|  | const GPtrDiff_t * | bufferStride,
|  | GDALExtendedDataTypeH | bufferDataType,
|  | void * | pDstBuffer,
|  | const void * | pDstBufferAllocStart,
|  | size_t | nDstBufferAllocSize
| ) |  |

Read part or totality of a multidimensional array.

This is the same as the C++ method GDALAbstractMDArray::Read()

Returns
  TRUE in case of success.

## ◆ GDALMDArrayRelease()

void GDALMDArrayRelease | ( | GDALMDArrayH | hMDArray | ) |

Release the GDAL in-memory object associated with a GDALMDArray.

Note: when applied on a object coming from a driver, this does not destroy the object in the file, database, etc...

## ◆ GDALMDArrayRename()

bool GDALMDArrayRename | ( | GDALMDArrayH | hArray,
|  | const char * | pszNewName
| ) |  |

Rename the array.

This is not implemented by all drivers.

Drivers known to implement it: MEM, netCDF, Zarr.

This is the same as the C++ method GDALAbstractMDArray::Rename()

Returns
  true in case of success

Since
  GDAL 3.8

## ◆ GDALMDArrayResize()

bool GDALMDArrayResize | ( | GDALMDArrayH | hArray,
|  | const GUInt64 * | panNewDimSizes,
|  | CSLConstList | papszOptions
| ) |  |

Resize an array to new dimensions.

Not all drivers may allow this operation, and with restrictions (e.g. for netCDF, this is limited to growing of "unlimited" dimensions)

Resizing a dimension used in other arrays will cause those other arrays to be resized.

This is the same as the C++ method GDALMDArray::Resize().

Parameters

  hArray | Array.
  panNewDimSizes | Array of GetDimensionCount() values containing the new size of each indexing dimension.
  papszOptions | Options. (Driver specific)

Returns
  true in case of success.

Since
  GDAL 3.7

## ◆ GDALMDArraySetNoDataValueAsDouble()

int GDALMDArraySetNoDataValueAsDouble | ( | GDALMDArrayH | hArray,
|  | double | dfNoDataValue
| ) |  |

Set the nodata value as a double.

If the natural data type of the attribute/array is not double, type conversion will occur to the type returned by GetDataType().

This is the same as the C++ method GDALMDArray::SetNoDataValue(double).

Returns
  TRUE in case of success.

## ◆ GDALMDArraySetNoDataValueAsInt64()

int GDALMDArraySetNoDataValueAsInt64 | ( | GDALMDArrayH | hArray,
|  | int64_t | nNoDataValue
| ) |  |

Set the nodata value as a Int64.

If the natural data type of the attribute/array is not Int64, type conversion will occur to the type returned by GetDataType().

This is the same as the C++ method GDALMDArray::SetNoDataValue(int64_t).

Returns
  TRUE in case of success.

Since
  GDAL 3.5

## ◆ GDALMDArraySetNoDataValueAsUInt64()

int GDALMDArraySetNoDataValueAsUInt64 | ( | GDALMDArrayH | hArray,
|  | uint64_t | nNoDataValue
| ) |  |

Set the nodata value as a UInt64.

If the natural data type of the attribute/array is not UInt64, type conversion will occur to the type returned by GetDataType().

This is the same as the C++ method GDALMDArray::SetNoDataValue(uint64_t).

Returns
  TRUE in case of success.

Since
  GDAL 3.5

## ◆ GDALMDArraySetOffset()

int GDALMDArraySetOffset | ( | GDALMDArrayH | hArray,
|  | double | dfOffset
| ) |  |

Set the scale value to apply to raw values.

unscaled_value = raw_value * GetScale() + GetOffset()

This is the same as the C++ method GDALMDArray::SetOffset().

Returns
  TRUE in case of success.

## ◆ GDALMDArraySetOffsetEx()

int GDALMDArraySetOffsetEx | ( | GDALMDArrayH | hArray,
|  | double | dfOffset,
|  | GDALDataType | eStorageType
| ) |  |

Set the scale value to apply to raw values.

unscaled_value = raw_value * GetOffset() + GetOffset()

This is the same as the C++ method GDALMDArray::SetOffset().

Returns
  TRUE in case of success.

Since
  GDAL 3.3

## ◆ GDALMDArraySetRawNoDataValue()

int GDALMDArraySetRawNoDataValue | ( | GDALMDArrayH | hArray,
|  | const void * | pNoData
| ) |  |

Set the nodata value as a "raw" value.

This is the same as the C++ method GDALMDArray::SetRawNoDataValue(const void*).

Returns
  TRUE in case of success.

## ◆ GDALMDArraySetScale()

int GDALMDArraySetScale | ( | GDALMDArrayH | hArray,
|  | double | dfScale
| ) |  |

Set the scale value to apply to raw values.

unscaled_value = raw_value * GetScale() + GetOffset()

This is the same as the C++ method GDALMDArray::SetScale().

Returns
  TRUE in case of success.

## ◆ GDALMDArraySetScaleEx()

int GDALMDArraySetScaleEx | ( | GDALMDArrayH | hArray,
|  | double | dfScale,
|  | GDALDataType | eStorageType
| ) |  |

Set the scale value to apply to raw values.

unscaled_value = raw_value * GetScale() + GetOffset()

This is the same as the C++ method GDALMDArray::SetScale().

Returns
  TRUE in case of success.

Since
  GDAL 3.3

## ◆ GDALMDArraySetSpatialRef()

int GDALMDArraySetSpatialRef | ( | GDALMDArrayH | hArray,
|  | OGRSpatialReferenceH | hSRS
| ) |  |

Assign a spatial reference system object to the array.

This is the same as the C++ method GDALMDArray::SetSpatialRef().

Returns
  TRUE in case of success.

## ◆ GDALMDArraySetUnit()

int GDALMDArraySetUnit | ( | GDALMDArrayH | hArray,
|  | const char * | pszUnit
| ) |  |

Set the variable unit.

Values should conform as much as possible with those allowed by the NetCDF CF conventions: http://cfconventions.org/Data/cf-conventions/cf-conventions-1.7/cf-conventions.html#units but others might be returned.

Few examples are "meter", "degrees", "second", ... Empty value means unknown.

This is the same as the C function GDALMDArraySetUnit()

Parameters

  hArray | array.
  pszUnit | unit name.

Returns
  TRUE in case of success.

## ◆ GDALMDArrayTranspose()

GDALMDArrayH GDALMDArrayTranspose | ( | GDALMDArrayH | hArray,
|  | size_t | nNewAxisCount,
|  | const int * | panMapNewAxisToOldAxis
| ) |  |

Return a view of the array whose axis have been reordered.

The returned object should be released with GDALMDArrayRelease().

This is the same as the C++ method GDALMDArray::Transpose().

## ◆ GDALMDArrayWrite()

int GDALMDArrayWrite | ( | GDALMDArrayH | hArray,
|  | const GUInt64 * | arrayStartIdx,
|  | const size_t * | count,
|  | const GInt64 * | arrayStep,
|  | const GPtrDiff_t * | bufferStride,
|  | GDALExtendedDataTypeH | bufferDataType,
|  | const void * | pSrcBuffer,
|  | const void * | pSrcBufferAllocStart,
|  | size_t | nSrcBufferAllocSize
| ) |  |

Write part or totality of a multidimensional array.

This is the same as the C++ method GDALAbstractMDArray::Write()

Returns
  TRUE in case of success.

## ◆ GDALOpen()

GDALDatasetH GDALOpen | ( | const char * | pszFilename,
|  | GDALAccess | eAccess
| ) |  |

Open a raster file as a GDALDataset.

This function will try to open the passed file, or virtual dataset name by invoking the Open method of each registered GDALDriver in turn. The first successful open will result in a returned dataset. If all drivers fail then NULL is returned and an error is issued.

Several recommendations :

- If you open a dataset object with GA_Update access, it is not recommended to open a new dataset on the same underlying file.
- The returned dataset should only be accessed by one thread at a time. If you want to use it from different threads, you must add all necessary code (mutexes, etc.) to avoid concurrent use of the object. (Some drivers, such as GeoTIFF, maintain internal state variables that are updated each time a new block is read, thus preventing concurrent use.)

For drivers supporting the VSI virtual file API, it is possible to open a file in a .zip archive (see VSIInstallZipFileHandler()), in a .tar/.tar.gz/.tgz archive (see VSIInstallTarFileHandler()) or on a HTTP / FTP server (see VSIInstallCurlFileHandler())

See also
  GDALOpenShared()
  GDALOpenEx()

Parameters

  pszFilename | the name of the file to access. In the case of exotic drivers this may not refer to a physical file, but instead contain information for the driver on how to access a dataset. It should be in UTF-8 encoding.
  eAccess | the desired access, either GA_Update or GA_ReadOnly. Many drivers support only read only access.

Returns
  A GDALDatasetH handle or NULL on failure. For C++ applications this handle can be cast to a GDALDataset *.

## ◆ GDALOpenEx()

GDALDatasetH GDALOpenEx | ( | const char * | pszFilename,
|  | unsigned int | nOpenFlags,
|  | const char *const * | papszAllowedDrivers,
|  | const char *const * | papszOpenOptions,
|  | const char *const * | papszSiblingFiles
| ) |  |

Open a raster or vector file as a GDALDataset.

This function will try to open the passed file, or virtual dataset name by invoking the Open method of each registered GDALDriver in turn. The first successful open will result in a returned dataset. If all drivers fail then NULL is returned and an error is issued.

Several recommendations :

- If you open a dataset object with GDAL_OF_UPDATE access, it is not recommended to open a new dataset on the same underlying file.
- The returned dataset should only be accessed by one thread at a time. If you want to use it from different threads, you must add all necessary code (mutexes, etc.) to avoid concurrent use of the object. (Some drivers, such as GeoTIFF, maintain internal state variables that are updated each time a new block is read, thus preventing concurrent use.)

For drivers supporting the VSI virtual file API, it is possible to open a file in a .zip archive (see VSIInstallZipFileHandler()), in a .tar/.tar.gz/.tgz archive (see VSIInstallTarFileHandler()) or on a HTTP / FTP server (see VSIInstallCurlFileHandler())

In order to reduce the need for searches through the operating system file system machinery, it is possible to give an optional list of files with the papszSiblingFiles parameter. This is the list of all files at the same level in the file system as the target file, including the target file. The filenames must not include any path components, are essentially just the output of VSIReadDir() on the parent directory. If the target object does not have filesystem semantics then the file list should be NULL.

Parameters

  pszFilename | the name of the file to access. In the case of exotic drivers this may not refer to a physical file, but instead contain information for the driver on how to access a dataset. It should be in UTF-8 encoding.
  nOpenFlags | a combination of GDAL_OF_ flags that may be combined through logical or operator. Driver kind: GDAL_OF_RASTER for raster drivers, GDAL_OF_MULTIDIM_RASTER for multidimensional raster drivers, GDAL_OF_VECTOR for vector drivers, GDAL_OF_GNM for Geographic Network Model drivers. GDAL_OF_RASTER and GDAL_OF_MULTIDIM_RASTER are generally mutually exclusive. If none of the value is specified, GDAL_OF_RASTER | GDAL_OF_VECTOR | GDAL_OF_GNM is implied. Access mode: GDAL_OF_READONLY (exclusive)or GDAL_OF_UPDATE. Shared mode: GDAL_OF_SHARED. If set, it allows the sharing of GDALDataset handles for a dataset with other callers that have set GDAL_OF_SHARED. In particular, GDALOpenEx() will first consult its list of currently open and shared GDALDataset's, and if the GetDescription() name for one exactly matches the pszFilename passed to GDALOpenEx() it will be referenced and returned, if GDALOpenEx() is called from the same thread. Verbose error: GDAL_OF_VERBOSE_ERROR. If set, a failed attempt to open the file will lead to an error message to be reported.
  papszAllowedDrivers | NULL to consider all candidate drivers, or a NULL terminated list of strings with the driver short names that must be considered.
  papszOpenOptions | NULL, or a NULL terminated list of strings with open options passed to candidate drivers. An option exists for all drivers, OVERVIEW_LEVEL=level, to select a particular overview level of a dataset. The level index starts at 0. The level number can be suffixed by "only" to specify that only this overview level must be visible, and not sub-levels. Open options are validated by default, and a warning is emitted in case the option is not recognized. In some scenarios, it might be not desirable (e.g. when not knowing which driver will open the file), so the special open option VALIDATE_OPEN_OPTIONS can be set to NO to avoid such warnings. Alternatively, since GDAL 2.1, an option name can be preceded by the @ character to indicate that it may not cause a warning if the driver doesn't declare this option. Starting with GDAL 3.3, OVERVIEW_LEVEL=NONE is supported to indicate that no overviews should be exposed.
  papszSiblingFiles | NULL, or a NULL terminated list of strings that are filenames that are auxiliary to the main filename. If NULL is passed, a probing of the file system will be done.

Returns
  A GDALDatasetH handle or NULL on failure. For C++ applications this handle can be cast to a GDALDataset *.

Since
  GDAL 2.0

## ◆ GDALOpenShared()

GDALDatasetH GDALOpenShared | ( | const char * | pszFilename,
|  | GDALAccess | eAccess
| ) |  |

Open a raster file as a GDALDataset.

This function works the same as GDALOpen(), but allows the sharing of GDALDataset handles for a dataset with other callers to GDALOpenShared().

In particular, GDALOpenShared() will first consult its list of currently open and shared GDALDataset's, and if the GetDescription() name for one exactly matches the pszFilename passed to GDALOpenShared() it will be referenced and returned.

Starting with GDAL 1.6.0, if GDALOpenShared() is called on the same pszFilename from two different threads, a different GDALDataset object will be returned as it is not safe to use the same dataset from different threads, unless the user does explicitly use mutexes in its code.

For drivers supporting the VSI virtual file API, it is possible to open a file in a .zip archive (see VSIInstallZipFileHandler()), in a .tar/.tar.gz/.tgz archive (see VSIInstallTarFileHandler()) or on a HTTP / FTP server (see VSIInstallCurlFileHandler())

See also
  GDALOpen()
  GDALOpenEx()

Parameters

  pszFilename | the name of the file to access. In the case of exotic drivers this may not refer to a physical file, but instead contain information for the driver on how to access a dataset. It should be in UTF-8 encoding.
  eAccess | the desired access, either GA_Update or GA_ReadOnly. Many drivers support only read only access.

Returns
  A GDALDatasetH handle or NULL on failure. For C++ applications this handle can be cast to a GDALDataset *.

## ◆ GDALOverviewMagnitudeCorrection()

CPLErr GDALOverviewMagnitudeCorrection | ( | GDALRasterBandH | hBaseBand,
|  | int | nOverviewCount,
|  | GDALRasterBandH * | pahOverviews,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData
| ) |  |

Undocumented.

Parameters

  hBaseBand | undocumented.
  nOverviewCount | undocumented.
  pahOverviews | undocumented.
  pfnProgress | undocumented.
  pProgressData | undocumented.

Returns
  undocumented

## ◆ GDALPackedDMSToDec()

double GDALPackedDMSToDec | ( | double | dfPacked | ) |

Convert a packed DMS value (DDDMMMSSS.SS) into decimal degrees.

See CPLPackedDMSToDec().

## ◆ GDALRasterAdviseRead()

CPLErr GDALRasterAdviseRead | ( | GDALRasterBandH | hBand,
|  | int | nXOff,
|  | int | nYOff,
|  | int | nXSize,
|  | int | nYSize,
|  | int | nBufXSize,
|  | int | nBufYSize,
|  | GDALDataType | eDT,
|  | CSLConstList | papszOptions
| ) |  |

Advise driver of upcoming read requests.

See also
  GDALRasterBand::AdviseRead()

## ◆ GDALRasterBandAsMDArray()

GDALMDArrayH GDALRasterBandAsMDArray | ( | GDALRasterBandH | hBand | ) |

Return a view of this raster band as a 2D multidimensional GDALMDArray.

The band must be linked to a GDALDataset. If this dataset is not already marked as shared, it will be, so that the returned array holds a reference to it.

If the dataset has a geotransform attached, the X and Y dimensions of the returned array will have an associated indexing variable.

The returned pointer must be released with GDALMDArrayRelease().

This is the same as the C++ method GDALRasterBand::AsMDArray().

Returns
  a new array, or NULL.

Since
  GDAL 3.1

## ◆ GDALRasterBandCopyWholeRaster()

CPLErr GDALRasterBandCopyWholeRaster | ( | GDALRasterBandH | hSrcBand,
|  | GDALRasterBandH | hDstBand,
|  | const char *const *const | papszOptions,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData
| ) |  |

Copy a whole raster band.

This function copies the complete raster contents of one band to another similarly configured band. The source and destination bands must have the same width and height. The bands do not have to have the same data type.

It implements efficient copying, in particular "chunking" the copy in substantial blocks.

Currently the only papszOptions value supported are :

- "COMPRESSED=YES" to force alignment on target dataset block sizes to achieve best compression.
- "SKIP_HOLES=YES" to skip chunks for which GDALGetDataCoverageStatus() returns GDAL_DATA_COVERAGE_STATUS_EMPTY (GDAL >= 2.2)

Parameters

  hSrcBand | the source band
  hDstBand | the destination band
  papszOptions | transfer hints in "StringList" Name=Value format.
  pfnProgress | progress reporting function.
  pProgressData | callback data for progress function.

Returns
  CE_None on success, or CE_Failure on failure.

## ◆ GDALRasterBandGetTiledVirtualMem()

CPLVirtualMem * GDALRasterBandGetTiledVirtualMem | ( | GDALRasterBandH | hBand,
|  | GDALRWFlag | eRWFlag,
|  | int | nXOff,
|  | int | nYOff,
|  | int | nXSize,
|  | int | nYSize,
|  | int | nTileXSize,
|  | int | nTileYSize,
|  | GDALDataType | eBufType,
|  | size_t | nCacheSize,
|  | int | bSingleThreadUsage,
|  | CSLConstList | papszOptions
| ) |  |

Create a CPLVirtualMem object from a GDAL rasterband object, with tiling organization.

Only supported on Linux for now.

This method allows creating a virtual memory object for a region of one GDALRasterBand. The content of the virtual memory object is automatically filled from dataset content when a virtual memory page is first accessed, and it is released (or flushed in case of a "dirty" page) when the cache size limit has been reached.

Contrary to GDALDatasetGetVirtualMem(), pixels will be organized by tiles instead of scanlines.

If nXSize is not a multiple of nTileXSize or nYSize is not a multiple of nTileYSize, partial tiles will exists at the right and/or bottom of the region of interest. Those partial tiles will also have nTileXSize * nTileYSize dimension, with padding pixels.

The pointer to access the virtual memory object is obtained with CPLVirtualMemGetAddr(). It remains valid until CPLVirtualMemFree() is called. CPLVirtualMemFree() must be called before the raster band object is destroyed.

If p is such a pointer and base_type the C type matching eBufType, for default values of spacing parameters, the element of image coordinates (x, y) (relative to xOff, yOff) can be accessed with: ((base_type*)p)[tile_number(x,y)*tile_size + offset_in_tile(x,y)].

where nTilesPerRow = ceil(nXSize / nTileXSize) nTilesCount = nTilesPerRow * nTilesPerCol tile_number(x,y) = (y / nTileYSize) * nTilesPerRow + (x / nTileXSize) offset_in_tile(x,y) = (y % nTileYSize) * nTileXSize + (x % nTileXSize) tile_size = nTileXSize * nTileYSize

Note that the mechanism used to transparently fill memory pages when they are accessed is the same (but in a controlled way) than what occurs when a memory error occurs in a program. Debugging software will generally interrupt program execution when that happens. If needed, CPLVirtualMemPin() can be used to avoid that by ensuring memory pages are allocated before being accessed.

The size of the region that can be mapped as a virtual memory object depends on hardware and operating system limitations. On Linux AMD64 platforms, the maximum value is 128 TB. On Linux x86 platforms, the maximum value is 2 GB.

Data type translation is automatically done if the data type (eBufType) of the buffer is different than that of the GDALRasterBand.

Parameters

  hBand | Rasterband object
  eRWFlag | Either GF_Read to read a region of data, or GF_Write to write a region of data.
  nXOff | The pixel offset to the top left corner of the region of the band to be accessed. This would be zero to start from the left side.
  nYOff | The line offset to the top left corner of the region of the band to be accessed. This would be zero to start from the top.
  nXSize | The width of the region of the band to be accessed in pixels.
  nYSize | The height of the region of the band to be accessed in lines.
  nTileXSize | the width of the tiles.
  nTileYSize | the height of the tiles.
  eBufType | the type of the pixel values in the data buffer. The pixel values will automatically be translated to/from the GDALRasterBand data type as needed.
  nCacheSize | size in bytes of the maximum memory that will be really allocated (must ideally fit into RAM)
  bSingleThreadUsage | set to TRUE if there will be no concurrent threads that will access the virtual memory mapping. This can optimize performance a bit. If set to FALSE, CPLVirtualMemDeclareThread() must be called.
  papszOptions | NULL terminated list of options. Unused for now.

Returns
  a virtual memory object that must be freed by CPLVirtualMemFree(), or NULL in case of failure.

Since
  GDAL 1.11

## ◆ GDALRasterBandGetVirtualMem()

CPLVirtualMem * GDALRasterBandGetVirtualMem | ( | GDALRasterBandH | hBand,
|  | GDALRWFlag | eRWFlag,
|  | int | nXOff,
|  | int | nYOff,
|  | int | nXSize,
|  | int | nYSize,
|  | int | nBufXSize,
|  | int | nBufYSize,
|  | GDALDataType | eBufType,
|  | int | nPixelSpace,
|  | GIntBig | nLineSpace,
|  | size_t | nCacheSize,
|  | size_t | nPageSizeHint,
|  | int | bSingleThreadUsage,
|  | CSLConstList | papszOptions
| ) |  |

Create a CPLVirtualMem object from a GDAL raster band object.

Only supported on Linux for now.

This method allows creating a virtual memory object for a region of a GDALRasterBand. The content of the virtual memory object is automatically filled from dataset content when a virtual memory page is first accessed, and it is released (or flushed in case of a "dirty" page) when the cache size limit has been reached.

The pointer to access the virtual memory object is obtained with CPLVirtualMemGetAddr(). It remains valid until CPLVirtualMemFree() is called. CPLVirtualMemFree() must be called before the raster band object is destroyed.

If p is such a pointer and base_type the C type matching eBufType, for values of spacing parameters, the element of image coordinates (x, y) default (relative to xOff, yOff) can be accessed with ((base_type*)p)[x + y * nBufXSize].

Note that the mechanism used to transparently fill memory pages when they are accessed is the same (but in a controlled way) than what occurs when a memory error occurs in a program. Debugging software will generally interrupt program execution when that happens. If needed, CPLVirtualMemPin() can be used to avoid that by ensuring memory pages are allocated before being accessed.

The size of the region that can be mapped as a virtual memory object depends on hardware and operating system limitations. On Linux AMD64 platforms, the maximum value is 128 TB. On Linux x86 platforms, the maximum value is 2 GB.

Data type translation is automatically done if the data type (eBufType) of the buffer is different than that of the GDALRasterBand.

Image decimation / replication is currently not supported, i.e. if the size of the region being accessed (nXSize x nYSize) is different from the buffer size (nBufXSize x nBufYSize).

The nPixelSpace and nLineSpace parameters allow reading into or writing from various organization of buffers. Arbitrary values for the spacing parameters are not supported. Those values must be multiple of the size of the buffer data type and must be such that nLineSpace >= nPixelSpace * nBufXSize.

Parameters

  hBand | Rasterband object
  eRWFlag | Either GF_Read to read a region of data, or GF_Write to write a region of data.
  nXOff | The pixel offset to the top left corner of the region of the band to be accessed. This would be zero to start from the left side.
  nYOff | The line offset to the top left corner of the region of the band to be accessed. This would be zero to start from the top.
  nXSize | The width of the region of the band to be accessed in pixels.
  nYSize | The height of the region of the band to be accessed in lines.
  nBufXSize | the width of the buffer image into which the desired region is to be read, or from which it is to be written.
  nBufYSize | the height of the buffer image into which the desired region is to be read, or from which it is to be written.
  eBufType | the type of the pixel values in the data buffer. The pixel values will automatically be translated to/from the GDALRasterBand data type as needed.
  nPixelSpace | The byte offset from the start of one pixel value in the buffer to the start of the next pixel value within a scanline. If defaulted (0) the size of the datatype eBufType is used.
  nLineSpace | The byte offset from the start of one scanline in the buffer to the start of the next. If defaulted (0) the size of the datatype eBufType * nBufXSize is used.
  nCacheSize | size in bytes of the maximum memory that will be really allocated (must ideally fit into RAM)
  nPageSizeHint | hint for the page size. Must be a multiple of the system page size, returned by CPLGetPageSize(). Minimum value is generally 4096. Might be set to 0 to let the function determine a default page size.
  bSingleThreadUsage | set to TRUE if there will be no concurrent threads that will access the virtual memory mapping. This can optimize performance a bit. If set to FALSE, CPLVirtualMemDeclareThread() must be called.
  papszOptions | NULL terminated list of options. Unused for now.

Returns
  a virtual memory object that must be freed by CPLVirtualMemFree(), or NULL in case of failure.

Since
  GDAL 1.11

## ◆ GDALRasterIO()

CPLErr GDALRasterIO | ( | GDALRasterBandH | hBand,
|  | GDALRWFlag | eRWFlag,
|  | int | nXOff,
|  | int | nYOff,
|  | int | nXSize,
|  | int | nYSize,
|  | void * | pData,
|  | int | nBufXSize,
|  | int | nBufYSize,
|  | GDALDataType | eBufType,
|  | int | nPixelSpace,
|  | int | nLineSpace
| ) |  |

Read/write a region of image data for this band.

Use GDALRasterIOEx() if 64 bit spacings or extra arguments (resampling resolution, progress callback, etc. are needed)

See also
  GDALRasterBand::RasterIO()

## ◆ GDALRasterIOEx()

CPLErr GDALRasterIOEx | ( | GDALRasterBandH | hBand,
|  | GDALRWFlag | eRWFlag,
|  | int | nXOff,
|  | int | nYOff,
|  | int | nXSize,
|  | int | nYSize,
|  | void * | pData,
|  | int | nBufXSize,
|  | int | nBufYSize,
|  | GDALDataType | eBufType,
|  | GSpacing | nPixelSpace,
|  | GSpacing | nLineSpace,
|  | GDALRasterIOExtraArg * | psExtraArg
| ) |  |

Read/write a region of image data for this band.

See also
  GDALRasterBand::RasterIO()

Since
  GDAL 2.0

## ◆ GDALRATChangesAreWrittenToFile()

int GDALRATChangesAreWrittenToFile | ( | GDALRasterAttributeTableH | hRAT | ) |

Determine whether changes made to this RAT are reflected directly in the dataset.

This function is the same as the C++ method GDALRasterAttributeTable::ChangesAreWrittenToFile()

## ◆ GDALRATClone()

GDALRasterAttributeTableH GDALRATClone | ( | const GDALRasterAttributeTableH | hRAT | ) |

Copy Raster Attribute Table.

This function is the same as the C++ method GDALRasterAttributeTable::Clone()

## ◆ GDALRATCreateColumn()

CPLErr GDALRATCreateColumn | ( | GDALRasterAttributeTableH | hRAT,
|  | const char * | pszFieldName,
|  | GDALRATFieldType | eFieldType,
|  | GDALRATFieldUsage | eFieldUsage
| ) |  |

Create new column.

This function is the same as the C++ method GDALRasterAttributeTable::CreateColumn()

## ◆ GDALRATDumpReadable()

void GDALRATDumpReadable | ( | GDALRasterAttributeTableH | hRAT,
|  | FILE * | fp
| ) |  |

Dump RAT in readable form.

This function is the same as the C++ method GDALRasterAttributeTable::DumpReadable()

## ◆ GDALRATGetColOfUsage()

int GDALRATGetColOfUsage | ( | GDALRasterAttributeTableH | hRAT,
|  | GDALRATFieldUsage | eUsage
| ) |  |

Fetch column index for given usage.

This function is the same as the C++ method GDALRasterAttributeTable::GetColOfUsage()

## ◆ GDALRATGetColumnCount()

int GDALRATGetColumnCount | ( | GDALRasterAttributeTableH | hRAT | ) |

Fetch table column count.

This function is the same as the C++ method GDALRasterAttributeTable::GetColumnCount()

## ◆ GDALRATGetLinearBinning()

int GDALRATGetLinearBinning | ( | GDALRasterAttributeTableH | hRAT,
|  | double * | pdfRow0Min,
|  | double * | pdfBinSize
| ) |  |

Get linear binning information.

This function is the same as the C++ method GDALRasterAttributeTable::GetLinearBinning()

## ◆ GDALRATGetNameOfCol()

const char * GDALRATGetNameOfCol | ( | GDALRasterAttributeTableH | hRAT,
|  | int | iCol
| ) |  |

Fetch name of indicated column.

This function is the same as the C++ method GDALRasterAttributeTable::GetNameOfCol()

Parameters

  hRAT | RAT handle.
  iCol | column index.

Returns
  name.

## ◆ GDALRATGetRowCount()

int GDALRATGetRowCount | ( | GDALRasterAttributeTableH | hRAT | ) |

Fetch row count.

This function is the same as the C++ method GDALRasterAttributeTable::GetRowCount()

## ◆ GDALRATGetRowOfValue()

int GDALRATGetRowOfValue | ( | GDALRasterAttributeTableH | hRAT,
|  | double | dfValue
| ) |  |

Get row for pixel value.

This function is the same as the C++ method GDALRasterAttributeTable::GetRowOfValue()

## ◆ GDALRATGetTableType()

GDALRATTableType GDALRATGetTableType | ( | GDALRasterAttributeTableH | hRAT | ) |

Get Rat Table Type.

Since
  GDAL 2.4

This function is the same as the C++ method GDALRasterAttributeTable::GetTableType()

## ◆ GDALRATGetTypeOfCol()

GDALRATFieldType GDALRATGetTypeOfCol | ( | GDALRasterAttributeTableH | hRAT,
|  | int | iCol
| ) |  |

Fetch column type.

This function is the same as the C++ method GDALRasterAttributeTable::GetTypeOfCol()

Parameters

  hRAT | RAT handle.
  iCol | column index.

Returns
  type.

## ◆ GDALRATGetUsageOfCol()

GDALRATFieldUsage GDALRATGetUsageOfCol | ( | GDALRasterAttributeTableH | hRAT,
|  | int | iCol
| ) |  |

Fetch column usage value.

This function is the same as the C++ method GDALRasterAttributeTable::GetUsageOfCol()

Parameters

  hRAT | RAT handle.
  iCol | column index.

Returns
  usage.

## ◆ GDALRATGetValueAsDouble()

double GDALRATGetValueAsDouble | ( | GDALRasterAttributeTableH | hRAT,
|  | int | iRow,
|  | int | iField
| ) |  |

Fetch field value as a double.

This function is the same as the C++ method GDALRasterAttributeTable::GetValueAsDouble()

## ◆ GDALRATGetValueAsInt()

int GDALRATGetValueAsInt | ( | GDALRasterAttributeTableH | hRAT,
|  | int | iRow,
|  | int | iField
| ) |  |

Fetch field value as a integer.

This function is the same as the C++ method GDALRasterAttributeTable::GetValueAsInt()

## ◆ GDALRATGetValueAsString()

const char * GDALRATGetValueAsString | ( | GDALRasterAttributeTableH | hRAT,
|  | int | iRow,
|  | int | iField
| ) |  |

Fetch field value as a string.

This function is the same as the C++ method GDALRasterAttributeTable::GetValueAsString()

## ◆ GDALRATInitializeFromColorTable()

CPLErr GDALRATInitializeFromColorTable | ( | GDALRasterAttributeTableH | hRAT,
|  | GDALColorTableH | hCT
| ) |  |

Initialize from color table.

This function is the same as the C++ method GDALRasterAttributeTable::InitializeFromColorTable()

## ◆ GDALRATRemoveStatistics()

void GDALRATRemoveStatistics | ( | GDALRasterAttributeTableH | hRAT | ) |

Remove Statistics from RAT.

This function is the same as the C++ method GDALRasterAttributeTable::RemoveStatistics()

Since
  GDAL 2.4

## ◆ GDALRATSerializeJSON()

void * GDALRATSerializeJSON | ( | GDALRasterAttributeTableH | hRAT | ) |

Serialize Raster Attribute Table in Json format.

This function is the same as the C++ method GDALRasterAttributeTable::SerializeJSON()

## ◆ GDALRATSetLinearBinning()

CPLErr GDALRATSetLinearBinning | ( | GDALRasterAttributeTableH | hRAT,
|  | double | dfRow0Min,
|  | double | dfBinSize
| ) |  |

Set linear binning information.

This function is the same as the C++ method GDALRasterAttributeTable::SetLinearBinning()

## ◆ GDALRATSetRowCount()

void GDALRATSetRowCount | ( | GDALRasterAttributeTableH | hRAT,
|  | int | nNewCount
| ) |  |

Set row count.

This function is the same as the C++ method GDALRasterAttributeTable::SetRowCount()

Parameters

  hRAT | RAT handle.
  nNewCount | the new number of rows.

## ◆ GDALRATSetTableType()

CPLErr GDALRATSetTableType | ( | GDALRasterAttributeTableH | hRAT,
|  | const GDALRATTableType | eInTableType
| ) |  |

Set RAT Table Type.

Since
  GDAL 2.4

This function is the same as the C++ method GDALRasterAttributeTable::SetTableType()

## ◆ GDALRATSetValueAsDouble()

void GDALRATSetValueAsDouble | ( | GDALRasterAttributeTableH | hRAT,
|  | int | iRow,
|  | int | iField,
|  | double | dfValue
| ) |  |

Set field value from double.

This function is the same as the C++ method GDALRasterAttributeTable::SetValue()

## ◆ GDALRATSetValueAsInt()

void GDALRATSetValueAsInt | ( | GDALRasterAttributeTableH | hRAT,
|  | int | iRow,
|  | int | iField,
|  | int | nValue
| ) |  |

Set field value from integer.

This function is the same as the C++ method GDALRasterAttributeTable::SetValue()

## ◆ GDALRATSetValueAsString()

void GDALRATSetValueAsString | ( | GDALRasterAttributeTableH | hRAT,
|  | int | iRow,
|  | int | iField,
|  | const char * | pszValue
| ) |  |

Set field value from string.

This function is the same as the C++ method GDALRasterAttributeTable::SetValue()

Parameters

  hRAT | RAT handle.
  iRow | row index.
  iField | field index.
  pszValue | value.

## ◆ GDALRATTranslateToColorTable()

GDALColorTableH GDALRATTranslateToColorTable | ( | GDALRasterAttributeTableH | hRAT,
|  | int | nEntryCount
| ) |  |

Translate to a color table.

This function is the same as the C++ method GDALRasterAttributeTable::TranslateToColorTable()

## ◆ GDALRATValuesIOAsDouble()

CPLErr GDALRATValuesIOAsDouble | ( | GDALRasterAttributeTableH | hRAT,
|  | GDALRWFlag | eRWFlag,
|  | int | iField,
|  | int | iStartRow,
|  | int | iLength,
|  | double * | pdfData
| ) |  |

Read or Write a block of doubles to/from the Attribute Table.

This function is the same as the C++ method GDALRasterAttributeTable::ValuesIO()

## ◆ GDALRATValuesIOAsInteger()

CPLErr GDALRATValuesIOAsInteger | ( | GDALRasterAttributeTableH | hRAT,
|  | GDALRWFlag | eRWFlag,
|  | int | iField,
|  | int | iStartRow,
|  | int | iLength,
|  | int * | pnData
| ) |  |

Read or Write a block of ints to/from the Attribute Table.

This function is the same as the C++ method GDALRasterAttributeTable::ValuesIO()

## ◆ GDALRATValuesIOAsString()

CPLErr GDALRATValuesIOAsString | ( | GDALRasterAttributeTableH | hRAT,
|  | GDALRWFlag | eRWFlag,
|  | int | iField,
|  | int | iStartRow,
|  | int | iLength,
|  | char ** | papszStrList
| ) |  |

Read or Write a block of strings to/from the Attribute Table.

This function is the same as the C++ method GDALRasterAttributeTable::ValuesIO()

## ◆ GDALReadBlock()

CPLErr GDALReadBlock | ( | GDALRasterBandH | hBand,
|  | int | nXOff,
|  | int | nYOff,
|  | void * | pData
| ) |  |

Read a block of image data efficiently.

See also
  GDALRasterBand::ReadBlock()

## ◆ GDALReadOziMapFile()

int GDALReadOziMapFile | ( | const char * | pszBaseFilename,
|  | double * | padfGeoTransform,
|  | char ** | ppszWKT,
|  | int * | pnGCPCount,
|  | GDAL_GCP ** | ppasGCPs
| ) |  |

Helper function for translator implementer wanting support for OZI .map.

Parameters

  pszBaseFilename | filename whose basename will help building the .map filename.
  padfGeoTransform | output geotransform. Must hold 6 doubles.
  ppszWKT | output pointer to a string that will be allocated with CPLMalloc().
  pnGCPCount | output pointer to GCP count.
  ppasGCPs | outputer pointer to an array of GCPs.

Returns
  TRUE in case of success, FALSE otherwise.

## ◆ GDALReadTabFile()

int GDALReadTabFile | ( | const char * | pszBaseFilename,
|  | double * | padfGeoTransform,
|  | char ** | ppszWKT,
|  | int * | pnGCPCount,
|  | GDAL_GCP ** | ppasGCPs
| ) |  |

Helper function for translator implementer wanting support for MapInfo .tab files.

Parameters

  pszBaseFilename | filename whose basename will help building the .tab filename.
  padfGeoTransform | output geotransform. Must hold 6 doubles.
  ppszWKT | output pointer to a string that will be allocated with CPLMalloc().
  pnGCPCount | output pointer to GCP count.
  ppasGCPs | outputer pointer to an array of GCPs.

Returns
  TRUE in case of success, FALSE otherwise.

## ◆ GDALReadWorldFile()

int GDALReadWorldFile | ( | const char * | pszBaseFilename,
|  | const char * | pszExtension,
|  | double * | padfGeoTransform
| ) |  |

Read ESRI world file.

This function reads an ESRI style world file, and formats a geotransform from its contents. It does the same as GDALLoadWorldFile() function, but it will form the filename for the worldfile from the filename of the raster file referred and the suggested extension. If no extension is provided, the code will internally try the unix style and windows style world file extensions (eg. for .tif these would be .tfw and .tifw).

The world file contains an affine transformation with the parameters in a different order than in a geotransform array.

- geotransform[1] : width of pixel
- geotransform[4] : rotational coefficient, zero for north up images.
- geotransform[2] : rotational coefficient, zero for north up images.
- geotransform[5] : height of pixel (but negative)
- geotransform[0] + 0.5 * geotransform[1] + 0.5 * geotransform[2] : x offset to center of top left pixel.
- geotransform[3] + 0.5 * geotransform[4] + 0.5 * geotransform[5] : y offset to center of top left pixel.

Parameters

  pszBaseFilename | the target raster file.
  pszExtension | the extension to use (i.e. "wld") or NULL to derive it from the pszBaseFilename
  padfGeoTransform | the six double array into which the geotransformation should be placed.

Returns
  TRUE on success or FALSE on failure.

## ◆ GDALReferenceDataset()

int GDALReferenceDataset | ( | GDALDatasetH | hDataset | ) |

Add one to dataset reference count.

See also
  GDALDataset::Reference()

## ◆ GDALRegenerateOverviews()

CPLErr GDALRegenerateOverviews | ( | GDALRasterBandH | hSrcBand,
|  | int | nOverviewCount,
|  | GDALRasterBandH * | pahOvrBands,
|  | const char * | pszResampling,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData
| ) |  |

Generate downsampled overviews.

This function will generate one or more overview images from a base image using the requested downsampling algorithm. Its primary use is for generating overviews via GDALDataset::BuildOverviews(), but it can also be used to generate downsampled images in one file from another outside the overview architecture.

The output bands need to exist in advance.

The full set of resampling algorithms is documented in GDALDataset::BuildOverviews().

This function will honour properly NODATA_VALUES tuples (special dataset metadata) so that only a given RGB triplet (in case of a RGB image) will be considered as the nodata value and not each value of the triplet independently per band.

Starting with GDAL 3.2, the GDAL_NUM_THREADS configuration option can be set to "ALL_CPUS" or a integer value to specify the number of threads to use for overview computation.

Parameters

  hSrcBand | the source (base level) band.
  nOverviewCount | the number of downsampled bands being generated.
  pahOvrBands | the list of downsampled bands to be generated.
  pszResampling | Resampling algorithm (e.g. "AVERAGE").
  pfnProgress | progress report function.
  pProgressData | progress function callback data.

Returns
  CE_None on success or CE_Failure on failure.

## ◆ GDALRegenerateOverviewsEx()

CPLErr GDALRegenerateOverviewsEx | ( | GDALRasterBandH | hSrcBand,
|  | int | nOverviewCount,
|  | GDALRasterBandH * | pahOvrBands,
|  | const char * | pszResampling,
|  | GDALProgressFunc | pfnProgress,
|  | void * | pProgressData,
|  | CSLConstList | papszOptions
| ) |  |

Generate downsampled overviews.

This function will generate one or more overview images from a base image using the requested downsampling algorithm. Its primary use is for generating overviews via GDALDataset::BuildOverviews(), but it can also be used to generate downsampled images in one file from another outside the overview architecture.

The output bands need to exist in advance.

The full set of resampling algorithms is documented in GDALDataset::BuildOverviews().

This function will honour properly NODATA_VALUES tuples (special dataset metadata) so that only a given RGB triplet (in case of a RGB image) will be considered as the nodata value and not each value of the triplet independently per band.

Starting with GDAL 3.2, the GDAL_NUM_THREADS configuration option can be set to "ALL_CPUS" or a integer value to specify the number of threads to use for overview computation.

Parameters

  hSrcBand | the source (base level) band.
  nOverviewCount | the number of downsampled bands being generated.
  pahOvrBands | the list of downsampled bands to be generated.
  pszResampling | Resampling algorithm (e.g. "AVERAGE").
  pfnProgress | progress report function.
  pProgressData | progress function callback data.
  papszOptions | NULL terminated list of options as key=value pairs, or NULL

Returns
  CE_None on success or CE_Failure on failure.

Since
  GDAL 3.6

## ◆ GDALRegisterDriver()

int GDALRegisterDriver | ( | GDALDriverH | hDriver | ) |

Register a driver for use.

See also
  GDALDriverManager::GetRegisterDriver()

## ◆ GDALRegisterPlugin()

CPLErr GDALRegisterPlugin | ( | const char * | name | ) |

Register a plugin by name, returning an error if not found.

This function will call GDALDriverManager::LoadPlugin() to register a specific plugin by name.

This method is intended to be called instead of GDALAllRegister() or GDALRegisterPlugins() when fine tuning which drivers are needed at runtime.

See also
  GDALDriverManager::LoadPlugin()
  GDALDriverManager::AutoLoadDrivers()

Since
  GDAL 3.8

## ◆ GDALRegisterPlugins()

void GDALRegisterPlugins | ( | void |  | ) |

Register drivers and support code available as a plugin.

This function will call GDALDriverManager::AutoLoadDrivers() to register all drivers or supporting code (for example VRT pixelfunctions or VSI adapters) that have not been compiled into the GDAL core but instead are made available through GDAL's plugin mechanism.

This method is intended to be called instead of GDALAllRegister() when fine tuning which drivers are needed at runtime.

See also
  GDALDriverManager::AutoLoadDrivers()

Since
  GDAL 3.8

## ◆ GDALRelationshipCreate()

GDALRelationshipH GDALRelationshipCreate | ( | const char * | pszName,
|  | const char * | pszLeftTableName,
|  | const char * | pszRightTableName,
|  | GDALRelationshipCardinality | eCardinality
| ) |  |

Creates a new relationship.

This function is the same as the C++ method GDALRelationship::GDALRelationship()

Parameters

  pszName | relationship name
  pszLeftTableName | left table name
  pszRightTableName | right table name
  eCardinality | cardinality of relationship

Returns
  a new handle that should be freed with GDALDestroyRelationship(), or NULL in case of error.

## ◆ GDALRelationshipGetBackwardPathLabel()

const char * GDALRelationshipGetBackwardPathLabel | ( | GDALRelationshipH | hRelationship | ) |

Get the label of the backward path for the relationship.

This function is the same as the C++ method GDALRelationship::GetBackwardPathLabel().

The forward and backward path labels are free-form, user-friendly strings which can be used to generate descriptions of the relationship between features from the right and left tables.

E.g. when the left table contains buildings and the right table contains furniture, the forward path label could be "contains" and the backward path label could be "is located within". A client could then generate a user friendly description string such as "fire hose 1234 is located within building 15a".

Returns
  backward path label

See also
  GDALRelationshipSetBackwardPathLabel()
  GDALRelationshipGetForwardPathLabel()

## ◆ GDALRelationshipGetCardinality()

GDALRelationshipCardinality GDALRelationshipGetCardinality | ( | GDALRelationshipH | hRelationship | ) |

Get the cardinality of the relationship.

This function is the same as the C++ method GDALRelationship::GetCardinality().

Returns
  cardinality.

## ◆ GDALRelationshipGetForwardPathLabel()

const char * GDALRelationshipGetForwardPathLabel | ( | GDALRelationshipH | hRelationship | ) |

Get the label of the forward path for the relationship.

This function is the same as the C++ method GDALRelationship::GetForwardPathLabel().

The forward and backward path labels are free-form, user-friendly strings which can be used to generate descriptions of the relationship between features from the right and left tables.

E.g. when the left table contains buildings and the right table contains furniture, the forward path label could be "contains" and the backward path label could be "is located within". A client could then generate a user friendly description string such as "fire hose 1234 is located within building 15a".

Returns
  forward path label

See also
  GDALRelationshipSetForwardPathLabel()
  GDALRelationshipGetBackwardPathLabel()

## ◆ GDALRelationshipGetLeftMappingTableFields()

char ** GDALRelationshipGetLeftMappingTableFields | ( | GDALRelationshipH | hRelationship | ) |

Get the names of the mapping table fields which correspond to the participating fields from the left table in the relationship.

This function is the same as the C++ method GDALRelationship::GetLeftMappingTableFields().

Returns
  the field names, to be freed with CSLDestroy()

See also
  GDALRelationshipGetRightMappingTableFields
  GDALRelationshipSetLeftMappingTableFields

## ◆ GDALRelationshipGetLeftTableFields()

char ** GDALRelationshipGetLeftTableFields | ( | GDALRelationshipH | hRelationship | ) |

Get the names of the participating fields from the left table in the relationship.

This function is the same as the C++ method GDALRelationship::GetLeftTableFields().

Returns
  the field names, to be freed with CSLDestroy()

See also
  GDALRelationshipGetRightTableFields
  GDALRelationshipSetLeftTableFields

## ◆ GDALRelationshipGetLeftTableName()

const char * GDALRelationshipGetLeftTableName | ( | GDALRelationshipH | hRelationship | ) |

Get the name of the left (or base/origin) table in the relationship.

This function is the same as the C++ method GDALRelationship::GetLeftTableName().

Returns
  left table name.

## ◆ GDALRelationshipGetMappingTableName()

const char * GDALRelationshipGetMappingTableName | ( | GDALRelationshipH | hRelationship | ) |

Get the name of the mapping table for many-to-many relationships.

This function is the same as the C++ method GDALRelationship::GetMappingTableName().

Returns
  mapping table name.

See also
  GDALRelationshipSetMappingTableName

## ◆ GDALRelationshipGetName()

const char * GDALRelationshipGetName | ( | GDALRelationshipH | hRelationship | ) |

Get the name of the relationship.

This function is the same as the C++ method GDALRelationship::GetName().

Returns
  name.

## ◆ GDALRelationshipGetRelatedTableType()

const char * GDALRelationshipGetRelatedTableType | ( | GDALRelationshipH | hRelationship | ) |

Get the type string of the related table.

This function is the same as the C++ method GDALRelationship::GetRelatedTableType().

This a free-form string representing the type of related features, where the exact interpretation is format dependent. For instance, table types from GeoPackage relationships will directly reflect the categories from the GeoPackage related tables extension (i.e. "media", "simple attributes", "features", "attributes" and "tiles").

Returns
  related table type

See also
  GDALRelationshipSetRelatedTableType

## ◆ GDALRelationshipGetRightMappingTableFields()

char ** GDALRelationshipGetRightMappingTableFields | ( | GDALRelationshipH | hRelationship | ) |

Get the names of the mapping table fields which correspond to the participating fields from the right table in the relationship.

This function is the same as the C++ method GDALRelationship::GetRightMappingTableFields().

Returns
  the field names, to be freed with CSLDestroy()

See also
  GDALRelationshipGetLeftMappingTableFields
  GDALRelationshipSetRightMappingTableFields

## ◆ GDALRelationshipGetRightTableFields()

char ** GDALRelationshipGetRightTableFields | ( | GDALRelationshipH | hRelationship | ) |

Get the names of the participating fields from the right table in the relationship.

This function is the same as the C++ method GDALRelationship::GetRightTableFields().

Returns
  the field names, to be freed with CSLDestroy()

See also
  GDALRelationshipGetLeftTableFields
  GDALRelationshipSetRightTableFields

## ◆ GDALRelationshipGetRightTableName()

const char * GDALRelationshipGetRightTableName | ( | GDALRelationshipH | hRelationship | ) |

Get the name of the right (or related/destination) table in the relationship.

This function is the same as the C++ method GDALRelationship::GetRightTableName().

Returns
  right table name.

## ◆ GDALRelationshipGetType()

GDALRelationshipType GDALRelationshipGetType | ( | GDALRelationshipH | hRelationship | ) |

Get the type of the relationship.

This function is the same as the C++ method GDALRelationship::GetType().

Returns
  relationship type.

See also
  GDALRelationshipSetType

## ◆ GDALRelationshipSetBackwardPathLabel()

void GDALRelationshipSetBackwardPathLabel | ( | GDALRelationshipH | hRelationship,
|  | const char * | pszLabel
| ) |  |

Sets the label of the backward path for the relationship.

This function is the same as the CPP method GDALRelationship::SetBackwardPathLabel().

The forward and backward path labels are free-form, user-friendly strings which can be used to generate descriptions of the relationship between features from the right and left tables.

E.g. when the left table contains buildings and the right table contains furniture, the forward path label could be "contains" and the backward path label could be "is located within". A client could then generate a user friendly description string such as "fire hose 1234 is located within building 15a".

Parameters

  hRelationship | handle to the relationship to apply the new label to.
  pszLabel | the label to set.

See also
  GDALRelationshipGetBackwardPathLabel
  GDALRelationshipSetForwardPathLabel

## ◆ GDALRelationshipSetForwardPathLabel()

void GDALRelationshipSetForwardPathLabel | ( | GDALRelationshipH | hRelationship,
|  | const char * | pszLabel
| ) |  |

Sets the label of the forward path for the relationship.

This function is the same as the CPP method GDALRelationship::SetForwardPathLabel().

The forward and backward path labels are free-form, user-friendly strings which can be used to generate descriptions of the relationship between features from the right and left tables.

E.g. when the left table contains buildings and the right table contains furniture, the forward path label could be "contains" and the backward path label could be "is located within". A client could then generate a user friendly description string such as "fire hose 1234 is located within building 15a".

Parameters

  hRelationship | handle to the relationship to apply the new label to.
  pszLabel | the label to set.

See also
  GDALRelationshipGetForwardPathLabel
  GDALRelationshipSetBackwardPathLabel

## ◆ GDALRelationshipSetLeftMappingTableFields()

void GDALRelationshipSetLeftMappingTableFields | ( | GDALRelationshipH | hRelationship,
|  | CSLConstList | papszFields
| ) |  |

Sets the names of the mapping table fields which correspond to the participating fields from the left table in the relationship.

This function is the same as the C++ method GDALRelationship::SetLeftMappingTableFields().

Parameters

  hRelationship | handle to the relationship to apply the left table fields to.
  papszFields | the names of the fields.

See also
  GDALRelationshipGetLeftMappingTableFields
  GDALRelationshipSetRightMappingTableFields

## ◆ GDALRelationshipSetLeftTableFields()

void GDALRelationshipSetLeftTableFields | ( | GDALRelationshipH | hRelationship,
|  | CSLConstList | papszFields
| ) |  |

Sets the names of the participating fields from the left table in the relationship.

This function is the same as the C++ method GDALRelationship::GetLeftTableFields().

Parameters

  hRelationship | handle to the relationship to apply the left table fields to.
  papszFields | the names of the fields.

See also
  GDALRelationshipGetLeftTableFields
  GDALRelationshipSetRightTableFields

## ◆ GDALRelationshipSetMappingTableName()

void GDALRelationshipSetMappingTableName | ( | GDALRelationshipH | hRelationship,
|  | const char * | pszName
| ) |  |

Sets the name of the mapping table for many-to-many relationships.

This function is the same as the CPP method GDALRelationship::SetMappingTableName().

Parameters

  hRelationship | handle to the relationship to apply the new mapping name to.
  pszName | the mapping table name to set.

See also
  GDALRelationshipGetMappingTableName

## ◆ GDALRelationshipSetRelatedTableType()

void GDALRelationshipSetRelatedTableType | ( | GDALRelationshipH | hRelationship,
|  | const char * | pszType
| ) |  |

Sets the type string of the related table.

This function is the same as the CPP method GDALRelationship::SetRelatedTableType().

This a free-form string representing the type of related features, where the exact interpretation is format dependent. For instance, table types from GeoPackage relationships will directly reflect the categories from the GeoPackage related tables extension (i.e. "media", "simple attributes", "features", "attributes" and "tiles").

Parameters

  hRelationship | handle to the relationship to apply the new type to.
  pszType | the type to set.

See also
  GDALRelationshipGetRelatedTableType

## ◆ GDALRelationshipSetRightMappingTableFields()

void GDALRelationshipSetRightMappingTableFields | ( | GDALRelationshipH | hRelationship,
|  | CSLConstList | papszFields
| ) |  |

Sets the names of the mapping table fields which correspond to the participating fields from the right table in the relationship.

This function is the same as the C++ method GDALRelationship::SetRightMappingTableFields().

Parameters

  hRelationship | handle to the relationship to apply the right table fields to.
  papszFields | the names of the fields.

See also
  GDALRelationshipGetRightMappingTableFields
  GDALRelationshipSetLeftMappingTableFields

## ◆ GDALRelationshipSetRightTableFields()

void GDALRelationshipSetRightTableFields | ( | GDALRelationshipH | hRelationship,
|  | CSLConstList | papszFields
| ) |  |

Sets the names of the participating fields from the right table in the relationship.

This function is the same as the C++ method GDALRelationship::SetRightTableFields().

Parameters

  hRelationship | handle to the relationship to apply the right table fields to.
  papszFields | the names of the fields.

See also
  GDALRelationshipGetRightTableFields
  GDALRelationshipSetLeftTableFields

## ◆ GDALRelationshipSetType()

void GDALRelationshipSetType | ( | GDALRelationshipH | hRelationship,
|  | GDALRelationshipType | eType
| ) |  |

Sets the type of the relationship.

This function is the same as the C++ method GDALRelationship::SetType().

See also
  GDALRelationshipGetType

## ◆ GDALReleaseArrays()

void GDALReleaseArrays | ( | GDALMDArrayH * | arrays,
|  | size_t | nCount
| ) |  |

Free the return of GDALMDArrayGetCoordinateVariables()

Parameters

  arrays | return pointer of above methods
  nCount | *pnCount value returned by above methods

## ◆ GDALReleaseAttributes()

void GDALReleaseAttributes | ( | GDALAttributeH * | attributes,
|  | size_t | nCount
| ) |  |

Free the return of GDALGroupGetAttributes() or GDALMDArrayGetAttributes()

Parameters

  attributes | return pointer of above methods
  nCount | *pnCount value returned by above methods

## ◆ GDALReleaseDataset()

int GDALReleaseDataset | ( | GDALDatasetH | hDataset | ) |

Drop a reference to this object, and destroy if no longer referenced.

See also
  GDALDataset::ReleaseRef()

Since
  GDAL 2.2

## ◆ GDALReleaseDimensions()

void GDALReleaseDimensions | ( | GDALDimensionH * | dims,
|  | size_t | nCount
| ) |  |

Free the return of GDALGroupGetDimensions() or GDALMDArrayGetDimensions()

Parameters

  dims | return pointer of above methods
  nCount | *pnCount value returned by above methods

## ◆ GDALRenameDataset()

CPLErr GDALRenameDataset | ( | GDALDriverH | hDriver,
|  | const char * | pszNewName,
|  | const char * | pszOldName
| ) |  |

Rename a dataset.

See also
  GDALDriver::Rename()

## ◆ GDALSetCacheMax()

void GDALSetCacheMax | ( | int | nNewSizeInBytes | ) |

Set maximum cache memory.

This function sets the maximum amount of memory that GDAL is permitted to use for GDALRasterBlock caching. The unit of the value is bytes.

The maximum value is 2GB, due to the use of a signed 32 bit integer. Use GDALSetCacheMax64() to be able to set a higher value.

Parameters

  nNewSizeInBytes | the maximum number of bytes for caching.

## ◆ GDALSetCacheMax64()

void GDALSetCacheMax64 | ( | GIntBig | nNewSizeInBytes | ) |

Set maximum cache memory.

This function sets the maximum amount of memory that GDAL is permitted to use for GDALRasterBlock caching. The unit of the value is bytes.

Note: On 32 bit platforms, the maximum amount of memory that can be addressed by a process might be 2 GB or 3 GB, depending on the operating system capabilities. This function will not make any attempt to check the consistency of the passed value with the effective capabilities of the OS.

Parameters

  nNewSizeInBytes | the maximum number of bytes for caching.

Since
  GDAL 1.8.0

## ◆ GDALSetColorEntry()

void GDALSetColorEntry | ( | GDALColorTableH | hTable,
|  | int | i,
|  | const GDALColorEntry * | poEntry
| ) |  |

Set entry in color table.

This function is the same as the C++ method GDALColorTable::SetColorEntry()

## ◆ GDALSetDefaultHistogram()

CPLErr GDALSetDefaultHistogram | ( | GDALRasterBandH | hBand,
|  | double | dfMin,
|  | double | dfMax,
|  | int | nBuckets,
|  | int * | panHistogram
| ) |  |

Set default histogram.

Use GDALSetRasterHistogramEx() instead to be able to set counts exceeding 2 billion.

See also
  GDALRasterBand::SetDefaultHistogram()
  GDALSetRasterHistogramEx()

## ◆ GDALSetDefaultHistogramEx()

CPLErr GDALSetDefaultHistogramEx | ( | GDALRasterBandH | hBand,
|  | double | dfMin,
|  | double | dfMax,
|  | int | nBuckets,
|  | GUIntBig * | panHistogram
| ) |  |

Set default histogram.

See also
  GDALRasterBand::SetDefaultHistogram()

Since
  GDAL 2.0

## ◆ GDALSetDefaultRAT()

CPLErr GDALSetDefaultRAT | ( | GDALRasterBandH | hBand,
|  | GDALRasterAttributeTableH | hRAT
| ) |  |

Set default Raster Attribute Table.

See also
  GDALRasterBand::GDALSetDefaultRAT()

## ◆ GDALSetDescription()

void GDALSetDescription | ( | GDALMajorObjectH | hObject,
|  | const char * | pszNewDesc
| ) |  |

Set object description.

See also
  GDALMajorObject::SetDescription()

## ◆ GDALSetGCPs()

CPLErr GDALSetGCPs | ( | GDALDatasetH | hDS,
|  | int | nGCPCount,
|  | const GDAL_GCP * | pasGCPList,
|  | const char * | pszGCPProjection
| ) |  |

Assign GCPs.

See also
  GDALDataset::SetGCPs(int, const GDAL_GCP*, const char*)

## ◆ GDALSetGCPs2()

CPLErr GDALSetGCPs2 | ( | GDALDatasetH | hDS,
|  | int | nGCPCount,
|  | const GDAL_GCP * | pasGCPList,
|  | OGRSpatialReferenceH | hSRS
| ) |  |

Assign GCPs.

Since
  GDAL 3.0

See also
  GDALDataset::SetGCPs(int, const GDAL_GCP*, const OGRSpatialReference*)

## ◆ GDALSetGeoTransform()

CPLErr GDALSetGeoTransform | ( | GDALDatasetH | hDS,
|  | double * | padfTransform
| ) |  |

Set the affine transformation coefficients.

See also
  GDALDataset::SetGeoTransform()

## ◆ GDALSetMetadata()

CPLErr GDALSetMetadata | ( | GDALMajorObjectH | hObject,
|  | CSLConstList | papszMD,
|  | const char * | pszDomain
| ) |  |

Set metadata.

CAUTION: when using this function on a GDALDatasetH or GDALRasterBandH, depending on the format, older values of the updated information might still be found in the file in a "ghost" state, even if no longer accessible through the GDAL API. This is for example the case of the GTiff format (this is not a exhaustive list)

See also
  GDALMajorObject::SetMetadata(), GDALDataset::SetMetadata(), GDALRasterBand::SetMetadata()

## ◆ GDALSetMetadataItem()

CPLErr GDALSetMetadataItem | ( | GDALMajorObjectH | hObject,
|  | const char * | pszName,
|  | const char * | pszValue,
|  | const char * | pszDomain
| ) |  |

Set single metadata item.

CAUTION: when using this function on a GDALDatasetH or GDALRasterBandH, depending on the format, older values of the updated information might still be found in the file in a "ghost" state, even if no longer accessible through the GDAL API. This is for example the case of the GTiff format (this is not a exhaustive list)

See also
  GDALMajorObject::SetMetadataItem(), GDALDataset::SetMetadataItem(), GDALRasterBand::SetMetadataItem()

## ◆ GDALSetProjection()

CPLErr GDALSetProjection | ( | GDALDatasetH | hDS,
|  | const char * | pszProjection
| ) |  |

Set the projection reference string for this dataset.

See also
  GDALDataset::SetProjection()

## ◆ GDALSetRasterCategoryNames()

CPLErr GDALSetRasterCategoryNames | ( | GDALRasterBandH | hBand,
|  | CSLConstList | papszNames
| ) |  |

Set the category names for this band.

See also
  GDALRasterBand::SetCategoryNames()

## ◆ GDALSetRasterColorInterpretation()

CPLErr GDALSetRasterColorInterpretation | ( | GDALRasterBandH | hBand,
|  | GDALColorInterp | eColorInterp
| ) |  |

Set color interpretation of a band.

See also
  GDALRasterBand::SetColorInterpretation()

## ◆ GDALSetRasterColorTable()

CPLErr GDALSetRasterColorTable | ( | GDALRasterBandH | hBand,
|  | GDALColorTableH | hCT
| ) |  |

Set the raster color table.

See also
  GDALRasterBand::SetColorTable()

## ◆ GDALSetRasterNoDataValue()

CPLErr GDALSetRasterNoDataValue | ( | GDALRasterBandH | hBand,
|  | double | dfValue
| ) |  |

Set the no data value for this band.

Depending on drivers, changing the no data value may or may not have an effect on the pixel values of a raster that has just been created. It is thus advised to explicitly called Fill() if the intent is to initialize the raster to the nodata value. In any case, changing an existing no data value, when one already exists and the dataset exists or has been initialized, has no effect on the pixel whose value matched the previous nodata value.

For rasters of type GDT_Int64 or GDT_UInt64, whose nodata value cannot always be represented by a double, use GDALSetRasterNoDataValueAsInt64() or GDALSetRasterNoDataValueAsUInt64() instead.

See also
  GDALRasterBand::SetNoDataValue()

## ◆ GDALSetRasterNoDataValueAsInt64()

CPLErr GDALSetRasterNoDataValueAsInt64 | ( | GDALRasterBandH | hBand,
|  | int64_t | nValue
| ) |  |

Set the no data value for this band.

This function should ONLY be called on rasters whose data type is GDT_Int64.

Depending on drivers, changing the no data value may or may not have an effect on the pixel values of a raster that has just been created. It is thus advised to explicitly called Fill() if the intent is to initialize the raster to the nodata value. In ay case, changing an existing no data value, when one already exists and the dataset exists or has been initialized, has no effect on the pixel whose value matched the previous nodata value.

See also
  GDALRasterBand::SetNoDataValueAsInt64()

Since
  GDAL 3.5

## ◆ GDALSetRasterNoDataValueAsUInt64()

CPLErr GDALSetRasterNoDataValueAsUInt64 | ( | GDALRasterBandH | hBand,
|  | uint64_t | nValue
| ) |  |

Set the no data value for this band.

This function should ONLY be called on rasters whose data type is GDT_UInt64.

Depending on drivers, changing the no data value may or may not have an effect on the pixel values of a raster that has just been created. It is thus advised to explicitly called Fill() if the intent is to initialize the raster to the nodata value. In ay case, changing an existing no data value, when one already exists and the dataset exists or has been initialized, has no effect on the pixel whose value matched the previous nodata value.

See also
  GDALRasterBand::SetNoDataValueAsUInt64()

Since
  GDAL 3.5

## ◆ GDALSetRasterOffset()

CPLErr GDALSetRasterOffset | ( | GDALRasterBandH | hBand,
|  | double | dfNewOffset
| ) |  |

Set scaling offset.

See also
  GDALRasterBand::SetOffset()

## ◆ GDALSetRasterScale()

CPLErr GDALSetRasterScale | ( | GDALRasterBandH | hBand,
|  | double | dfNewOffset
| ) |  |

Set scaling ratio.

See also
  GDALRasterBand::SetScale()

## ◆ GDALSetRasterStatistics()

CPLErr GDALSetRasterStatistics | ( | GDALRasterBandH | hBand,
|  | double | dfMin,
|  | double | dfMax,
|  | double | dfMean,
|  | double | dfStdDev
| ) |  |

Set statistics on band.

See also
  GDALRasterBand::SetStatistics()

## ◆ GDALSetRasterUnitType()

CPLErr GDALSetRasterUnitType | ( | GDALRasterBandH | hBand,
|  | const char * | pszNewValue
| ) |  |

Set unit type.

See also
  GDALRasterBand::SetUnitType()

Since
  GDAL 1.8.0

## ◆ GDALSetSpatialRef()

CPLErr GDALSetSpatialRef | ( | GDALDatasetH | hDS,
|  | OGRSpatialReferenceH | hSRS
| ) |  |

Set the spatial reference system for this dataset.

Since
  GDAL 3.0

See also
  GDALDataset::SetSpatialRef()

## ◆ GDALSubdatasetInfoGetPathComponent()

char * GDALSubdatasetInfoGetPathComponent | ( | GDALSubdatasetInfoH | hInfo | ) |

Returns the file path component of a subdataset descriptor effectively stripping the information about the subdataset and returning the "parent" dataset descriptor.

The returned string must be freed with CPLFree().

Parameters

  hInfo | Pointer to GDALSubdatasetInfo object

Note
  This method does not check if the subdataset actually exists.

Returns
  The original string with the subdataset information removed.

Since
  GDAL 3.8

## ◆ GDALSubdatasetInfoGetSubdatasetComponent()

char * GDALSubdatasetInfoGetSubdatasetComponent | ( | GDALSubdatasetInfoH | hInfo | ) |

Returns the subdataset component of a subdataset descriptor descriptor.

The returned string must be freed with CPLFree().

Parameters

  hInfo | Pointer to GDALSubdatasetInfo object

Note
  This method does not check if the subdataset actually exists.

Returns
  The subdataset name.

Since
  GDAL 3.8

## ◆ GDALSubdatasetInfoModifyPathComponent()

char * GDALSubdatasetInfoModifyPathComponent | ( | GDALSubdatasetInfoH | hInfo,
|  | const char * | pszNewPath
| ) |  |

Replaces the path component of a subdataset descriptor.

The returned string must be freed with CPLFree().

Parameters

  hInfo | Pointer to GDALSubdatasetInfo object
  pszNewPath | New path.

Note
  This method does not check if the subdataset actually exists.

Returns
  The original subdataset descriptor with the old path component replaced by newPath.

Since
  GDAL 3.8

## ◆ GDALSwapWords()

void GDALSwapWords | ( | void * | pData,
|  | int | nWordSize,
|  | int | nWordCount,
|  | int | nWordSkip
| ) |  |

Byte swap words in-place.

This function will byte swap a set of 2, 4 or 8 byte words "in place" in a memory array. No assumption is made that the words being swapped are word aligned in memory. Use the CPL_LSB and CPL_MSB macros from cpl_port.h to determine if the current platform is big endian or little endian. Use The macros like CPL_SWAP32() to byte swap single values without the overhead of a function call.

Parameters

  pData | pointer to start of data buffer.
  nWordSize | size of words being swapped in bytes. Normally 2, 4 or 8.
  nWordCount | the number of words to be swapped in this call.
  nWordSkip | the byte offset from the start of one word to the start of the next. For packed buffers this is the same as nWordSize.

## ◆ GDALSwapWordsEx()

void GDALSwapWordsEx | ( | void * | pData,
|  | int | nWordSize,
|  | size_t | nWordCount,
|  | int | nWordSkip
| ) |  |

Byte swap words in-place.

This function will byte swap a set of 2, 4 or 8 byte words "in place" in a memory array. No assumption is made that the words being swapped are word aligned in memory. Use the CPL_LSB and CPL_MSB macros from cpl_port.h to determine if the current platform is big endian or little endian. Use The macros like CPL_SWAP32() to byte swap single values without the overhead of a function call.

Parameters

  pData | pointer to start of data buffer.
  nWordSize | size of words being swapped in bytes. Normally 2, 4 or 8.
  nWordCount | the number of words to be swapped in this call.
  nWordSkip | the byte offset from the start of one word to the start of the next. For packed buffers this is the same as nWordSize.

Since
  GDAL 2.1

## ◆ GDALValidateCreationOptions()

int GDALValidateCreationOptions | ( | GDALDriverH | hDriver,
|  | CSLConstList | papszCreationOptions
| ) |  |

Validate the list of creation options that are handled by a driver.

This is a helper method primarily used by Create() and CreateCopy() to validate that the passed in list of creation options is compatible with the GDAL_DMD_CREATIONOPTIONLIST metadata item defined by some drivers.

See also
  GDALGetDriverCreationOptionList()

If the GDAL_DMD_CREATIONOPTIONLIST metadata item is not defined, this function will return TRUE. Otherwise it will check that the keys and values in the list of creation options are compatible with the capabilities declared by the GDAL_DMD_CREATIONOPTIONLIST metadata item. In case of incompatibility a (non fatal) warning will be emitted and FALSE will be returned.

Parameters

  hDriver | the handle of the driver with whom the lists of creation option must be validated
  papszCreationOptions | the list of creation options. An array of strings, whose last element is a NULL pointer

Returns
  TRUE if the list of creation options is compatible with the Create() and CreateCopy() method of the driver, FALSE otherwise.

## ◆ GDALVersionInfo()

const char * GDALVersionInfo | ( | const char * | pszRequest | ) |

Get runtime version information.

Available pszRequest values:

- "VERSION_NUM": Returns GDAL_VERSION_NUM formatted as a string. i.e. "30603000", e.g for GDAL 3.6.3.0
- "RELEASE_DATE": Returns GDAL_RELEASE_DATE formatted as a string. i.e. "20230312".
- "RELEASE_NAME": Returns the GDAL_RELEASE_NAME. ie. "3.6.3"
- "--version": Returns one line version message suitable for use in response to –version requests. i.e. "GDAL 3.6.3, released 2023/03/12"
- "LICENSE": Returns the content of the LICENSE.TXT file from the GDAL_DATA directory.
- "BUILD_INFO": List of NAME=VALUE pairs separated by newlines with information on build time options.

Parameters

  pszRequest | the type of version info desired, as listed above.

Returns
  an internal string containing the requested information.

## ◆ GDALVRTRegisterProcessedDatasetFunc()

CPLErr GDALVRTRegisterProcessedDatasetFunc | ( | const char * | pszFuncName,
|  | void * | pUserData,
|  | const char * | pszXMLMetadata,
|  | GDALDataType | eRequestedInputDT,
|  | const GDALDataType * | paeSupportedInputDT,
|  | size_t | nSupportedInputDTSize,
|  | const int * | panSupportedInputBandCount,
|  | size_t | nSupportedInputBandCountSize,
|  | GDALVRTProcessedDatasetFuncInit | pfnInit,
|  | GDALVRTProcessedDatasetFuncFree | pfnFree,
|  | GDALVRTProcessedDatasetFuncProcess | pfnProcess,
|  | CSLConstList | papszOptions
| ) |  |

Register a function to be used by VRTProcessedDataset.

An example of content for pszXMLMetadata is:

     <ProcessedDatasetFunctionArgumentsList>
        <Argument name='src_nodata' type='double' description='Override input nodata value'/>
        <Argument name='dst_nodata' type='double' description='Override output nodata value'/>
        <Argument name='replacement_nodata' description='value to substitute to a valid computed value that would be nodata' type='double'/>
        <Argument name='dst_intended_datatype' type='string' description='Intented datatype of output (which might be different than the working data type)'/>
        <Argument name='coefficients_{band}' description='Comma-separated coefficients for combining bands. First one is constant term' type='double_list' required='true'/>
     </ProcessedDatasetFunctionArgumentsList>

Parameters

  pszFuncName | Function name. Must be unique and not null.
  pUserData | User data. May be nullptr. Must remain valid during the lifetime of GDAL.
  pszXMLMetadata | XML metadata describing the function arguments. May be nullptr if there are no arguments.
  eRequestedInputDT | If the pfnProcess callback only supports a single data type, it should be specified in this parameter. Otherwise set it to GDT_Unknown.
  paeSupportedInputDT | List of supported input data types. May be nullptr if all are supported or if eRequestedInputDT is set to a non GDT_Unknown value.
  nSupportedInputDTSize | Size of paeSupportedInputDT
  panSupportedInputBandCount | List of supported band count. May be nullptr if any source band count is supported.
  nSupportedInputBandCountSize | Size of panSupportedInputBandCount
  pfnInit | Initialization function called when a VRTProcessedDataset step uses the register function. This initialization function will return the output data type, output band count and potentially initialize a working structure, typically parsing arguments. May be nullptr. If not specified, it will be assumed that the input and output data types are the same, and that the input number of bands and output number of bands are the same.
  pfnFree | Free function that will free the working structure allocated by pfnInit. May be nullptr.
  pfnProcess | Processing function called to compute pixel values. Must not be nullptr.
  papszOptions | Unused currently. Must be nullptr.

Returns
  CE_None in case of success, error otherwise.

Since
  3.9

## ◆ GDALWriteBlock()

CPLErr GDALWriteBlock | ( | GDALRasterBandH | hBand,
|  | int | nXOff,
|  | int | nYOff,
|  | void * | pData
| ) |  |

Write a block of image data efficiently.

See also
  GDALRasterBand::WriteBlock()

## ◆ GDALWriteWorldFile()

int GDALWriteWorldFile | ( | const char * | pszBaseFilename,
|  | const char * | pszExtension,
|  | double * | padfGeoTransform
| ) |  |

Write ESRI world file.

This function writes an ESRI style world file from the passed geotransform.

The world file contains an affine transformation with the parameters in a different order than in a geotransform array.

- geotransform[1] : width of pixel
- geotransform[4] : rotational coefficient, zero for north up images.
- geotransform[2] : rotational coefficient, zero for north up images.
- geotransform[5] : height of pixel (but negative)
- geotransform[0] + 0.5 * geotransform[1] + 0.5 * geotransform[2] : x offset to center of top left pixel.
- geotransform[3] + 0.5 * geotransform[4] + 0.5 * geotransform[5] : y offset to center of top left pixel.

Parameters

  pszBaseFilename | the target raster file.
  pszExtension | the extension to use (i.e. "wld"). Must not be NULL
  padfGeoTransform | the six double array from which the geotransformation should be read.

Returns
  TRUE on success or FALSE on failure.

## ◆ OGR_L_GetDataset()

GDALDatasetH OGR_L_GetDataset | ( | OGRLayerH | hLayer | ) |

Return the dataset associated with this layer.

As of GDAL 3.9, GetDataset() is implemented on all in-tree drivers that have CreateLayer() capability. It may not be implemented in read-only drivers or out-of-tree drivers.

It is currently only used by the GetRecordBatchSchema() method to retrieve the field domain associated with a field, to fill the dictionary field of a struct ArrowSchema. It is also used by CreateFieldFromArrowSchema() to determine which field types and subtypes are supported by the layer, by inspecting the driver metadata, and potentially use fallback types when needed.

This function is the same as the C++ method OGRLayer::GetDataset().

Returns
  dataset, or nullptr when unknown.

Since
  GDAL 3.9