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)
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 hBand, int nFlags)
CPLErr GDALDatasetCopyWholeRaster (GDALDatasetH hSrcDS, GDALDatasetH hDstDS, char **papszOptions, 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 GDALReadWorldFile (const char *pszBaseFilename, const char *pszExtension, double *padfGeoTransform)
int GDALWriteWorldFile (const char *pszBaseFilename, const char *pszExtension, double *padfGeoTransform)
int GDALReadTabFile (const char *pszBaseFilename, double *padfGeoTransform, char **ppszWKT, int *pnGCPCount, GDAL_GCP **ppasGCPs)
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.

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

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

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)

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

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().

References GDALAddBand().

Referenced by GDALAddBand().

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:

  • GeoTIFF (GTiff)
  • Geosoft GXF (GXF)
  • Erdas Imagine (HFA)
  • CEOS (CEOS)
  • ELAS (ELAS)
  • Arc/Info Binary Grid (AIGrid)
  • SDTS Raster DEM (SDTS)
  • OGDI (OGDI)
  • ESRI Labelled BIL (EHdr)
  • PCI .aux Labelled Raw Raster (PAux)
  • HDF4 Hierachal Data Format Release 4
  • HDF5 Hierachal Data Format Release 5
  • GSAG Golden Software ASCII Grid
  • GSBG Golden Software Binary Grid

References GDALDriverManager::AutoLoadDrivers(), GDALDriverManager::AutoSkipDrivers(), and GDALAllRegister().

Referenced by GDALAllRegister().

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.

References GDALApplyGeoTransform().

Referenced by GDALApplyGeoTransform().

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

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.

References GDALCheckVersion().

Referenced by GDALCheckVersion().

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

References GDALDataset::Dereference(), and GDALClose().

Referenced by GDALDriver::CopyFiles(), GDALDriver::Delete(), GDALClose(), and GDALDriver::Rename().

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.

Parameters:
hBand the band to copmute the range for.
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.

References GDALComputeRasterMinMax(), GDALGetRasterMaximum(), GDALGetRasterMinimum(), GDALGetRasterSampleOverview(), GDT_Byte, GDT_CFloat32, GDT_CFloat64, GDT_CInt16, GDT_CInt32, GDT_Float32, GDT_Float64, GDT_Int16, GDT_Int32, GDT_UInt16, GDT_UInt32, GDALRasterBand::GetBlockSize(), GDALRasterBand::GetLockedBlockRef(), GDALRasterBand::GetNoDataValue(), GDALRasterBand::GetXSize(), and GDALRasterBand::GetYSize().

Referenced by GDALComputeRasterMinMax().

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.

References GDALCopyBits().

Referenced by GDALCopyBits().

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

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 

References GDALCopyWords(), GDALGetDataTypeSize(), GDT_Byte, GDT_CFloat32, GDT_CFloat64, GDT_CInt16, GDT_CInt32, GDT_Float32, GDT_Float64, GDT_Int16, GDT_Int32, GDT_UInt16, and GDT_UInt32.

Referenced by GDALRasterBand::Fill(), GDALCopyWords(), and GDALWarpOperation::WarpRegion().

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

See also:
GDALDriver::Create()

References GDALCreate().

Referenced by GDALCreate().

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

See also:
GDALDriver::CreateCopy()

References GDALCreateCopy().

Referenced by GDALCreateCopy().

void* GDALCreateScaledProgress ( double  dfMin,
double  dfMax,
GDALProgressFunc  pfnProgress,
void *  pData 
)

Create scaled progress transformer.

Sometimes when an operations wants to report progress it actually invokes several subprocesses which also take GDALProgressFunc()s, and it is desirable to map the progress of each sub operation into a portion of 0.0 to 1.0 progress of the overall process. The scaled progress function can be used for this.

For each subsection a scaled progress function is created and instead of passing the overall progress func down to the sub functions, the GDALScaledProgress() function is passed instead.

