30 #ifndef GDAL_H_INCLUDED
31 #define GDAL_H_INCLUDED
40 #include "gdal_version.h"
52 typedef enum {
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,
104 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
140 #define GDALMD_AREA_OR_POINT "AREA_OR_POINT"
141 # define GDALMD_AOP_AREA "Area"
142 # define GDALMD_AOP_POINT "Point"
149 #define CPLE_WrongFormat 200
169 typedef void *GDALProjDefH;
185 typedef int (CPL_STDCALL *
GDALProgressFunc)(
double dfComplete,
const char *pszMessage,
void *pProgressArg);
204 char *pszDescription;
206 } GDALOptionDefinition;
209 #define GDAL_DMD_LONGNAME "DMD_LONGNAME"
210 #define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
211 #define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
212 #define GDAL_DMD_EXTENSION "DMD_EXTENSION"
213 #define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST"
214 #define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES"
216 #define GDAL_DCAP_CREATE "DCAP_CREATE"
217 #define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
218 #define GDAL_DCAP_VIRTUALIO "DCAP_VIRTUALIO"
224 char ** ) CPL_WARN_UNUSED_RESULT;
229 GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriver( const
char * pszFilename,
230 char ** papszFileList );
231 GDALDatasetH CPL_DLL CPL_STDCALL
232 GDALOpen( const
char *pszFilename,
GDALAccess eAccess ) CPL_WARN_UNUSED_RESULT;
233 GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenShared( const
char *,
GDALAccess ) CPL_WARN_UNUSED_RESULT;
234 int CPL_DLL CPL_STDCALL GDALDumpOpenDatasets( FILE * );
236 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriverByName( const
char * );
237 int CPL_DLL CPL_STDCALL GDALGetDriverCount(
void );
238 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriver(
int );
239 void CPL_DLL CPL_STDCALL GDALDestroyDriver( GDALDriverH );
240 int CPL_DLL CPL_STDCALL GDALRegisterDriver( GDALDriverH );
241 void CPL_DLL CPL_STDCALL GDALDeregisterDriver( GDALDriverH );
242 void CPL_DLL CPL_STDCALL GDALDestroyDriverManager(
void );
243 CPLErr CPL_DLL CPL_STDCALL GDALDeleteDataset( GDALDriverH, const
char * );
244 CPLErr CPL_DLL CPL_STDCALL GDALRenameDataset( GDALDriverH,
245 const
char * pszNewName,
246 const
char * pszOldName );
247 CPLErr CPL_DLL CPL_STDCALL GDALCopyDatasetFiles( GDALDriverH,
248 const
char * pszNewName,
249 const
char * pszOldName);
250 int CPL_DLL CPL_STDCALL GDALValidateCreationOptions( GDALDriverH,
251 char** papszCreationOptions);
254 const
char CPL_DLL * CPL_STDCALL GDALGetDriverShortName( GDALDriverH );
255 const
char CPL_DLL * CPL_STDCALL GDALGetDriverLongName( GDALDriverH );
256 const
char CPL_DLL * CPL_STDCALL GDALGetDriverHelpTopic( GDALDriverH );
257 const
char CPL_DLL * CPL_STDCALL GDALGetDriverCreationOptionList( GDALDriverH );
287 void CPL_DLL CPL_STDCALL GDALInitGCPs(
int,
GDAL_GCP * );
288 void CPL_DLL CPL_STDCALL GDALDeinitGCPs(
int,
GDAL_GCP * );
291 int CPL_DLL CPL_STDCALL
293 double *padfGeoTransform,
int bApproxOK );
294 int CPL_DLL CPL_STDCALL
296 double *padfInvGeoTransformOut );
298 double *,
double * );
307 const char CPL_DLL * CPL_STDCALL
309 CPLErr CPL_DLL CPL_STDCALL
328 char **papszOptions );
331 GDALBeginAsyncReader(
GDALDatasetH hDS,
int nXOff,
int nYOff,
332 int nXSize,
int nYSize,
333 void *pBuf,
int nBufXSize,
int nBufYSize,
335 int nPixelSpace,
int nLineSpace,
int nBandSpace,
336 char **papszOptions);
338 void CPL_DLL CPL_STDCALL
343 int nDSXOff,
int nDSYOff,
int nDSXSize,
int nDSYSize,
344 void * pBuffer,
int nBXSize,
int nBYSize,
GDALDataType eBDataType,
345 int nBandCount,
int *panBandCount,
346 int nPixelSpace,
int nLineSpace,
int nBandSpace);
349 int nDSXOff,
int nDSYOff,
int nDSXSize,
int nDSYSize,
351 int nBandCount,
int *panBandCount,
char **papszOptions );
368 CPLErr CPL_DLL CPL_STDCALL
375 CPLErr CPL_DLL CPL_STDCALL
389 const char *pszResampling,
400 #define SRCVAL(papoSource, eSrcType, ii) \
401 (eSrcType == GDT_Byte ? \
402 ((GByte *)papoSource)[ii] : \
403 (eSrcType == GDT_Float32 ? \
404 ((float *)papoSource)[ii] : \
405 (eSrcType == GDT_Float64 ? \
406 ((double *)papoSource)[ii] : \
407 (eSrcType == GDT_Int32 ? \
408 ((GInt32 *)papoSource)[ii] : \
409 (eSrcType == GDT_UInt16 ? \
410 ((GUInt16 *)papoSource)[ii] : \
411 (eSrcType == GDT_Int16 ? \
412 ((GInt16 *)papoSource)[ii] : \
413 (eSrcType == GDT_UInt32 ? \
414 ((GUInt32 *)papoSource)[ii] : \
415 (eSrcType == GDT_CInt16 ? \
416 ((GInt16 *)papoSource)[ii * 2] : \
417 (eSrcType == GDT_CInt32 ? \
418 ((GInt32 *)papoSource)[ii * 2] : \
419 (eSrcType == GDT_CFloat32 ? \
420 ((float *)papoSource)[ii * 2] : \
421 (eSrcType == GDT_CFloat64 ? \
422 ((double *)papoSource)[ii * 2] : 0)))))))))))
425 (*GDALDerivedPixelFunc)(
void **papoSources,
int nSources,
void *pData,
426 int nBufXSize,
int nBufYSize,
428 int nPixelSpace,
int nLineSpace);
431 void CPL_DLL CPL_STDCALL
435 int nDSXOff,
int nDSYOff,
int nDSXSize,
int nDSYSize,
436 int nBXSize,
int nBYSize,
GDALDataType eBDataType,
char **papszOptions );
438 CPLErr CPL_DLL CPL_STDCALL
440 int nDSXOff,
int nDSYOff,
int nDSXSize,
int nDSYSize,
441 void * pBuffer,
int nBXSize,
int nBYSize,
GDALDataType eBDataType,
442 int nPixelSpace,
int nLineSpace );
453 CPLErr CPL_DLL CPL_STDCALL
468 double *pdfMin,
double *pdfMax,
double *pdfMean,
double *pdfStdDev );
471 double *pdfMin,
double *pdfMax,
double *pdfMean,
double *pdfStdDev,
475 double dfMin,
double dfMax,
double dfMean,
double dfStdDev );
483 void CPL_DLL CPL_STDCALL
485 double adfMinMax[2] );
488 double dfMin,
double dfMax,
489 int nBuckets,
int *panHistogram,
490 int bIncludeOutOfRange,
int bApproxOK,
492 void * pProgressData );
494 double *pdfMin,
double *pdfMax,
495 int *pnBuckets,
int **ppanHistogram,
498 void * pProgressData );
500 double dfMin,
double dfMax,
501 int nBuckets,
int *panHistogram );
502 int CPL_DLL CPL_STDCALL
507 double dfRealValue,
double dfImaginaryValue );
508 CPLErr CPL_DLL CPL_STDCALL
510 double *pdfMean,
double *pdfStdDev,
512 void *pProgressData );
513 CPLErr CPL_DLL GDALOverviewMagnitudeCorrection(
GDALRasterBandH hBaseBand,
517 void *pProgressData );
524 GDALDerivedPixelFunc pfnPixelFunc );
528 CPLErr CPL_DLL CPL_STDCALL
531 #define GMF_ALL_VALID 0x01
532 #define GMF_PER_DATASET 0x02
533 #define GMF_ALPHA 0x04
534 #define GMF_NODATA 0x08
542 int* pnXBufOff,
int* pnYBufOff,
543 int* pnXBufSize,
int* pnYBufSize );
553 void CPL_DLL CPL_STDCALL
GDALSwapWords(
void *pData,
int nWordSize,
int nWordCount,
555 void CPL_DLL CPL_STDCALL
557 void * pDstData,
GDALDataType eDstType,
int nDstPixelOffset,
561 GDALCopyBits(
const GByte *pabySrcData,
int nSrcOffset,
int nSrcStep,
562 GByte *pabyDstData,
int nDstOffset,
int nDstStep,
563 int nBitCount,
int nStepCount );
570 int CPL_DLL CPL_STDCALL GDALLoadTabFile(
const char *,
double *,
char **,
572 int CPL_DLL CPL_STDCALL GDALReadTabFile(
const char *,
double *,
char **,
574 int CPL_DLL CPL_STDCALL GDALLoadOziMapFile(
const char *,
double *,
char **,
576 int CPL_DLL CPL_STDCALL GDALReadOziMapFile(
const char * ,
double *,
578 char CPL_DLL ** CPL_STDCALL GDALLoadRPBFile(
const char *pszFilename,
579 char **papszSiblingFiles );
580 char CPL_DLL ** CPL_STDCALL GDALLoadRPCFile(
const char *pszFilename,
581 char **papszSiblingFiles );
582 CPLErr CPL_DLL CPL_STDCALL GDALWriteRPBFile(
const char *pszFilename,
584 char CPL_DLL ** CPL_STDCALL GDALLoadIMDFile(
const char *pszFilename,
585 char **papszSiblingFiles );
586 CPLErr CPL_DLL CPL_STDCALL GDALWriteIMDFile(
const char *pszFilename,
589 const char CPL_DLL * CPL_STDCALL GDALDecToDMS(
double,
const char *,
int );
595 #ifndef GDAL_VERSION_INFO_DEFINED
596 #define GDAL_VERSION_INFO_DEFINED
600 #ifndef GDAL_CHECK_VERSION
602 int CPL_DLL CPL_STDCALL
GDALCheckVersion(
int nVersionMajor,
int nVersionMinor,
603 const char* pszCallingComponentName);
608 #define GDAL_CHECK_VERSION(pszCallingComponentName) \
609 GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName)
624 double dfHEIGHT_SCALE;
626 double adfLINE_NUM_COEFF[20];
627 double adfLINE_DEN_COEFF[20];
628 double adfSAMP_NUM_COEFF[20];
629 double adfSAMP_DEN_COEFF[20];
638 int CPL_DLL CPL_STDCALL GDALExtractRPCInfo(
char **,
GDALRPCInfo * );
684 typedef enum {
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
746 double *,
double * );