gdal.h File Reference

#include "gdal_version.h"
#include "cpl_port.h"
#include "cpl_error.h"

Go to the source code of this file.

Classes

struct  GDALOptionDefinition
struct  GDAL_GCP
struct  GDALRPCInfo
struct  GDALColorEntry

Defines

#define GDALMD_AREA_OR_POINT   "AREA_OR_POINT"
#define GDALMD_AOP_AREA   "Area"
#define GDALMD_AOP_POINT   "Point"
#define CPLE_WrongFormat   200
#define GDAL_DMD_LONGNAME   "DMD_LONGNAME"
#define GDAL_DMD_HELPTOPIC   "DMD_HELPTOPIC"
#define GDAL_DMD_MIMETYPE   "DMD_MIMETYPE"
#define GDAL_DMD_EXTENSION   "DMD_EXTENSION"
#define GDAL_DMD_CREATIONOPTIONLIST   "DMD_CREATIONOPTIONLIST"
#define GDAL_DMD_CREATIONDATATYPES   "DMD_CREATIONDATATYPES"
#define GDAL_DCAP_CREATE   "DCAP_CREATE"
#define GDAL_DCAP_CREATECOPY   "DCAP_CREATECOPY"
#define GDAL_DCAP_VIRTUALIO   "DCAP_VIRTUALIO"
#define SRCVAL(papoSource, eSrcType, ii)
#define GMF_ALL_VALID   0x01
#define GMF_PER_DATASET   0x02
#define GMF_ALPHA   0x04
#define GMF_NODATA   0x08
#define GDAL_CHECK_VERSION(pszCallingComponentName)   GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName)

Typedefs

typedef void * GDALMajorObjectH
typedef void * GDALDatasetH
typedef void * GDALRasterBandH
typedef void * GDALDriverH
typedef void * GDALProjDefH
typedef void * GDALColorTableH
typedef void * GDALRasterAttributeTableH
typedef const char void *int GDALDummyProgress (double, const char *, void *)
typedef CPLErr(*) GDALDerivedPixelFunc (void **papoSources, int nSources, void *pData, int nBufXSize, int nBufYSize, GDALDataType eSrcType, GDALDataType eBufType, int nPixelSpace, int nLineSpace)

Enumerations

enum  GDALDataType {
  GDT_Unknown = 0, GDT_Byte = 1, GDT_UInt16 = 2, GDT_Int16 = 3,
  GDT_UInt32 = 4, GDT_Int32 = 5, GDT_Float32 = 6, GDT_Float64 = 7,
  GDT_CInt16 = 8, GDT_CInt32 = 9, GDT_CFloat32 = 10, GDT_CFloat64 = 11,
  GDT_TypeCount = 12
}
enum  GDALAccess { GA_ReadOnly = 0, GA_Update = 1 }
enum  GDALRWFlag { GF_Read = 0, GF_Write = 1 }
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  GDALRATFieldType { GFT_Integer, GFT_Real, GFT_String }
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
}

Functions

