30 #ifndef GDAL_H_INCLUDED
31 #define GDAL_H_INCLUDED
40 #include "gdal_version.h"
43 #include "cpl_progress.h"
53 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,
105 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
141 #define GDALMD_AREA_OR_POINT "AREA_OR_POINT"
142 # define GDALMD_AOP_AREA "Area"
143 # define GDALMD_AOP_POINT "Point"
150 #define CPLE_WrongFormat 200
170 typedef void *GDALProjDefH;
192 char *pszDescription;
194 } GDALOptionDefinition;
197 #define GDAL_DMD_LONGNAME "DMD_LONGNAME"
198 #define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
199 #define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
200 #define GDAL_DMD_EXTENSION "DMD_EXTENSION"
201 #define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST"
202 #define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES"
203 #define GDAL_DMD_SUBDATASETS "DMD_SUBDATASETS"
205 #define GDAL_DCAP_CREATE "DCAP_CREATE"
206 #define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
207 #define GDAL_DCAP_VIRTUALIO "DCAP_VIRTUALIO"
213 char ** ) CPL_WARN_UNUSED_RESULT;
216 int,
char **, GDALProgressFunc,
void * ) CPL_WARN_UNUSED_RESULT;
218 GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriver( const
char * pszFilename,
219 char ** papszFileList );
220 GDALDatasetH CPL_DLL CPL_STDCALL
221 GDALOpen( const
char *pszFilename,
GDALAccess eAccess ) CPL_WARN_UNUSED_RESULT;
222 GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenShared( const
char *,
GDALAccess ) CPL_WARN_UNUSED_RESULT;
223 int CPL_DLL CPL_STDCALL GDALDumpOpenDatasets( FILE * );
225 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriverByName( const
char * );
226 int CPL_DLL CPL_STDCALL GDALGetDriverCount(
void );
227 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriver(
int );
228 void CPL_DLL CPL_STDCALL GDALDestroyDriver( GDALDriverH );
229 int CPL_DLL CPL_STDCALL GDALRegisterDriver( GDALDriverH );
230 void CPL_DLL CPL_STDCALL GDALDeregisterDriver( GDALDriverH );
231 void CPL_DLL CPL_STDCALL GDALDestroyDriverManager(
void );
232 CPLErr CPL_DLL CPL_STDCALL GDALDeleteDataset( GDALDriverH, const
char * );
233 CPLErr CPL_DLL CPL_STDCALL GDALRenameDataset( GDALDriverH,
234 const
char * pszNewName,
235 const
char * pszOldName );
236 CPLErr CPL_DLL CPL_STDCALL GDALCopyDatasetFiles( GDALDriverH,
237 const
char * pszNewName,
238 const
char * pszOldName);
239 int CPL_DLL CPL_STDCALL GDALValidateCreationOptions( GDALDriverH,
240 char** papszCreationOptions);
243 const
char CPL_DLL * CPL_STDCALL GDALGetDriverShortName( GDALDriverH );
244 const
char CPL_DLL * CPL_STDCALL GDALGetDriverLongName( GDALDriverH );
245 const
char CPL_DLL * CPL_STDCALL GDALGetDriverHelpTopic( GDALDriverH );
246 const
char CPL_DLL * CPL_STDCALL GDALGetDriverCreationOptionList( GDALDriverH );
276 void CPL_DLL CPL_STDCALL GDALInitGCPs(
int,
GDAL_GCP * );
277 void CPL_DLL CPL_STDCALL GDALDeinitGCPs(
int,
GDAL_GCP * );
280 int CPL_DLL CPL_STDCALL
282 double *padfGeoTransform,
int bApproxOK );
283 int CPL_DLL CPL_STDCALL
285 double *padfInvGeoTransformOut );
287 double *,
double * );
296 const char CPL_DLL * CPL_STDCALL
298 CPLErr CPL_DLL CPL_STDCALL
317 char **papszOptions );
320 GDALBeginAsyncReader(
GDALDatasetH hDS,
int nXOff,
int nYOff,
321 int nXSize,
int nYSize,
322 void *pBuf,
int nBufXSize,
int nBufYSize,
324 int nPixelSpace,
int nLineSpace,
int nBandSpace,
325 char **papszOptions);
327 void CPL_DLL CPL_STDCALL
332 int nDSXOff,
int nDSYOff,
int nDSXSize,
int nDSYSize,
333 void * pBuffer,
int nBXSize,
int nBYSize,
GDALDataType eBDataType,
334 int nBandCount,
int *panBandCount,
335 int nPixelSpace,
int nLineSpace,
int nBandSpace);
338 int nDSXOff,
int nDSYOff,
int nDSXSize,
int nDSYSize,
340 int nBandCount,
int *panBandCount,
char **papszOptions );
357 CPLErr CPL_DLL CPL_STDCALL
359 int,
int *, GDALProgressFunc,
void * );
364 CPLErr CPL_DLL CPL_STDCALL
369 GDALProgressFunc pfnProgress,
void *pProgressData );
373 GDALProgressFunc pfnProgress,
void *pProgressData );
378 const char *pszResampling,
379 GDALProgressFunc pfnProgress,
void *pProgressData );
389 #define SRCVAL(papoSource, eSrcType, ii) \
390 (eSrcType == GDT_Byte ? \
391 ((GByte *)papoSource)[ii] : \
392 (eSrcType == GDT_Float32 ? \
393 ((float *)papoSource)[ii] : \
394 (eSrcType == GDT_Float64 ? \
395 ((double *)papoSource)[ii] : \
396 (eSrcType == GDT_Int32 ? \
397 ((GInt32 *)papoSource)[ii] : \
398 (eSrcType == GDT_UInt16 ? \
399 ((GUInt16 *)papoSource)[ii] : \
400 (eSrcType == GDT_Int16 ? \
401 ((GInt16 *)papoSource)[ii] : \
402 (eSrcType == GDT_UInt32 ? \
403 ((GUInt32 *)papoSource)[ii] : \
404 (eSrcType == GDT_CInt16 ? \
405 ((GInt16 *)papoSource)[ii * 2] : \
406 (eSrcType == GDT_CInt32 ? \
407 ((GInt32 *)papoSource)[ii * 2] : \
408 (eSrcType == GDT_CFloat32 ? \
409 ((float *)papoSource)[ii * 2] : \
410 (eSrcType == GDT_CFloat64 ? \
411 ((double *)papoSource)[ii * 2] : 0)))))))))))
414 (*GDALDerivedPixelFunc)(
void **papoSources,
int nSources,
void *pData,
415 int nBufXSize,
int nBufYSize,
417 int nPixelSpace,
int nLineSpace);
420 void CPL_DLL CPL_STDCALL
424 int nDSXOff,
int nDSYOff,
int nDSXSize,
int nDSYSize,
425 int nBXSize,
int nBYSize,
GDALDataType eBDataType,
char **papszOptions );
427 CPLErr CPL_DLL CPL_STDCALL
429 int nDSXOff,
int nDSYOff,
int nDSXSize,
int nDSYSize,
430 void * pBuffer,
int nBXSize,
int nBYSize,
GDALDataType eBDataType,
431 int nPixelSpace,
int nLineSpace );
442 CPLErr CPL_DLL CPL_STDCALL
457 double *pdfMin,
double *pdfMax,
double *pdfMean,
double *pdfStdDev );
460 double *pdfMin,
double *pdfMax,
double *pdfMean,
double *pdfStdDev,
461 GDALProgressFunc pfnProgress,
void *pProgressData );
464 double dfMin,
double dfMax,
double dfMean,
double dfStdDev );
472 void CPL_DLL CPL_STDCALL
474 double adfMinMax[2] );
477 double dfMin,
double dfMax,
478 int nBuckets,
int *panHistogram,
479 int bIncludeOutOfRange,
int bApproxOK,
480 GDALProgressFunc pfnProgress,
481 void * pProgressData );
483 double *pdfMin,
double *pdfMax,
484 int *pnBuckets,
int **ppanHistogram,
486 GDALProgressFunc pfnProgress,
487 void * pProgressData );
489 double dfMin,
double dfMax,
490 int nBuckets,
int *panHistogram );
491 int CPL_DLL CPL_STDCALL
496 double dfRealValue,
double dfImaginaryValue );
497 CPLErr CPL_DLL CPL_STDCALL
499 double *pdfMean,
double *pdfStdDev,
500 GDALProgressFunc pfnProgress,
501 void *pProgressData );
502 CPLErr CPL_DLL GDALOverviewMagnitudeCorrection(
GDALRasterBandH hBaseBand,
505 GDALProgressFunc pfnProgress,
506 void *pProgressData );
513 GDALDerivedPixelFunc pfnPixelFunc );
517 CPLErr CPL_DLL CPL_STDCALL
520 #define GMF_ALL_VALID 0x01
521 #define GMF_PER_DATASET 0x02
522 #define GMF_ALPHA 0x04
523 #define GMF_NODATA 0x08
531 int* pnXBufOff,
int* pnYBufOff,
532 int* pnXBufSize,
int* pnYBufSize );
542 void CPL_DLL CPL_STDCALL
GDALSwapWords(
void *pData,
int nWordSize,
int nWordCount,
544 void CPL_DLL CPL_STDCALL
546 void * pDstData,
GDALDataType eDstType,
int nDstPixelOffset,
550 GDALCopyBits(
const GByte *pabySrcData,
int nSrcOffset,
int nSrcStep,
551 GByte *pabyDstData,
int nDstOffset,
int nDstStep,
552 int nBitCount,
int nStepCount );
559 int CPL_DLL CPL_STDCALL GDALLoadTabFile(
const char *,
double *,
char **,
561 int CPL_DLL CPL_STDCALL GDALReadTabFile(
const char *,
double *,
char **,
563 int CPL_DLL CPL_STDCALL GDALLoadOziMapFile(
const char *,
double *,
char **,
565 int CPL_DLL CPL_STDCALL GDALReadOziMapFile(
const char * ,
double *,
567 char CPL_DLL ** CPL_STDCALL GDALLoadRPBFile(
const char *pszFilename,
568 char **papszSiblingFiles );
569 char CPL_DLL ** CPL_STDCALL GDALLoadRPCFile(
const char *pszFilename,
570 char **papszSiblingFiles );
571 CPLErr CPL_DLL CPL_STDCALL GDALWriteRPBFile(
const char *pszFilename,
573 char CPL_DLL ** CPL_STDCALL GDALLoadIMDFile(
const char *pszFilename,
574 char **papszSiblingFiles );
575 CPLErr CPL_DLL CPL_STDCALL GDALWriteIMDFile(
const char *pszFilename,
578 const char CPL_DLL * CPL_STDCALL GDALDecToDMS(
double,
const char *,
int );
584 #ifndef GDAL_VERSION_INFO_DEFINED
585 #define GDAL_VERSION_INFO_DEFINED
589 #ifndef GDAL_CHECK_VERSION
591 int CPL_DLL CPL_STDCALL
GDALCheckVersion(
int nVersionMajor,
int nVersionMinor,
592 const char* pszCallingComponentName);
597 #define GDAL_CHECK_VERSION(pszCallingComponentName) \
598 GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName)
613 double dfHEIGHT_SCALE;
615 double adfLINE_NUM_COEFF[20];
616 double adfLINE_DEN_COEFF[20];
617 double adfSAMP_NUM_COEFF[20];
618 double adfSAMP_DEN_COEFF[20];
627 int CPL_DLL CPL_STDCALL GDALExtractRPCInfo(
char **,
GDALRPCInfo * );
673 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
735 double *,
double * );