Parameters:
dfMin the value to which 0.0 in the sub operation is mapped.
dfMax the value to which 1.0 is the sub operation is mapped.
pfnProgress the overall progress function.
pData the overall progress function callback data.
Returns:
pointer to pass as pProgressArg to sub functions. Should be freed with GDALDestroyScaledProgress().
Example:

   int MyOperation( ..., GDALProgressFunc pfnProgress, void *pProgressData );

   {
       void *pScaledProgress;

       pScaledProgress = GDALCreateScaledProgress( 0.0, 0.5, pfnProgress, 
                                                   pProgressData );
       GDALDoLongSlowOperation( ..., GDALScaledProgress, pScaledProgress );
       GDALDestroyScaledProgress( pScaledProgress );

       pScaledProgress = GDALCreateScaledProgress( 0.5, 1.0, pfnProgress, 
                                                   pProgressData );
       GDALDoAnotherOperation( ..., GDALScaledProgress, pScaledProgress );
       GDALDestroyScaledProgress( pScaledProgress );

       return ...;
   }

References GDALCreateScaledProgress().

Referenced by GDALCreateScaledProgress().

CPLErr GDALDatasetCopyWholeRaster ( GDALDatasetH  hSrcDS,
GDALDatasetH  hDstDS,
char **  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 is "INTERLEAVE=PIXEL" to force pixel interleaved operation. 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.

References GDALDatasetCopyWholeRaster(), GDALGetDataTypeSize(), GDALRasterBand::GetBlockSize(), GDALMajorObject::GetMetadataItem(), GDALDataset::GetRasterBand(), GDALDataset::GetRasterCount(), GDALRasterBand::GetRasterDataType(), GDALDataset::GetRasterXSize(), GDALDataset::GetRasterYSize(), GF_Read, GF_Write, and GDALDataset::RasterIO().

Referenced by GDALDatasetCopyWholeRaster().

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 
)

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.

References GDALDataTypeIsComplex(), GDT_CFloat32, GDT_CFloat64, GDT_CInt16, and GDT_CInt32.

Referenced by GDALChecksumImage(), GDALDataTypeIsComplex(), GDALDataTypeUnion(), and GDALWarpOperation::Initialize().

GDALDataType GDALDataTypeUnion ( GDALDataType  eType1,
GDALDataType  eType2 
)

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

Parameters:
eType1 
eType2 
Returns:
a data type able to express eType1 and eType2.

References GDALDataTypeIsComplex(), GDALDataTypeUnion(), GDT_Byte, GDT_CFloat32, GDT_CFloat64, GDT_CInt16, GDT_CInt32, GDT_Float32, GDT_Float64, GDT_Int16, GDT_Int32, GDT_UInt16, and GDT_UInt32.

Referenced by GDALDataTypeUnion(), and GDALWarpOperation::Initialize().

double GDALDecToPackedDMS ( double  dfDec  ) 

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

See CPLDecToPackedDMS().

References GDALDecToPackedDMS().

Referenced by GDALDecToPackedDMS().

CPLErr GDALDeleteDataset ( GDALDriverH  hDriver,
const char *  pszFilename 
)

See also:
GDALDriver::Delete()

References GDALDeleteDataset().

Referenced by GDALDeleteDataset().

int GDALDereferenceDataset ( GDALDatasetH  hDataset  ) 

void GDALDeregisterDriver ( GDALDriverH  hDriver  ) 

See also:
GDALDriverManager::GetDeregisterDriver()

References GDALDriverManager::DeregisterDriver(), and GDALDeregisterDriver().

Referenced by GDALDeregisterDriver().

void GDALDestroyDriverManager ( void   ) 

Destroy the driver manager.

Incidently unloads all managed drivers.

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

References GDALDestroyDriverManager().

Referenced by GDALDestroyDriverManager().

void GDALDestroyScaledProgress ( void *  pData  ) 

Cleanup scaled progress handle.

This function cleans up the data associated with a scaled progress function as returned by GADLCreateScaledProgress().

Parameters:
pData scaled progress handle returned by GDALCreateScaledProgress().

References GDALDestroyScaledProgress().

Referenced by GDALDestroyScaledProgress().

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 primariliy 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.

References GDALDataset::Dereference(), GDALDumpOpenDatasets(), GDALMajorObject::GetDescription(), GDALDataset::GetDriver(), GDALDataset::GetRasterCount(), GDALDataset::GetRasterXSize(), GDALDataset::GetRasterYSize(), GDALDataset::GetShared(), and GDALDataset::Reference().

Referenced by GDALDumpOpenDatasets().

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

Fill this band with a constant value. Set dfImaginaryValue to zero non-complex rasters.

Parameters:
dfRealvalue Real component of fill value
dfImaginaryValue Imaginary component of fill value
See also:
GDALRasterBand::Fill()
Returns:
CE_Failure if the write fails, otherwise CE_None

References GDALFillRaster().

Referenced by GDALFillRaster().