int GDALGetDataTypeSize (GDALDataType)
int GDALDataTypeIsComplex (GDALDataType)
const char * GDALGetDataTypeName (GDALDataType)
GDALDataType GDALGetDataTypeByName (const char *)
GDALDataType GDALDataTypeUnion (GDALDataType, GDALDataType)
const char * GDALGetColorInterpretationName (GDALColorInterp)
const char * GDALGetPaletteInterpretationName (GDALPaletteInterp)
typedef int (1 *GDALProgressFunc)(double
int GDALTermProgress (double, const char *, void *)
int GDALScaledProgress (double, const char *, void *)
void * GDALCreateScaledProgress (double, double, GDALProgressFunc, void *)
void GDALDestroyScaledProgress (void *)
void GDALAllRegister (void)
GDALDatasetH GDALCreate (GDALDriverH hDriver, const char *, int, int, int, GDALDataType, char **)
GDALDatasetH GDALCreateCopy (GDALDriverH, const char *, GDALDatasetH, int, char **, GDALProgressFunc, void *)
GDALDriverH GDALIdentifyDriver (const char *pszFilename, char **papszFileList)
GDALDatasetH GDALOpen (const char *pszFilename, GDALAccess eAccess)
GDALDatasetH GDALOpenShared (const char *, GDALAccess)
int GDALDumpOpenDatasets (FILE *)
GDALDriverH GDALGetDriverByName (const char *)
int GDALGetDriverCount (void)
GDALDriverH GDALGetDriver (int)
void GDALDestroyDriver (GDALDriverH)
int GDALRegisterDriver (GDALDriverH)
void GDALDeregisterDriver (GDALDriverH)
void GDALDestroyDriverManager (void)
CPLErr GDALDeleteDataset (GDALDriverH, const char *)
CPLErr GDALRenameDataset (GDALDriverH, const char *pszNewName, const char *pszOldName)
CPLErr GDALCopyDatasetFiles (GDALDriverH, const char *pszNewName, const char *pszOldName)
int GDALValidateCreationOptions (GDALDriverH, char **papszCreationOptions)
const char * GDALGetDriverShortName (GDALDriverH)
const char * GDALGetDriverLongName (GDALDriverH)
const char * GDALGetDriverHelpTopic (GDALDriverH)
const char * GDALGetDriverCreationOptionList (GDALDriverH)
void GDALInitGCPs (int, GDAL_GCP *)
void GDALDeinitGCPs (int, GDAL_GCP *)
GDAL_GCPGDALDuplicateGCPs (int, const GDAL_GCP *)
int GDALGCPsToGeoTransform (int nGCPCount, const GDAL_GCP *pasGCPs, double *padfGeoTransform, int bApproxOK)
int GDALInvGeoTransform (double *padfGeoTransformIn, double *padfInvGeoTransformOut)
void GDALApplyGeoTransform (double *, double, double, double *, double *)
char ** GDALGetMetadata (GDALMajorObjectH, const char *)
CPLErr GDALSetMetadata (GDALMajorObjectH, char **, const char *)
const char * GDALGetMetadataItem (GDALMajorObjectH, const char *, const char *)
CPLErr GDALSetMetadataItem (GDALMajorObjectH, const char *, const char *, const char *)
const char * GDALGetDescription (GDALMajorObjectH)
void GDALSetDescription (GDALMajorObjectH, const char *)
GDALDriverH GDALGetDatasetDriver (GDALDatasetH)
char ** GDALGetFileList (GDALDatasetH)
void GDALClose (GDALDatasetH)
int GDALGetRasterXSize (GDALDatasetH)
int GDALGetRasterYSize (GDALDatasetH)
int GDALGetRasterCount (GDALDatasetH)
GDALRasterBandH GDALGetRasterBand (GDALDatasetH, int)
CPLErr GDALAddBand (GDALDatasetH hDS, GDALDataType eType, char **papszOptions)
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)
CPLErr GDALDatasetAdviseRead (GDALDatasetH hDS, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, int nBXSize, int nBYSize, GDALDataType eBDataType, int nBandCount, int *panBandCount, char **papszOptions)
const char * GDALGetProjectionRef (GDALDatasetH)
CPLErr GDALSetProjection (GDALDatasetH, const char *)
CPLErr GDALGetGeoTransform (GDALDatasetH, double *)
CPLErr GDALSetGeoTransform (GDALDatasetH, double *)
int GDALGetGCPCount (GDALDatasetH)
const char * GDALGetGCPProjection (GDALDatasetH)
const GDAL_GCPGDALGetGCPs (GDALDatasetH)
CPLErr GDALSetGCPs (GDALDatasetH, int, const GDAL_GCP *, const char *)
void * GDALGetInternalHandle (GDALDatasetH, const char *)
int GDALReferenceDataset (GDALDatasetH)
int GDALDereferenceDataset (GDALDatasetH)
CPLErr GDALBuildOverviews (GDALDatasetH, const char *, int, int *, int, int *, GDALProgressFunc, void *)
void GDALGetOpenDatasets (GDALDatasetH **hDS, int *pnCount)
int GDALGetAccess (GDALDatasetH hDS)
void GDALFlushCache (GDALDatasetH hDS)
CPLErr GDALCreateDatasetMaskBand (GDALDatasetH hDS, int nFlags)
CPLErr GDALDatasetCopyWholeRaster (GDALDatasetH hSrcDS, GDALDatasetH hDstDS, char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressData)
CPLErr GDALRegenerateOverviews (GDALRasterBandH hSrcBand, int nOverviewCount, GDALRasterBandH *pahOverviewBands, const char *pszResampling, GDALProgressFunc pfnProgress, void *pProgressData)
GDALDataType GDALGetRasterDataType (GDALRasterBandH)
void GDALGetBlockSize (GDALRasterBandH, int *pnXSize, int *pnYSize)
CPLErr GDALRasterAdviseRead (GDALRasterBandH hRB, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, int nBXSize, int nBYSize, GDALDataType eBDataType, char **papszOptions)
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)
CPLErr GDALReadBlock (GDALRasterBandH, int, int, void *)
CPLErr GDALWriteBlock (GDALRasterBandH, int, int, void *)
int GDALGetRasterBandXSize (GDALRasterBandH)
int GDALGetRasterBandYSize (GDALRasterBandH)
GDALAccess GDALGetRasterAccess (GDALRasterBandH)
int GDALGetBandNumber (GDALRasterBandH)
GDALDatasetH GDALGetBandDataset (GDALRasterBandH)
GDALColorInterp GDALGetRasterColorInterpretation (GDALRasterBandH)
CPLErr GDALSetRasterColorInterpretation (GDALRasterBandH, GDALColorInterp)
GDALColorTableH GDALGetRasterColorTable (GDALRasterBandH)
CPLErr GDALSetRasterColorTable (GDALRasterBandH, GDALColorTableH)
int GDALHasArbitraryOverviews (GDALRasterBandH)
int GDALGetOverviewCount (GDALRasterBandH)
GDALRasterBandH GDALGetOverview (GDALRasterBandH, int)
double GDALGetRasterNoDataValue (GDALRasterBandH, int *)
CPLErr GDALSetRasterNoDataValue (GDALRasterBandH, double)
char ** GDALGetRasterCategoryNames (GDALRasterBandH)
CPLErr GDALSetRasterCategoryNames (GDALRasterBandH, char **)
double GDALGetRasterMinimum (GDALRasterBandH, int *pbSuccess)
double GDALGetRasterMaximum (GDALRasterBandH, int *pbSuccess)
CPLErr GDALGetRasterStatistics (GDALRasterBandH, int bApproxOK, int bForce, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev)
CPLErr GDALComputeRasterStatistics (GDALRasterBandH, int bApproxOK, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev, GDALProgressFunc pfnProgress, void *pProgressData)
CPLErr GDALSetRasterStatistics (GDALRasterBandH hBand, double dfMin, double dfMax, double dfMean, double dfStdDev)
const char * GDALGetRasterUnitType (GDALRasterBandH)
double GDALGetRasterOffset (GDALRasterBandH, int *pbSuccess)
CPLErr GDALSetRasterOffset (GDALRasterBandH hBand, double dfNewOffset)
double GDALGetRasterScale (GDALRasterBandH, int *pbSuccess)
CPLErr GDALSetRasterScale (GDALRasterBandH hBand, double dfNewOffset)
void GDALComputeRasterMinMax (GDALRasterBandH hBand, int bApproxOK, double adfMinMax[2])
CPLErr GDALFlushRasterCache (GDALRasterBandH hBand)
CPLErr GDALGetRasterHistogram (GDALRasterBandH hBand, double dfMin, double dfMax, int nBuckets, int *panHistogram, int bIncludeOutOfRange, int bApproxOK, GDALProgressFunc pfnProgress, void *pProgressData)
CPLErr GDALGetDefaultHistogram (GDALRasterBandH hBand, double *pdfMin, double *pdfMax, int *pnBuckets, int **ppanHistogram, int bForce, GDALProgressFunc pfnProgress, void *pProgressData)
CPLErr GDALSetDefaultHistogram (GDALRasterBandH hBand, double dfMin, double dfMax, int nBuckets, int *panHistogram)
int GDALGetRandomRasterSample (GDALRasterBandH, int, float *)
GDALRasterBandH GDALGetRasterSampleOverview (GDALRasterBandH, int)
CPLErr GDALFillRaster (GDALRasterBandH hBand, double dfRealValue, double dfImaginaryValue)
CPLErr GDALComputeBandStats (GDALRasterBandH hBand, int nSampleStep, double *pdfMean, double *pdfStdDev, GDALProgressFunc pfnProgress, void *pProgressData)
CPLErr GDALOverviewMagnitudeCorrection (GDALRasterBandH hBaseBand, int nOverviewCount, GDALRasterBandH *pahOverviews, GDALProgressFunc pfnProgress, void *pProgressData)
GDALRasterAttributeTableH GDALGetDefaultRAT (GDALRasterBandH hBand)
CPLErr GDALSetDefaultRAT (GDALRasterBandH, GDALRasterAttributeTableH)
CPLErr GDALAddDerivedBandPixelFunc (const char *pszName, GDALDerivedPixelFunc pfnPixelFunc)
GDALRasterBandH GDALGetMaskBand (GDALRasterBandH hBand)
int GDALGetMaskFlags (GDALRasterBandH hBand)
CPLErr GDALCreateMaskBand (GDALRasterBandH hBand, int nFlags)
int GDALGeneralCmdLineProcessor (int nArgc, char ***ppapszArgv, int nOptions)
void GDALSwapWords (void *pData, int nWordSize, int nWordCount, int nWordSkip)
void GDALCopyWords (void *pSrcData, GDALDataType eSrcType, int nSrcPixelOffset, void *pDstData, GDALDataType eDstType, int nDstPixelOffset, int nWordCount)
void GDALCopyBits (const GByte *pabySrcData, int nSrcOffset, int nSrcStep, GByte *pabyDstData, int nDstOffset, int nDstStep, int nBitCount, int nStepCount)
int GDALLoadWorldFile (const char *, double *)
int GDALReadWorldFile (const char *, const char *, double *)
int GDALWriteWorldFile (const char *, const char *, double *)
int GDALLoadTabFile (const char *, double *, char **, int *, GDAL_GCP **)
int GDALReadTabFile (const char *, double *, char **, int *, GDAL_GCP **)
char ** GDALLoadRPBFile (const char *pszFilename, char **papszSiblingFiles)
CPLErr GDALWriteRPBFile (const char *pszFilename, char **papszMD)
char ** GDALLoadIMDFile (const char *pszFilename, char **papszSiblingFiles)
CPLErr GDALWriteIMDFile (const char *pszFilename, char **papszMD)
const char * GDALDecToDMS (double, const char *, int)
double GDALPackedDMSToDec (double)
double GDALDecToPackedDMS (double)
const char * GDALVersionInfo (const char *)
int GDALCheckVersion (int nVersionMajor, int nVersionMinor, const char *pszCallingComponentName)
int GDALExtractRPCInfo (char **, GDALRPCInfo *)
GDALColorTableH GDALCreateColorTable (GDALPaletteInterp)
void GDALDestroyColorTable (GDALColorTableH)
GDALColorTableH GDALCloneColorTable (GDALColorTableH)
GDALPaletteInterp GDALGetPaletteInterpretation (GDALColorTableH)
int GDALGetColorEntryCount (GDALColorTableH)
const GDALColorEntryGDALGetColorEntry (GDALColorTableH, int)
int GDALGetColorEntryAsRGB (GDALColorTableH, int, GDALColorEntry *)
void GDALSetColorEntry (GDALColorTableH, int, const GDALColorEntry *)
void GDALCreateColorRamp (GDALColorTableH hTable, int nStartIndex, const GDALColorEntry *psStartColor, int nEndIndex, const GDALColorEntry *psEndColor)
GDALRasterAttributeTableH GDALCreateRasterAttributeTable (void)
void GDALDestroyRasterAttributeTable (GDALRasterAttributeTableH)
int GDALRATGetColumnCount (GDALRasterAttributeTableH)
const char * GDALRATGetNameOfCol (GDALRasterAttributeTableH, int)
GDALRATFieldUsage GDALRATGetUsageOfCol (GDALRasterAttributeTableH, int)
GDALRATFieldType GDALRATGetTypeOfCol (GDALRasterAttributeTableH, int)
int GDALRATGetColOfUsage (GDALRasterAttributeTableH, GDALRATFieldUsage)
int GDALRATGetRowCount (GDALRasterAttributeTableH)
const char * GDALRATGetValueAsString (GDALRasterAttributeTableH, int, int)
int GDALRATGetValueAsInt (GDALRasterAttributeTableH, int, int)
double GDALRATGetValueAsDouble (GDALRasterAttributeTableH, int, int)
void GDALRATSetValueAsString (GDALRasterAttributeTableH, int, int, const char *)
void GDALRATSetValueAsInt (GDALRasterAttributeTableH, int, int, int)
void GDALRATSetValueAsDouble (GDALRasterAttributeTableH, int, int, double)
void GDALRATSetRowCount (GDALRasterAttributeTableH, int)
CPLErr GDALRATCreateColumn (GDALRasterAttributeTableH, const char *, GDALRATFieldType, GDALRATFieldUsage)
CPLErr GDALRATSetLinearBinning (GDALRasterAttributeTableH, double, double)
int GDALRATGetLinearBinning (GDALRasterAttributeTableH, double *, double *)
CPLErr GDALRATInitializeFromColorTable (GDALRasterAttributeTableH, GDALColorTableH)
GDALColorTableH GDALRATTranslateToColorTable (int nEntryCount)
void GDALRATDumpReadable (GDALRasterAttributeTableH, FILE *)
GDALRasterAttributeTableH GDALRATClone (GDALRasterAttributeTableH)
int GDALRATGetRowOfValue (GDALRasterAttributeTableH, double)
void GDALSetCacheMax (int nBytes)
int GDALGetCacheMax (void)
int GDALGetCacheUsed (void)
int GDALFlushCacheBlock (void)


