GDAL
Classes | Macros | Typedefs | Enumerations | Functions
gdal_priv.h File Reference

C++ GDAL entry points. More...

#include "gdal.h"
#include "gdal_frmts.h"
#include "cpl_vsi.h"
#include "cpl_conv.h"
#include "cpl_string.h"
#include "cpl_minixml.h"
#include "cpl_multiproc.h"
#include "cpl_atomic_ops.h"
#include <vector>
#include <map>
#include "ogr_core.h"

Go to the source code of this file.

Classes

class  GDALMultiDomainMetadata
 
class  GDALMajorObject
 Object with metadata. More...
 
class  GDALDefaultOverviews
 
class  GDALOpenInfo
 
class  GDALDataset
 A set of associated raster bands, usually from one file. More...
 
class  GDALRasterBlock
 A single raster block in the block cache. More...
 
class  GDALColorTable
 
class  GDALAbstractBandBlockCache
 This manages how a raster band store its cached block. More...
 
class  GDALRasterBand
 A single raster band (or channel). More...
 
class  GDALAllValidMaskBand
 
class  GDALNoDataMaskBand
 
class  GDALNoDataValuesMaskBand
 
class  GDALRescaledAlphaBand
 
class  GDALDriver
 Format specific driver. More...
 
class  GDALDriverManager
 Class for managing the registration of file format drivers. More...
 
class  GDALAsyncReader
 Class used as a session object for asynchronous requests. More...
 

Macros

#define GMO_VALID   0x0001
 
#define GMO_IGNORE_UNIMPLEMENTED   0x0002
 
#define GMO_SUPPORT_MD   0x0004
 
#define GMO_SUPPORT_MDMD   0x0008
 
#define GMO_MD_DIRTY   0x0010
 
#define GMO_PAM_CLASS   0x0020
 
#define OPTIONAL_OUTSIDE_GDAL(val)   = val
 
#define ARE_REAL_EQUAL(dfVal1, dfVal2)   (dfVal1 == dfVal2 || fabs(dfVal1 - dfVal2) < 1e-10 || (dfVal2 != 0 && fabs(1 - dfVal1 / dfVal2) < 1e-10 ))
 
#define DIV_ROUND_UP(a, b)   ( ((a) % (b)) == 0 ? ((a) / (b)) : (((a) / (b)) + 1) )
 
#define GDALSTAT_APPROX_NUMSAMPLES   2500
 

Typedefs

typedef struct GDALSQLParseInfo GDALSQLParseInfo
 
typedef CPLErr(* GDALResampleFunction) (double dfXRatioDstToSrc, double dfYRatioDstToSrc, double dfSrcXDelta, double dfSrcYDelta, GDALDataType eWrkDataType, void *pChunk, GByte *pabyChunkNodataMask, int nChunkXOff, int nChunkXSize, int nChunkYOff, int nChunkYSize, int nDstXOff, int nDstXOff2, int nDstYOff, int nDstYOff2, GDALRasterBand *poOverview, const char *pszResampling, int bHasNoData, float fNoDataValue, GDALColorTable *poColorTable, GDALDataType eSrcDataType)
 

Enumerations

enum  GDALIdentifyEnum { GDAL_IDENTIFY_UNKNOWN = -1, GDAL_IDENTIFY_FALSE = 0, GDAL_IDENTIFY_TRUE = 1 }
 Enumeration used by GDALDriver::pfnIdentify(). More...
 

Functions

GDALAbstractBandBlockCacheGDALArrayBandBlockCacheCreate (GDALRasterBand *poBand)
 
GDALAbstractBandBlockCacheGDALHashSetBandBlockCacheCreate (GDALRasterBand *poBand)
 
GDALDriverManagerGetGDALDriverManager (void)
 Fetch the global GDAL driver manager. More...
 
CPLErr GDALRegenerateOverviewsMultiBand (int nBands, GDALRasterBand **papoSrcBands, int nOverviews, GDALRasterBand ***papapoOverviewBands, const char *pszResampling, GDALProgressFunc pfnProgress, void *pProgressData)
 Variant of GDALRegenerateOverviews, specially dedicated for generating compressed pixel-interleaved overviews (JPEG-IN-TIFF for example) More...
 
GDALResampleFunction GDALGetResampleFunction (const char *pszResampling, int *pnRadius)
 
GDALDataType GDALGetOvrWorkDataType (const char *pszResampling, GDALDataType eSrcDataType)
 