void GDALFlushCache ( GDALDatasetH  hDS  ) 

CPLErr GDALFlushRasterCache ( GDALRasterBandH  hBand  ) 

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.

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.

References GDAL_GCP::dfGCPLine, GDAL_GCP::dfGCPPixel, GDAL_GCP::dfGCPX, GDAL_GCP::dfGCPY, and GDALGCPsToGeoTransform().

Referenced by GDALGCPsToGeoTransform().

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. --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. --debug [on/off/value]: set debug level. --mempreload dir: preload directory contents into /vsimem --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.
Pointer to the argument list array (will be updated in place).
Returns:
updated nArgc argument count. Return of 0 requests terminate without error, return of -1 requests exit with error code.

References CPLFormFilename(), GDALGeneralCmdLineProcessor(), GDALGetDriver(), GDALGetDriverByName(), GDALGetDriverCount(), GDALGetMetadata(), GDALGetMetadataItem(), and GDALVersionInfo().

Referenced by GDALGeneralCmdLineProcessor().

int GDALGetAccess ( GDALDatasetH  hDS  ) 

See also:
GDALDataset::GetAccess()

References GDALGetAccess().

Referenced by GDALGetAccess().

GDALDatasetH GDALGetBandDataset ( GDALRasterBandH  hBand  ) 

int GDALGetBandNumber ( GDALRasterBandH  hBand  ) 

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

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.

Returns:
maximum in bytes.

References GDALGetCacheMax().

Referenced by GDALGetCacheMax().

int GDALGetCacheUsed ( void   ) 

Get cache memory used.

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

References GDALGetCacheUsed().

Referenced by GDALGetCacheUsed().

const char* GDALGetColorInterpretationName ( GDALColorInterp   ) 

GDALDriverH GDALGetDatasetDriver ( GDALDatasetH  hDataset  ) 

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.

References GDALGetDataTypeByName(), and GDALGetDataTypeName().

Referenced by GDALGetDataTypeByName().

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 type.

References GDALGetDataTypeName(), GDT_Byte, GDT_CFloat32, GDT_CFloat64, GDT_CInt16, GDT_CInt32, GDT_Float32, GDT_Float64, GDT_Int16, GDT_Int32, GDT_UInt16, and GDT_UInt32.

Referenced by GDALDriver::Create(), GDALGetDataTypeByName(), and GDALGetDataTypeName().

int GDALGetDataTypeSize ( GDALDataType  eDataType  ) 

Get data type size in bits.

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

Parameters:
data type, such as GDT_Byte.
Returns:
the number of bits or zero if it is not recognised.

References GDALGetDataTypeSize(), GDT_Byte, GDT_CFloat32, GDT_CFloat64, GDT_CInt16, GDT_CInt32, GDT_Float32, GDT_Float64, GDT_Int16, GDT_Int32, GDT_UInt16, and GDT_UInt32.

Referenced by GDALRasterBand::Fill(), GDALCopyWords(), GDALDatasetCopyWholeRaster(), GDALGetDataTypeSize(), GDALRasterizeGeometries(), GDALRasterBand::RasterIO(), GDALDataset::RasterIO(), GDALWarpOperation::WarpRegion(), and GDALWarpOperation::WarpRegionToBuffer().

const char* GDALGetDescription ( GDALMajorObjectH  hObject  ) 

GDALDriverH GDALGetDriver ( int  iDriver  ) 

GDALDriverH GDALGetDriverByName ( const char *  pszName  ) 

int GDALGetDriverCount ( void   ) 

char** GDALGetFileList ( GDALDatasetH  hDS  ) 

int GDALGetGCPCount ( GDALDatasetH  hDS  ) 

const char* GDALGetGCPProjection ( GDALDatasetH  hDS  ) 

const GDAL_GCP* GDALGetGCPs ( GDALDatasetH  hDS  ) 

CPLErr GDALGetGeoTransform ( GDALDatasetH  hDS,
double *  padfTransform 
)

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

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

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

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

GDALRasterBandH GDALGetOverview ( GDALRasterBandH  hBand,
int  i 
)

int GDALGetOverviewCount ( GDALRasterBandH  hBand  ) 

const char* GDALGetPaletteInterpretationName ( GDALPaletteInterp   ) 

Translate a GDALPaletteInterp into a user displayable string.

References GDALGetPaletteInterpretationName(), GPI_CMYK, GPI_Gray, GPI_HLS, and GPI_RGB.