Detailed Description

Public (C callable) GDAL entry points.

Define Documentation

#define GDAL_CHECK_VERSION ( pszCallingComponentName   )     GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName)

Helper macro for GDALCheckVersion

#define SRCVAL ( papoSource,
eSrcType,
ii   ) 

Value:

(eSrcType == GDT_Byte ? \
          ((GByte *)papoSource)[ii] : \
      (eSrcType == GDT_Float32 ? \
          ((float *)papoSource)[ii] : \
      (eSrcType == GDT_Float64 ? \
          ((double *)papoSource)[ii] : \
      (eSrcType == GDT_Int32 ? \
          ((GInt32 *)papoSource)[ii] : \
      (eSrcType == GDT_UInt16 ? \
          ((GUInt16 *)papoSource)[ii] : \
      (eSrcType == GDT_Int16 ? \
          ((GInt16 *)papoSource)[ii] : \
      (eSrcType == GDT_UInt32 ? \
          ((GUInt32 *)papoSource)[ii] : \
      (eSrcType == GDT_CInt16 ? \
          ((GInt16 *)papoSource)[ii * 2] : \
      (eSrcType == GDT_CInt32 ? \
          ((GInt32 *)papoSource)[ii * 2] : \
      (eSrcType == GDT_CFloat32 ? \
          ((float *)papoSource)[ii * 2] : \
      (eSrcType == GDT_CFloat64 ? \
          ((double *)papoSource)[ii * 2] : 0)))))))))))