CPLErr HFAAuxBuildOverviews (const char *pszOvrFilename, GDALDataset *poParentDS, GDALDataset **ppoDS, int nBands, int *panBandList, int nNewOverviews, int *panNewOverviewList, const char *pszResampling, GDALProgressFunc pfnProgress, void *pProgressData)
 
CPLErr GTIFFBuildOverviews (const char *pszFilename, int nBands, GDALRasterBand **papoBandList, int nOverviews, int *panOverviewList, const char *pszResampling, GDALProgressFunc pfnProgress, void *pProgressData)
 
CPLErr GDALDefaultBuildOverviews (GDALDataset *hSrcDS, const char *pszBasename, const char *pszResampling, int nOverviews, int *panOverviewList, int nBands, int *panBandList, GDALProgressFunc pfnProgress, void *pProgressData)
 
int GDALBandGetBestOverviewLevel (GDALRasterBand *poBand, int &nXOff, int &nYOff, int &nXSize, int &nYSize, int nBufXSize, int nBufYSize) CPL_WARN_DEPRECATED("Use GDALBandGetBestOverviewLevel2 instead")
 
int GDALBandGetBestOverviewLevel2 (GDALRasterBand *poBand, int &nXOff, int &nYOff, int &nXSize, int &nYSize, int nBufXSize, int nBufYSize, GDALRasterIOExtraArg *psExtraArg)
 
int GDALOvLevelAdjust (int nOvLevel, int nXSize) CPL_WARN_DEPRECATED("Use GDALOvLevelAdjust2 instead")
 
int GDALOvLevelAdjust2 (int nOvLevel, int nXSize, int nYSize)
 
int GDALComputeOvFactor (int nOvrXSize, int nRasterXSize, int nOvrYSize, int nRasterYSize)
 
GDALDatasetGDALFindAssociatedAuxFile (const char *pszBasefile, GDALAccess eAccess, GDALDataset *poDependentDS)
 
CPLErr GDALParseGMLCoverage (CPLXMLNode *psTree, int *pnXSize, int *pnYSize, double *padfGeoTransform, char **ppszProjection)
 
int GDALCheckDatasetDimensions (int nXSize, int nYSize)
 Return TRUE if the dataset dimensions are valid. More...
 
int GDALCheckBandCount (int nBands, int bIsZeroAllowed)
 Return TRUE if the band count is valid. More...
 
int GDALReadWorldFile2 (const char *pszBaseFilename, const char *pszExtension, double *padfGeoTransform, char **papszSiblingFiles, char **ppszWorldFileNameOut)
 
int GDALReadTabFile2 (const char *pszBaseFilename, double *padfGeoTransform, char **ppszWKT, int *pnGCPCount, GDAL_GCP **ppasGCPs, char **papszSiblingFiles, char **ppszTabFileNameOut)
 
void GDALCopyRasterIOExtraArg (GDALRasterIOExtraArg *psDestArg, GDALRasterIOExtraArg *psSrcArg)
 
void GDALNullifyOpenDatasetsList ()
 
CPLMutex ** GDALGetphDMMutex ()
 
CPLMutex ** GDALGetphDLMutex ()
 
void GDALNullifyProxyPoolSingleton ()
 
GDALDriverGDALGetAPIPROXYDriver ()
 
void GDALSetResponsiblePIDForCurrentThread (GIntBig responsiblePID)
 
GIntBig GDALGetResponsiblePIDForCurrentThread ()
 
CPLString GDALFindAssociatedFile (const char *pszBasename, const char *pszExt, char **papszSiblingFiles, int nFlags)
 Find file with alternate extension. More...
 
CPLErr EXIFExtractMetadata (char **&papszMetadata, void *fpL, int nOffset, int bSwabflag, int nTIFFHEADER, int &nExifOffset, int &nInterOffset, int &nGPSOffset)
 
int GDALValidateOpenOptions (GDALDriverH hDriver, const char *const *papszOptionOptions)
 
int GDALValidateOptions (const char *pszOptionList, const char *const *papszOptionsToValidate, const char *pszErrorMessageOptionType, const char *pszErrorMessageContainerName)
 
GDALRIOResampleAlg GDALRasterIOGetResampleAlg (const char *pszResampling)
 
const char * GDALRasterIOGetResampleAlg (GDALRIOResampleAlg eResampleAlg)
 
void GDALRasterIOExtraArgSetResampleAlg (GDALRasterIOExtraArg *psExtraArg, int nXSize, int nYSize, int nBufXSize, int nBufYSize)
 
GDALDatasetGDALCreateOverviewDataset (GDALDataset *poDS, int nOvrLevel, int bThisLevelOnly, int bOwnDS)
 