Referenced by GDALGetPaletteInterpretationName().

const char* GDALGetProjectionRef ( GDALDatasetH  hDS  ) 

GDALAccess GDALGetRasterAccess ( GDALRasterBandH  hBand  ) 

GDALRasterBandH GDALGetRasterBand ( GDALDatasetH  hDS,
int  nBandId 
)

int GDALGetRasterBandXSize ( GDALRasterBandH  hBand  ) 

int GDALGetRasterBandYSize ( GDALRasterBandH  hBand  ) 

char** GDALGetRasterCategoryNames ( GDALRasterBandH  hBand  ) 

GDALColorInterp GDALGetRasterColorInterpretation ( GDALRasterBandH  hBand  ) 

GDALColorTableH GDALGetRasterColorTable ( GDALRasterBandH  hBand  ) 

int GDALGetRasterCount ( GDALDatasetH  hDS  ) 

GDALDataType GDALGetRasterDataType ( GDALRasterBandH  hBand  ) 

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

double GDALGetRasterMaximum ( GDALRasterBandH  hBand,
int *  pbSuccess 
)

double GDALGetRasterMinimum ( GDALRasterBandH  hBand,
int *  pbSuccess 
)

double GDALGetRasterNoDataValue ( GDALRasterBandH  hBand,
int *  pbSuccess 
)

GDALRasterBandH GDALGetRasterSampleOverview ( GDALRasterBandH  hBand,
int  nDesiredSamples 
)

Fetch best sampling overview.

Returns the most reduced overview of the given band that still satisfies the desired number of samples. This function can be used with zero as the number of desired samples to fetch the most reduced overview. The same band as was passed in will be returned if it has not overviews, or if none of the overviews have enough samples.

Parameters:
hBand the band to search for overviews on.
nDesiredSamples the returned band will have at least this many pixels.
Returns:
optimal overview or hBand itself.

References GDALGetOverview(), GDALGetOverviewCount(), GDALGetRasterBandXSize(), GDALGetRasterBandYSize(), and GDALGetRasterSampleOverview().

Referenced by GDALRasterBand::ComputeStatistics(), GDALComputeRasterMinMax(), and GDALGetRasterSampleOverview().

const char* GDALGetRasterUnitType ( GDALRasterBandH  hBand  ) 

int GDALGetRasterXSize ( GDALDatasetH  hDataset  ) 

int GDALGetRasterYSize ( GDALDatasetH  hDataset  ) 

int GDALHasArbitraryOverviews ( GDALRasterBandH  hBand  ) 

int GDALInvGeoTransform ( 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.

References GDALInvGeoTransform().

Referenced by GDALCreateGenImgProjTransformer(), GDALInvGeoTransform(), and GDALSetGenImgProjTransformerDstGeoTransform().

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.

See also:
GDALOpenShared()
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.
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 *.

References GDALOpen(), GDALMajorObject::GetDescription(), GDALDriverManager::GetDriver(), GDALDriverManager::GetDriverCount(), GDALDriver::pfnOpen, GDALDataset::poDriver, and GDALMajorObject::SetDescription().

Referenced by GDALDriver::CopyFiles(), GDALDriver::Delete(), GDALOpen(), GDALOpenShared(), and GDALDriver::Rename().

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 it's 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.

See also:
GDALOpen()
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.
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 *.

References GA_ReadOnly, GDALOpen(), GDALOpenShared(), GDALDataset::MarkAsShared(), and GDALDataset::Reference().

Referenced by GDALOpenShared().

double GDALPackedDMSToDec ( double  dfPacked  ) 

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

See CPLPackedDMSToDec().

References GDALPackedDMSToDec().

Referenced by GDALPackedDMSToDec().

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 
)

CPLErr GDALReadBlock ( GDALRasterBandH  hBand,
int  nXOff,
int  nYOff,
void *  pData 
)

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 it's contents. 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] - x offset to center of top left pixel. geotrasnform[3] - y offset to center of top left pixel.