SRCVAL - Macro which may be used by pixel functions to obtain a pixel from a source buffer.


Enumeration Type Documentation

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.

enum GDALColorInterp

Types of color interpretation for raster bands.

Enumerator:
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 CMLY image
GCI_YCbCr_YBand  Y Luminance
GCI_YCbCr_CbBand  Cb Chroma
GCI_YCbCr_CrBand  Cr Chroma
GCI_Max  Max current value

enum GDALDataType

Pixel data types

Enumerator:
GDT_Byte  Eight bit unsigned integer
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_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

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)

enum GDALRATFieldType

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

enum GDALRATFieldUsage

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

enum GDALRWFlag

Read/Write flag for RasterIO() method

Enumerator:
GF_Read  Read data
GF_Write  Write data


Function Documentation

CPLErr GDALAddBand ( GDALDatasetH  hDataset,
GDALDataType  eType,
char **  papszOptions 
)

See also:
GDALDataset::AddBand().

CPLErr GDALAddDerivedBandPixelFunc ( const char *  pszFuncName,
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:
pszFuncName 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.

void GDALAllRegister ( void   ) 

Register all known configured GDAL drivers.

This function will drive any of the following that are configured into GDAL. Possible others as well that haven't been updated in this documentation:

void GDALApplyGeoTransform ( 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 GeoX (easting/longitude) location is placed.
*pdfGeoY output location where GeoX (northing/latitude) location is placed.

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

See also:
GDALDataset::BuildOverviews()

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 primarly intented 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 mentionning the name of the calling component.

void 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 *".

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

Compute the min/max values for a band.

If approximate is OK, then the band's GetMinimum()/GetMaximum() will be trusted. If it doesn't work, a subsample of blocks will be read to get an approximate min/max. If the band has a nodata value it will be excluded from the minimum and maximum.

If bApprox is FALSE, then all pixels will be read and used to compute an exact range.

This method is the same as the method GDALRasterBand::ComputeRasterMinMax().

Parameters:
hBand the band to operate on.
bApproxOK TRUE if an approximate (faster) answer is OK, otherwise FALSE.
adfMinMax the array in which the minimum (adfMinMax[0]) and the maximum (adfMinMax[1]) are returned.
Returns:
CE_None on success or CE_Failure on failure.

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 bitswise 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 (ie. 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.

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

See also:
GDALDriver::CopyFiles()

void GDALCopyWords ( void *  pSrcData,
GDALDataType  eSrcType,
int  nSrcPixelOffset,
void *  pDstData,
GDALDataType  eDstType,
int  nDstPixelOffset,
int  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. Assigment from complex to non-complex will result in the complex portion being lost and the real component being preserved (not magnitidue!).

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

Parameters:
pSrcData