00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
#ifndef GDAL_H_INCLUDED
00154
#define GDAL_H_INCLUDED
00155
00162
#include "cpl_port.h"
00163
#include "cpl_error.h"
00164
00165
00166
00167
00168
#ifndef GDAL_VERSION_NUM
00169
# define GDAL_VERSION_NUM 1210
00170
#endif
00171
#ifndef GDAL_RELEASE_DATE
00172
# define GDAL_RELEASE_DATE 20040623
00173
#endif
00174
#ifndef GDAL_RELEASE_NAME
00175
# define GDAL_RELEASE_NAME "1.2.1.0"
00176
#endif
00177
00178
00179
00180
00181
00182 CPL_C_START
00183
00185 typedef enum {
00186 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,
00198 GDT_TypeCount = 12
00199 }
GDALDataType;
00200
00201
int CPL_DLL
GDALGetDataTypeSize( GDALDataType );
00202
int CPL_DLL
GDALDataTypeIsComplex( GDALDataType );
00203
const char CPL_DLL *
GDALGetDataTypeName( GDALDataType );
00204
GDALDataType CPL_DLL
GDALGetDataTypeByName(
const char * );
00205
GDALDataType CPL_DLL
GDALDataTypeUnion( GDALDataType, GDALDataType );
00206
00208 typedef enum {
GA_ReadOnly = 0,
GA_Update = 1
00211 }
GDALAccess;
00212
00214 typedef enum {
GF_Read = 0,
GF_Write = 1
00217 }
GDALRWFlag;
00218
00220 typedef enum
00221 {
00222 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
00236 }
GDALColorInterp;
00237
00239
const char CPL_DLL *
GDALGetColorInterpretationName( GDALColorInterp );
00240
00242 typedef enum
00243 {
GPI_Gray=0,
GPI_RGB=1,
GPI_CMYK=2,
GPI_HLS=3
00248 }
GDALPaletteInterp;
00249
00251
const char CPL_DLL *
GDALGetPaletteInterpretationName( GDALPaletteInterp );
00252
00253
00254
00255
00256
00257
00258
#define CPLE_WrongFormat 200
00259
00260
00261
00262
00263
typedef void *GDALMajorObjectH;
00264
typedef void *GDALDatasetH;
00265
typedef void *GDALRasterBandH;
00266
typedef void *GDALDriverH;
00267
typedef void *GDALProjDefH;
00268
typedef void *GDALColorTableH;
00269
00270
00271
00272
00273
00274 typedef int (*
GDALProgressFunc)(
double,
const char *,
void *);
00275
int CPL_DLL
GDALDummyProgress(
double,
const char *,
void *);
00276
int CPL_DLL
GDALTermProgress(
double,
const char *,
void *);
00277
int CPL_DLL
GDALScaledProgress(
double,
const char *,
void *);
00278
void CPL_DLL *
GDALCreateScaledProgress(
double,
double,
00279
GDALProgressFunc,
void * );
00280
void CPL_DLL
GDALDestroyScaledProgress(
void * );
00281
00282
00283
00284
00285
00286
typedef struct {
00287
char *pszOptionName;
00288
char *pszValueType;
00289
00290
char *pszDescription;
00291
char **papszOptions;
00292 } GDALOptionDefinition;
00293
00294
#define GDAL_DMD_LONGNAME "DMD_LONGNAME"
00295
#define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
00296
#define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
00297
#define GDAL_DMD_EXTENSION "DMD_EXTENSION"
00298
#define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST"
00299
#define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES"
00300
00301
#define GDAL_DCAP_CREATE "DCAP_CREATE"
00302
#define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
00303
00304
void CPL_DLL
GDALAllRegister(
void );
00305
00306 GDALDatasetH CPL_DLL
GDALCreate( GDALDriverH hDriver,
00307
const char *,
int,
int,
int, GDALDataType,
00308
char ** );
00309 GDALDatasetH CPL_DLL
GDALCreateCopy( GDALDriverH,
const char *, GDALDatasetH,
00310
int,
char **,
GDALProgressFunc,
void * );
00311
00312 GDALDatasetH CPL_DLL
GDALOpen(
const char *pszFilename, GDALAccess eAccess );
00313 GDALDatasetH CPL_DLL
GDALOpenShared(
const char *, GDALAccess );
00314
int CPL_DLL
GDALDumpOpenDatasets( FILE * );
00315
00316 GDALDriverH CPL_DLL
GDALGetDriverByName(
const char * );
00317
int CPL_DLL
GDALGetDriverCount();
00318 GDALDriverH CPL_DLL
GDALGetDriver(
int );
00319
int CPL_DLL
GDALRegisterDriver( GDALDriverH );
00320
void CPL_DLL
GDALDeregisterDriver( GDALDriverH );
00321
void CPL_DLL
GDALDestroyDriverManager(
void );
00322 CPLErr CPL_DLL
GDALDeleteDataset( GDALDriverH,
const char * );
00323
00324
00325
const char CPL_DLL *GDALGetDriverShortName( GDALDriverH );
00326
const char CPL_DLL *GDALGetDriverLongName( GDALDriverH );
00327
const char CPL_DLL *GDALGetDriverHelpTopic( GDALDriverH );
00328
00329
00330
00331
00332
00334 typedef struct
00335
{
00337 char *pszId;
00338
00340 char *pszInfo;
00341
00343 double dfGCPPixel;
00345 double dfGCPLine;
00346
00348 double dfGCPX;
00349
00351 double dfGCPY;
00352
00354 double dfGCPZ;
00355 }
GDAL_GCP;
00356
00357
void CPL_DLL GDALInitGCPs(
int,
GDAL_GCP * );
00358
void CPL_DLL GDALDeinitGCPs(
int,
GDAL_GCP * );
00359
GDAL_GCP CPL_DLL *GDALDuplicateGCPs(
int,
const GDAL_GCP * );
00360
00361
int CPL_DLL
GDALGCPsToGeoTransform(
int nGCPCount,
const GDAL_GCP *pasGCPs,
00362
double *padfGeoTransform,
int bApproxOK );
00363
int CPL_DLL
GDALInvGeoTransform(
double *padfGeoTransformIn,
00364
double *padfInvGeoTransformOut );
00365
void CPL_DLL
GDALApplyGeoTransform(
double *,
double,
double,
00366
double *,
double * );
00367
00368
00369
00370
00371
00372
char CPL_DLL **
GDALGetMetadata( GDALMajorObjectH,
const char * );
00373 CPLErr CPL_DLL
GDALSetMetadata( GDALMajorObjectH,
char **,
00374
const char * );
00375
const char CPL_DLL *
GDALGetMetadataItem( GDALMajorObjectH,
const char *,
00376
const char * );
00377 CPLErr CPL_DLL
GDALSetMetadataItem( GDALMajorObjectH,
00378
const char *,
const char *,
00379
const char * );
00380
const char CPL_DLL *
GDALGetDescription( GDALMajorObjectH );
00381
void CPL_DLL
GDALSetDescription( GDALMajorObjectH,
const char * );
00382
00383
00384
00385
00386
00387 GDALDriverH CPL_DLL
GDALGetDatasetDriver( GDALDatasetH );
00388
void CPL_DLL
GDALClose( GDALDatasetH );
00389
int CPL_DLL
GDALGetRasterXSize( GDALDatasetH );
00390
int CPL_DLL
GDALGetRasterYSize( GDALDatasetH );
00391
int CPL_DLL
GDALGetRasterCount( GDALDatasetH );
00392 GDALRasterBandH CPL_DLL
GDALGetRasterBand( GDALDatasetH,
int );
00393
00394 CPLErr CPL_DLL
GDALAddBand( GDALDatasetH hDS, GDALDataType eType,
00395
char **papszOptions );
00396
00397 CPLErr CPL_DLL
GDALDatasetRasterIO(
00398 GDALDatasetH hDS, GDALRWFlag eRWFlag,
00399
int nDSXOff,
int nDSYOff,
int nDSXSize,
int nDSYSize,
00400
void * pBuffer,
int nBXSize,
int nBYSize, GDALDataType eBDataType,
00401
int nBandCount,
int *panBandCount,
00402
int nPixelSpace,
int nLineSpace,
int nBandSpace);
00403
00404
const char CPL_DLL *
GDALGetProjectionRef( GDALDatasetH );
00405 CPLErr CPL_DLL
GDALSetProjection( GDALDatasetH,
const char * );
00406 CPLErr CPL_DLL
GDALGetGeoTransform( GDALDatasetH,
double * );
00407 CPLErr CPL_DLL
GDALSetGeoTransform( GDALDatasetH,
double * );
00408
00409
int CPL_DLL
GDALGetGCPCount( GDALDatasetH );
00410
const char CPL_DLL *
GDALGetGCPProjection( GDALDatasetH );
00411
const GDAL_GCP CPL_DLL *
GDALGetGCPs( GDALDatasetH );
00412 CPLErr CPL_DLL
GDALSetGCPs( GDALDatasetH,
int,
const GDAL_GCP *,
00413
const char * );
00414
00415
void CPL_DLL *
GDALGetInternalHandle( GDALDatasetH,
const char * );
00416
int CPL_DLL
GDALReferenceDataset( GDALDatasetH );
00417
int CPL_DLL
GDALDereferenceDataset( GDALDatasetH );
00418
00419 CPLErr CPL_DLL
GDALBuildOverviews( GDALDatasetH,
const char *,
int,
int *,
00420
int,
int *,
GDALProgressFunc,
void * );
00421
void CPL_DLL
GDALGetOpenDatasets( GDALDatasetH ***hDS,
int *pnCount );
00422
int CPL_DLL
GDALGetAccess( GDALDatasetH hDS );
00423
void CPL_DLL
GDALFlushCache( GDALDatasetH hDS );
00424
00425
00426
00427
00428
00429
GDALDataType CPL_DLL
GDALGetRasterDataType( GDALRasterBandH );
00430
void CPL_DLL
GDALGetBlockSize( GDALRasterBandH,
00431
int * pnXSize,
int * pnYSize );
00432
00433 CPLErr CPL_DLL
GDALRasterIO( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
00434
int nDSXOff,
int nDSYOff,
00435
int nDSXSize,
int nDSYSize,
00436
void * pBuffer,
int nBXSize,
int nBYSize,
00437 GDALDataType eBDataType,
00438
int nPixelSpace,
int nLineSpace );
00439 CPLErr CPL_DLL
GDALReadBlock( GDALRasterBandH,
int,
int,
void * );
00440 CPLErr CPL_DLL
GDALWriteBlock( GDALRasterBandH,
int,
int,
void * );
00441
int CPL_DLL
GDALGetRasterBandXSize( GDALRasterBandH );
00442
int CPL_DLL
GDALGetRasterBandYSize( GDALRasterBandH );
00443
char CPL_DLL **GDALGetRasterMetadata( GDALRasterBandH );
00444
GDALAccess CPL_DLL
GDALGetRasterAccess( GDALRasterBandH );
00445
int CPL_DLL
GDALGetBandNumber( GDALRasterBandH );
00446 GDALDatasetH CPL_DLL
GDALGetBandDataset( GDALRasterBandH );
00447
00448
GDALColorInterp CPL_DLL
GDALGetRasterColorInterpretation( GDALRasterBandH );
00449 CPLErr CPL_DLL
GDALSetRasterColorInterpretation( GDALRasterBandH,
00450 GDALColorInterp );
00451 GDALColorTableH CPL_DLL
GDALGetRasterColorTable( GDALRasterBandH );
00452 CPLErr CPL_DLL
GDALSetRasterColorTable( GDALRasterBandH, GDALColorTableH );
00453
int CPL_DLL
GDALHasArbitraryOverviews( GDALRasterBandH );
00454
int CPL_DLL
GDALGetOverviewCount( GDALRasterBandH );
00455 GDALRasterBandH CPL_DLL
GDALGetOverview( GDALRasterBandH,
int );
00456
double CPL_DLL
GDALGetRasterNoDataValue( GDALRasterBandH,
int * );
00457 CPLErr CPL_DLL
GDALSetRasterNoDataValue( GDALRasterBandH,
double );
00458
char CPL_DLL **
GDALGetRasterCategoryNames( GDALRasterBandH );
00459 CPLErr CPL_DLL
GDALSetRasterCategoryNames( GDALRasterBandH,
char ** );
00460
double CPL_DLL
GDALGetRasterMinimum( GDALRasterBandH,
int *pbSuccess );
00461
double CPL_DLL
GDALGetRasterMaximum( GDALRasterBandH,
int *pbSuccess );
00462
const char CPL_DLL *
GDALGetRasterUnitType( GDALRasterBandH );
00463
double CPL_DLL GDALGetRasterOffset( GDALRasterBandH,
int *pbSuccess );
00464
double CPL_DLL GDALGetRasterScale( GDALRasterBandH,
int *pbSuccess );
00465
void CPL_DLL
GDALComputeRasterMinMax( GDALRasterBandH hBand,
int bApproxOK,
00466
double adfMinMax[2] );
00467 CPLErr CPL_DLL
GDALFlushRasterCache( GDALRasterBandH hBand );
00468 CPLErr CPL_DLL
GDALGetRasterHistogram( GDALRasterBandH hBand,
00469
double dfMin,
double dfMax,
00470
int nBuckets,
int *panHistogram,
00471
int bIncludeOutOfRange,
int bApproxOK,
00472
GDALProgressFunc pfnProgress,
00473
void * pProgressData );
00474
int CPL_DLL GDALGetRandomRasterSample( GDALRasterBandH,
int,
float * );
00475 GDALRasterBandH CPL_DLL
GDALGetRasterSampleOverview( GDALRasterBandH,
int );
00476 CPLErr CPL_DLL
GDALFillRaster( GDALRasterBandH hBand,
double dfRealValue,
00477
double dfImaginaryValue );
00478 CPLErr GDALComputeBandStats( GDALRasterBandH hBand,
int nSampleStep,
00479
double *pdfMean,
double *pdfStdDev,
00480
GDALProgressFunc pfnProgress,
00481
void *pProgressData );
00482 CPLErr GDALOverviewMagnitudeCorrection( GDALRasterBandH hBaseBand,
00483
int nOverviewCount,
00484 GDALRasterBandH *pahOverviews,
00485
GDALProgressFunc pfnProgress,
00486
void *pProgressData );
00487
00488
00489
00490
00491
int CPL_DLL
GDALGeneralCmdLineProcessor(
int nArgc,
char ***ppapszArgv,
00492
int nOptions );
00493
void CPL_DLL
GDALSwapWords(
void *pData,
int nWordSize,
int nWordCount,
00494
int nWordSkip );
00495
void CPL_DLL
00496
GDALCopyWords(
void * pSrcData, GDALDataType eSrcType,
int nSrcPixelOffset,
00497
void * pDstData, GDALDataType eDstType,
int nDstPixelOffset,
00498
int nWordCount );
00499
00500
int CPL_DLL
GDALReadWorldFile(
const char *pszBaseFilename,
00501
const char *pszExtension,
00502
double * padfGeoTransform );
00503
int CPL_DLL GDALWriteWorldFile(
const char *pszBaseFilename,
00504
const char *pszExtension,
00505
double * padfGeoTransform );
00506
int CPL_DLL GDALReadTabFile(
const char *pszBaseFilename,
00507
double *padfGeoTransform,
char **ppszWKT,
00508
int *pnGCPCount,
GDAL_GCP **ppasGCPs );
00509
00510
const char CPL_DLL *GDALDecToDMS(
double,
const char *,
int );
00511
double CPL_DLL
GDALPackedDMSToDec(
double );
00512
double CPL_DLL
GDALDecToPackedDMS(
double );
00513
00514
const char CPL_DLL *
GDALVersionInfo(
const char * );
00515
00516
typedef struct {
00517
double dfLINE_OFF;
00518
double dfSAMP_OFF;
00519
double dfLAT_OFF;
00520
double dfLONG_OFF;
00521
double dfHEIGHT_OFF;
00522
00523
double dfLINE_SCALE;
00524
double dfSAMP_SCALE;
00525
double dfLAT_SCALE;
00526
double dfLONG_SCALE;
00527
double dfHEIGHT_SCALE;
00528
00529
double adfLINE_NUM_COEFF[20];
00530
double adfLINE_DEN_COEFF[20];
00531
double adfSAMP_NUM_COEFF[20];
00532
double adfSAMP_DEN_COEFF[20];
00533
00534
double dfMIN_LONG;
00535
double dfMIN_LAT;
00536
double dfMAX_LONG;
00537
double dfMAX_LAT;
00538
00539 } GDALRPCInfo;
00540
00541
int CPL_DLL GDALExtractRPCInfo(
char **, GDALRPCInfo * );
00542
00543
00544
00545
00547 typedef struct
00548
{
00550 short c1;
00551
00553 short c2;
00554
00556 short c3;
00557
00559 short c4;
00560 }
GDALColorEntry;
00561
00562 GDALColorTableH CPL_DLL GDALCreateColorTable( GDALPaletteInterp );
00563
void CPL_DLL GDALDestroyColorTable( GDALColorTableH );
00564 GDALColorTableH CPL_DLL GDALCloneColorTable( GDALColorTableH );
00565
GDALPaletteInterp CPL_DLL GDALGetPaletteInterpretation( GDALColorTableH );
00566
int CPL_DLL GDALGetColorEntryCount( GDALColorTableH );
00567
const GDALColorEntry CPL_DLL *GDALGetColorEntry( GDALColorTableH,
int );
00568
int CPL_DLL GDALGetColorEntryAsRGB( GDALColorTableH,
int,
GDALColorEntry *);
00569
void CPL_DLL GDALSetColorEntry( GDALColorTableH,
int,
const GDALColorEntry * );
00570
00571
00572
00573
00574
00575
void CPL_DLL
GDALSetCacheMax(
int nBytes );
00576
int CPL_DLL
GDALGetCacheMax();
00577
int CPL_DLL
GDALGetCacheUsed();
00578
int CPL_DLL GDALFlushCacheBlock();
00579
00580 CPL_C_END
00581
00582
#endif