Parameters:
pszBaseFilename the target raster file.
pszExtension the extension to use (ie. ".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.

References CPLAtofM(), CPLGetExtension(), CPLResetExtension(), GDALReadWorldFile(), and VSIStatL().

Referenced by GDALReadWorldFile().

int GDALReferenceDataset ( GDALDatasetH  hDataset  ) 

int GDALRegisterDriver ( GDALDriverH  hDriver  ) 

See also:
GDALDriverManager::GetRegisterDriver()

References GDALRegisterDriver(), and GDALDriverManager::RegisterDriver().

Referenced by GDALRegisterDriver().

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

See also:
GDALDriver::Rename()

References GDALRenameDataset().

Referenced by GDALRenameDataset().

int GDALScaledProgress ( double  dfComplete,
const char *  pszMessage,
void *  pData 
)

Scaled progress transformer.

This is the progress function that should be passed along with the callback data returned by GDALCreateScaledProgress().

References GDALScaledProgress().

Referenced by GDALScaledProgress().

void GDALSetCacheMax ( int  nNewSize  ) 

Set maximum cache memory.

This function sets the maximum amount of memory that GDAL is permitted to use for GDALRasterBlock caching.

Parameters:
nNewSize the maximum number of bytes for caching. Maximum is 2GB.

References GDALSetCacheMax().

Referenced by GDALSetCacheMax().

void GDALSetDescription ( GDALMajorObjectH  hObject,
const char *  pszNewDesc 
)

CPLErr GDALSetGCPs ( GDALDatasetH  hDS,
int  nGCPCount,
const GDAL_GCP pasGCPList,
const char *  pszGCPProjection 
)

See also:
GDALDataset::SetGCPs()

References GDALSetGCPs().

Referenced by GDALSetGCPs().

CPLErr GDALSetGeoTransform ( GDALDatasetH  hDS,
double *  padfTransform 
)

CPLErr GDALSetMetadata ( GDALMajorObjectH  hObject,
char **  papszMD,
const char *  pszDomain 
)

CPLErr GDALSetMetadataItem ( GDALMajorObjectH  hObject,
const char *  pszName,
const char *  pszValue,
const char *  pszDomain 
)

CPLErr GDALSetProjection ( GDALDatasetH  hDS,
const char *  pszProjection 
)

CPLErr GDALSetRasterCategoryNames ( GDALRasterBandH  hBand,
char **  papszNames 
)

CPLErr GDALSetRasterColorInterpretation ( GDALRasterBandH  hBand,
GDALColorInterp  eColorInterp 
)

CPLErr GDALSetRasterColorTable ( GDALRasterBandH  hBand,
GDALColorTableH  hCT 
)

CPLErr GDALSetRasterNoDataValue ( GDALRasterBandH  hBand,
double  dfValue 
)

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.

References GDALSwapWords().

Referenced by GDALSwapWords().

int GDALTermProgress ( double  dfComplete,
const char *  pszMessage,
void *  pProgressArg 
)

Simple progress report to terminal.

This progress reporter prints simple progress report to the terminal window. The progress report generally looks something like this:

0...10...20...30...40...50...60...70...80...90...100 - done.

Every 2.5% of progress another number or period is emitted. Note that GDALTermProgress() uses internal static data to keep track of the last percentage reported and will get confused if two terminal based progress reportings are active at the same time.

The GDALTermProgress() function maintains an internal memory of the last percentage complete reported in a static variable, and this makes it unsuitable to have multiple GDALTermProgress()'s active eithin a single thread or across multiple threads.

Parameters:
dfComplete completion ratio from 0.0 to 1.0.
pszMessage optional message.
pProgressArg ignored callback data argument.
Returns:
Always returns TRUE indicating the process should continue.

References GDALTermProgress().

Referenced by GDALTermProgress().

const char* GDALVersionInfo ( const char *  pszRequest  ) 

Get runtime version information.

Available pszRequest values:

  • "VERSION_NUM": Returns GDAL_VERSION_NUM formatted as a string. ie. "1170"
  • "RELEASE_DATE": Returns GDAL_RELEASE_DATE formatted as a string. ie. "20020416".
  • "RELEASE_NAME": Returns the GDAL_RELEASE_NAME. ie. "1.1.7"
  • "--version": Returns one line version message suitable for use in response to --version requests. ie. "GDAL 1.1.7, released 2002/04/16"

Parameters:
pszRequest the type of version info desired, as listed above.
Returns:
an internal string containing the requested information.

References GDALVersionInfo(), VSIFCloseL(), VSIFOpenL(), VSIFReadL(), VSIFSeekL(), and VSIFTellL().

Referenced by GDALGeneralCmdLineProcessor(), and GDALVersionInfo().

CPLErr GDALWriteBlock ( GDALRasterBandH  hBand,
int  nXOff,
int  nYOff,
void *  pData 
)


Generated for GDAL by doxygen 1.5.8.