void GDALSerializeGCPListToXML (CPLXMLNode *psParentNode, GDAL_GCP *pasGCPList, int nGCPCount, const char *pszGCPProjection)
 
void GDALDeserializeGCPListFromXML (CPLXMLNode *psGCPList, GDAL_GCP **ppasGCPList, int *pnGCPCount, char **ppszGCPProjection)
 
void GDALSerializeOpenOptionsToXML (CPLXMLNode *psParentNode, char **papszOpenOptions)
 
char ** GDALDeserializeOpenOptionsFromXML (CPLXMLNode *psParentNode)
 
int GDALCanFileAcceptSidecarFile (const char *pszFilename)
 

Detailed Description

C++ GDAL entry points.

Enumeration Type Documentation

Enumeration used by GDALDriver::pfnIdentify().

Since
GDAL 2.1
Enumerator
GDAL_IDENTIFY_UNKNOWN 

Identify could not determine if the file is recognized or not by the probed driver.

GDAL_IDENTIFY_FALSE 

Identify determined the file is not recognized by the probed driver.

GDAL_IDENTIFY_TRUE 

Identify determined the file is recognized by the probed driver.

Function Documentation

int GDALCheckBandCount ( int  nBands,
int  bIsZeroAllowed 
)

Return TRUE if the band count is valid.

If the configuration option GDAL_MAX_BAND_COUNT is defined, the band count will be compared to the maximum number of band allowed. If not defined, the maximum number allowed is 65536.

Parameters
nBandsthe band count
bIsZeroAllowedTRUE if band count == 0 is allowed
Since
GDAL 1.7.0
int GDALCheckDatasetDimensions ( int  nXSize,
int  nYSize 
)

Return TRUE if the dataset dimensions are valid.

Parameters
nXSizeraster width
nYSizeraster height
Since
GDAL 1.7.0
CPLString GDALFindAssociatedFile ( const char *  pszBaseFilename,
const char *  pszExt,
char **  papszSiblingFiles,
int   
)

Find file with alternate extension.

Finds the file with the indicated extension, substituting it in place of the extension of the base filename. Generally used to search for associated files like world files .RPB files, etc. If necessary, the extension will be tried in both upper and lower case. If a sibling file list is available it will be used instead of doing VSIStatExL() calls to probe the file system.

Note that the result is a dynamic CPLString so this method should not be used in a situation where there could be cross heap issues. It is generally imprudent for application built on GDAL to use this function unless they are sure they will always use the same runtime heap as GDAL.

Parameters
pszBaseFilenamethe filename relative to which to search.
pszExtthe target extension in either upper or lower case.
papszSiblingFilesthe list of files in the same directory as pszBaseFilename or NULL if they are not known.
nFlagsspecial options controlling search. None defined yet, just pass 0.
Returns
an empty string if the target is not found, otherwise the target file with similar path style as the pszBaseFilename.
CPLErr GDALRegenerateOverviewsMultiBand ( int  nBands,
GDALRasterBand **  papoSrcBands,
int  nOverviews,
GDALRasterBand ***  papapoOverviewBands,
const char *  pszResampling,
GDALProgressFunc  pfnProgress,
void *  pProgressData 
)

Variant of GDALRegenerateOverviews, specially dedicated for generating compressed pixel-interleaved overviews (JPEG-IN-TIFF for example)

This function will generate one or more overview images from a base image using the requested downsampling algorithm. It's 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 and share the same characteristics (type, dimensions)

The resampling algorithms supported for the moment are "NEAREST", "AVERAGE" and "GAUSS"

The pseudo-algorithm used by the function is : for each overview iterate on lines of the source by a step of deltay iterate on columns of the source by a step of deltax read the source data of size deltax * deltay for all the bands generate the corresponding overview block for all the bands

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.

Parameters
nBandsthe number of bands, size of papoSrcBands and size of first dimension of papapoOverviewBands
papoSrcBandsthe list of source bands to downsample
nOverviewsthe number of downsampled overview levels being generated.
papapoOverviewBandsbidimension array of bands. First dimension is indexed by nBands. Second dimension is indexed by nOverviews.
pszResamplingResampling algorithm ("NEAREST", "AVERAGE" or "GAUSS").
pfnProgressprogress report function.
pProgressDataprogress function callback data.
Returns
CE_None on success or CE_Failure on failure.
GDALDriverManager* GetGDALDriverManager ( void  )

Fetch the global GDAL driver manager.

This function fetches the pointer to the singleton global driver manager. If the driver manager doesn't exist it is automatically created.

Returns
pointer to the global driver manager. This should not be able to fail.

Generated for GDAL by doxygen 1.8.11.