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 #ifndef GDAL_H_INCLUDED
00032 #define GDAL_H_INCLUDED
00033
00040 #ifndef DOXYGEN_SKIP
00041 #include "gdal_version.h"
00042 #include "cpl_port.h"
00043 #include "cpl_error.h"
00044 #include "cpl_progress.h"
00045 #include "cpl_virtualmem.h"
00046 #endif
00047
00048
00049
00050
00051
00052 CPL_C_START
00053
00055 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,
00068 GDT_TypeCount = 12
00069 } GDALDataType;
00070
00071 int CPL_DLL CPL_STDCALL GDALGetDataTypeSize( GDALDataType );
00072 int CPL_DLL CPL_STDCALL GDALDataTypeIsComplex( GDALDataType );
00073 const char CPL_DLL * CPL_STDCALL GDALGetDataTypeName( GDALDataType );
00074 GDALDataType CPL_DLL CPL_STDCALL GDALGetDataTypeByName( const char * );
00075 GDALDataType CPL_DLL CPL_STDCALL GDALDataTypeUnion( GDALDataType, GDALDataType );
00076
00080 typedef enum
00081 {
00082 GARIO_PENDING = 0,
00083 GARIO_UPDATE = 1,
00084 GARIO_ERROR = 2,
00085 GARIO_COMPLETE = 3,
00086 GARIO_TypeCount = 4
00087 } GDALAsyncStatusType;
00088
00089 const char CPL_DLL * CPL_STDCALL GDALGetAsyncStatusTypeName( GDALAsyncStatusType );
00090 GDALAsyncStatusType CPL_DLL CPL_STDCALL GDALGetAsyncStatusTypeByName( const char * );
00091
00093 typedef enum { GA_ReadOnly = 0, GA_Update = 1
00096 } GDALAccess;
00097
00099 typedef enum { GF_Read = 0, GF_Write = 1
00102 } GDALRWFlag;
00103
00105 typedef enum
00106 {
00107 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
00125 } GDALColorInterp;
00126
00127 const char CPL_DLL *GDALGetColorInterpretationName( GDALColorInterp );
00128 GDALColorInterp CPL_DLL GDALGetColorInterpretationByName( const char *pszName );
00129
00131 typedef enum
00132 { GPI_Gray=0, GPI_RGB=1, GPI_CMYK=2, GPI_HLS=3
00137 } GDALPaletteInterp;
00138
00139 const char CPL_DLL *GDALGetPaletteInterpretationName( GDALPaletteInterp );
00140
00141
00142
00143 #define GDALMD_AREA_OR_POINT "AREA_OR_POINT"
00144 # define GDALMD_AOP_AREA "Area"
00145 # define GDALMD_AOP_POINT "Point"
00146
00147
00148
00149
00150
00151
00152 #define CPLE_WrongFormat 200
00153
00154
00155
00156
00157
00159 typedef void *GDALMajorObjectH;
00160
00162 typedef void *GDALDatasetH;
00163
00165 typedef void *GDALRasterBandH;
00166
00168 typedef void *GDALDriverH;
00169
00170 #ifndef DOXYGEN_SKIP
00171
00172 typedef void *GDALProjDefH;
00173 #endif
00174
00176 typedef void *GDALColorTableH;
00177
00179 typedef void *GDALRasterAttributeTableH;
00180
00182 typedef void *GDALAsyncReaderH;
00183
00184
00185
00186
00187
00188 #ifndef DOXYGEN_SKIP
00189
00190 typedef struct {
00191 char *pszOptionName;
00192 char *pszValueType;
00193
00194 char *pszDescription;
00195 char **papszOptions;
00196 } GDALOptionDefinition;
00197 #endif
00198
00199 #define GDAL_DMD_LONGNAME "DMD_LONGNAME"
00200 #define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
00201 #define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
00202 #define GDAL_DMD_EXTENSION "DMD_EXTENSION"
00203 #define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST"
00204 #define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES"
00205 #define GDAL_DMD_SUBDATASETS "DMD_SUBDATASETS"
00206
00207 #define GDAL_DCAP_CREATE "DCAP_CREATE"
00208 #define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
00209 #define GDAL_DCAP_VIRTUALIO "DCAP_VIRTUALIO"
00210
00211 void CPL_DLL CPL_STDCALL GDALAllRegister( void );
00212
00213 GDALDatasetH CPL_DLL CPL_STDCALL GDALCreate( GDALDriverH hDriver,
00214 const char *, int, int, int, GDALDataType,
00215 char ** ) CPL_WARN_UNUSED_RESULT;
00216 GDALDatasetH CPL_DLL CPL_STDCALL
00217 GDALCreateCopy( GDALDriverH, const char *, GDALDatasetH,
00218 int, char **, GDALProgressFunc, void * ) CPL_WARN_UNUSED_RESULT;
00219
00220 GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriver( const char * pszFilename,
00221 char ** papszFileList );
00222 GDALDatasetH CPL_DLL CPL_STDCALL
00223 GDALOpen( const char *pszFilename, GDALAccess eAccess ) CPL_WARN_UNUSED_RESULT;
00224 GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenShared( const char *, GDALAccess ) CPL_WARN_UNUSED_RESULT;
00225 int CPL_DLL CPL_STDCALL GDALDumpOpenDatasets( FILE * );
00226
00227 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriverByName( const char * );
00228 int CPL_DLL CPL_STDCALL GDALGetDriverCount( void );
00229 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriver( int );
00230 void CPL_DLL CPL_STDCALL GDALDestroyDriver( GDALDriverH );
00231 int CPL_DLL CPL_STDCALL GDALRegisterDriver( GDALDriverH );
00232 void CPL_DLL CPL_STDCALL GDALDeregisterDriver( GDALDriverH );
00233 void CPL_DLL CPL_STDCALL GDALDestroyDriverManager( void );
00234 CPLErr CPL_DLL CPL_STDCALL GDALDeleteDataset( GDALDriverH, const char * );
00235 CPLErr CPL_DLL CPL_STDCALL GDALRenameDataset( GDALDriverH,
00236 const char * pszNewName,
00237 const char * pszOldName );
00238 CPLErr CPL_DLL CPL_STDCALL GDALCopyDatasetFiles( GDALDriverH,
00239 const char * pszNewName,
00240 const char * pszOldName);
00241 int CPL_DLL CPL_STDCALL GDALValidateCreationOptions( GDALDriverH,
00242 char** papszCreationOptions);
00243
00244
00245 const char CPL_DLL * CPL_STDCALL GDALGetDriverShortName( GDALDriverH );
00246 const char CPL_DLL * CPL_STDCALL GDALGetDriverLongName( GDALDriverH );
00247 const char CPL_DLL * CPL_STDCALL GDALGetDriverHelpTopic( GDALDriverH );
00248 const char CPL_DLL * CPL_STDCALL GDALGetDriverCreationOptionList( GDALDriverH );
00249
00250
00251
00252
00253
00255 typedef struct
00256 {
00258 char *pszId;
00259
00261 char *pszInfo;
00262
00264 double dfGCPPixel;
00266 double dfGCPLine;
00267
00269 double dfGCPX;
00270
00272 double dfGCPY;
00273
00275 double dfGCPZ;
00276 } GDAL_GCP;
00277
00278 void CPL_DLL CPL_STDCALL GDALInitGCPs( int, GDAL_GCP * );
00279 void CPL_DLL CPL_STDCALL GDALDeinitGCPs( int, GDAL_GCP * );
00280 GDAL_GCP CPL_DLL * CPL_STDCALL GDALDuplicateGCPs( int, const GDAL_GCP * );
00281
00282 int CPL_DLL CPL_STDCALL
00283 GDALGCPsToGeoTransform( int nGCPCount, const GDAL_GCP *pasGCPs,
00284 double *padfGeoTransform, int bApproxOK ) CPL_WARN_UNUSED_RESULT;
00285 int CPL_DLL CPL_STDCALL
00286 GDALInvGeoTransform( double *padfGeoTransformIn,
00287 double *padfInvGeoTransformOut ) CPL_WARN_UNUSED_RESULT;
00288 void CPL_DLL CPL_STDCALL GDALApplyGeoTransform( double *, double, double,
00289 double *, double * );
00290 void CPL_DLL GDALComposeGeoTransforms(const double *padfGeoTransform1,
00291 const double *padfGeoTransform2,
00292 double *padfGeoTransformOut);
00293
00294
00295
00296
00297
00298 char CPL_DLL ** CPL_STDCALL GDALGetMetadataDomainList( GDALMajorObjectH hObject );
00299 char CPL_DLL ** CPL_STDCALL GDALGetMetadata( GDALMajorObjectH, const char * );
00300 CPLErr CPL_DLL CPL_STDCALL GDALSetMetadata( GDALMajorObjectH, char **,
00301 const char * );
00302 const char CPL_DLL * CPL_STDCALL
00303 GDALGetMetadataItem( GDALMajorObjectH, const char *, const char * );
00304 CPLErr CPL_DLL CPL_STDCALL
00305 GDALSetMetadataItem( GDALMajorObjectH, const char *, const char *,
00306 const char * );
00307 const char CPL_DLL * CPL_STDCALL GDALGetDescription( GDALMajorObjectH );
00308 void CPL_DLL CPL_STDCALL GDALSetDescription( GDALMajorObjectH, const char * );
00309
00310
00311
00312
00313
00314 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDatasetDriver( GDALDatasetH );
00315 char CPL_DLL ** CPL_STDCALL GDALGetFileList( GDALDatasetH );
00316 void CPL_DLL CPL_STDCALL GDALClose( GDALDatasetH );
00317 int CPL_DLL CPL_STDCALL GDALGetRasterXSize( GDALDatasetH );
00318 int CPL_DLL CPL_STDCALL GDALGetRasterYSize( GDALDatasetH );
00319 int CPL_DLL CPL_STDCALL GDALGetRasterCount( GDALDatasetH );
00320 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetRasterBand( GDALDatasetH, int );
00321
00322 CPLErr CPL_DLL CPL_STDCALL GDALAddBand( GDALDatasetH hDS, GDALDataType eType,
00323 char **papszOptions );
00324
00325 GDALAsyncReaderH CPL_DLL CPL_STDCALL
00326 GDALBeginAsyncReader(GDALDatasetH hDS, int nXOff, int nYOff,
00327 int nXSize, int nYSize,
00328 void *pBuf, int nBufXSize, int nBufYSize,
00329 GDALDataType eBufType, int nBandCount, int* panBandMap,
00330 int nPixelSpace, int nLineSpace, int nBandSpace,
00331 char **papszOptions);
00332
00333 void CPL_DLL CPL_STDCALL
00334 GDALEndAsyncReader(GDALDatasetH hDS, GDALAsyncReaderH hAsynchReaderH);
00335
00336 CPLErr CPL_DLL CPL_STDCALL GDALDatasetRasterIO(
00337 GDALDatasetH hDS, GDALRWFlag eRWFlag,
00338 int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00339 void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType,
00340 int nBandCount, int *panBandCount,
00341 int nPixelSpace, int nLineSpace, int nBandSpace);
00342
00343 CPLErr CPL_DLL CPL_STDCALL GDALDatasetAdviseRead( GDALDatasetH hDS,
00344 int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00345 int nBXSize, int nBYSize, GDALDataType eBDataType,
00346 int nBandCount, int *panBandCount, char **papszOptions );
00347
00348 const char CPL_DLL * CPL_STDCALL GDALGetProjectionRef( GDALDatasetH );
00349 CPLErr CPL_DLL CPL_STDCALL GDALSetProjection( GDALDatasetH, const char * );
00350 CPLErr CPL_DLL CPL_STDCALL GDALGetGeoTransform( GDALDatasetH, double * );
00351 CPLErr CPL_DLL CPL_STDCALL GDALSetGeoTransform( GDALDatasetH, double * );
00352
00353 int CPL_DLL CPL_STDCALL GDALGetGCPCount( GDALDatasetH );
00354 const char CPL_DLL * CPL_STDCALL GDALGetGCPProjection( GDALDatasetH );
00355 const GDAL_GCP CPL_DLL * CPL_STDCALL GDALGetGCPs( GDALDatasetH );
00356 CPLErr CPL_DLL CPL_STDCALL GDALSetGCPs( GDALDatasetH, int, const GDAL_GCP *,
00357 const char * );
00358
00359 void CPL_DLL * CPL_STDCALL GDALGetInternalHandle( GDALDatasetH, const char * );
00360 int CPL_DLL CPL_STDCALL GDALReferenceDataset( GDALDatasetH );
00361 int CPL_DLL CPL_STDCALL GDALDereferenceDataset( GDALDatasetH );
00362
00363 CPLErr CPL_DLL CPL_STDCALL
00364 GDALBuildOverviews( GDALDatasetH, const char *, int, int *,
00365 int, int *, GDALProgressFunc, void * );
00366 void CPL_DLL CPL_STDCALL GDALGetOpenDatasets( GDALDatasetH **hDS, int *pnCount );
00367 int CPL_DLL CPL_STDCALL GDALGetAccess( GDALDatasetH hDS );
00368 void CPL_DLL CPL_STDCALL GDALFlushCache( GDALDatasetH hDS );
00369
00370 CPLErr CPL_DLL CPL_STDCALL
00371 GDALCreateDatasetMaskBand( GDALDatasetH hDS, int nFlags );
00372
00373 CPLErr CPL_DLL CPL_STDCALL GDALDatasetCopyWholeRaster(
00374 GDALDatasetH hSrcDS, GDALDatasetH hDstDS, char **papszOptions,
00375 GDALProgressFunc pfnProgress, void *pProgressData );
00376
00377 CPLErr CPL_DLL CPL_STDCALL GDALRasterBandCopyWholeRaster(
00378 GDALRasterBandH hSrcBand, GDALRasterBandH hDstBand, char **papszOptions,
00379 GDALProgressFunc pfnProgress, void *pProgressData );
00380
00381 CPLErr CPL_DLL
00382 GDALRegenerateOverviews( GDALRasterBandH hSrcBand,
00383 int nOverviewCount, GDALRasterBandH *pahOverviewBands,
00384 const char *pszResampling,
00385 GDALProgressFunc pfnProgress, void *pProgressData );
00386
00387
00388
00389
00390
00395 #define SRCVAL(papoSource, eSrcType, ii) \
00396 (eSrcType == GDT_Byte ? \
00397 ((GByte *)papoSource)[ii] : \
00398 (eSrcType == GDT_Float32 ? \
00399 ((float *)papoSource)[ii] : \
00400 (eSrcType == GDT_Float64 ? \
00401 ((double *)papoSource)[ii] : \
00402 (eSrcType == GDT_Int32 ? \
00403 ((GInt32 *)papoSource)[ii] : \
00404 (eSrcType == GDT_UInt16 ? \
00405 ((GUInt16 *)papoSource)[ii] : \
00406 (eSrcType == GDT_Int16 ? \
00407 ((GInt16 *)papoSource)[ii] : \
00408 (eSrcType == GDT_UInt32 ? \
00409 ((GUInt32 *)papoSource)[ii] : \
00410 (eSrcType == GDT_CInt16 ? \
00411 ((GInt16 *)papoSource)[ii * 2] : \
00412 (eSrcType == GDT_CInt32 ? \
00413 ((GInt32 *)papoSource)[ii * 2] : \
00414 (eSrcType == GDT_CFloat32 ? \
00415 ((float *)papoSource)[ii * 2] : \
00416 (eSrcType == GDT_CFloat64 ? \
00417 ((double *)papoSource)[ii * 2] : 0)))))))))))
00418
00419 typedef CPLErr
00420 (*GDALDerivedPixelFunc)(void **papoSources, int nSources, void *pData,
00421 int nBufXSize, int nBufYSize,
00422 GDALDataType eSrcType, GDALDataType eBufType,
00423 int nPixelSpace, int nLineSpace);
00424
00425 GDALDataType CPL_DLL CPL_STDCALL GDALGetRasterDataType( GDALRasterBandH );
00426 void CPL_DLL CPL_STDCALL
00427 GDALGetBlockSize( GDALRasterBandH, int * pnXSize, int * pnYSize );
00428
00429 CPLErr CPL_DLL CPL_STDCALL GDALRasterAdviseRead( GDALRasterBandH hRB,
00430 int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00431 int nBXSize, int nBYSize, GDALDataType eBDataType, char **papszOptions );
00432
00433 CPLErr CPL_DLL CPL_STDCALL
00434 GDALRasterIO( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
00435 int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00436 void * pBuffer, int nBXSize, int nBYSize,GDALDataType eBDataType,
00437 int nPixelSpace, int nLineSpace );
00438 CPLErr CPL_DLL CPL_STDCALL GDALReadBlock( GDALRasterBandH, int, int, void * );
00439 CPLErr CPL_DLL CPL_STDCALL GDALWriteBlock( GDALRasterBandH, int, int, void * );
00440 int CPL_DLL CPL_STDCALL GDALGetRasterBandXSize( GDALRasterBandH );
00441 int CPL_DLL CPL_STDCALL GDALGetRasterBandYSize( GDALRasterBandH );
00442 GDALAccess CPL_DLL CPL_STDCALL GDALGetRasterAccess( GDALRasterBandH );
00443 int CPL_DLL CPL_STDCALL GDALGetBandNumber( GDALRasterBandH );
00444 GDALDatasetH CPL_DLL CPL_STDCALL GDALGetBandDataset( GDALRasterBandH );
00445
00446 GDALColorInterp CPL_DLL CPL_STDCALL
00447 GDALGetRasterColorInterpretation( GDALRasterBandH );
00448 CPLErr CPL_DLL CPL_STDCALL
00449 GDALSetRasterColorInterpretation( GDALRasterBandH, GDALColorInterp );
00450 GDALColorTableH CPL_DLL CPL_STDCALL GDALGetRasterColorTable( GDALRasterBandH );
00451 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterColorTable( GDALRasterBandH, GDALColorTableH );
00452 int CPL_DLL CPL_STDCALL GDALHasArbitraryOverviews( GDALRasterBandH );
00453 int CPL_DLL CPL_STDCALL GDALGetOverviewCount( GDALRasterBandH );
00454 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetOverview( GDALRasterBandH, int );
00455 double CPL_DLL CPL_STDCALL GDALGetRasterNoDataValue( GDALRasterBandH, int * );
00456 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterNoDataValue( GDALRasterBandH, double );
00457 char CPL_DLL ** CPL_STDCALL GDALGetRasterCategoryNames( GDALRasterBandH );
00458 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterCategoryNames( GDALRasterBandH, char ** );
00459 double CPL_DLL CPL_STDCALL GDALGetRasterMinimum( GDALRasterBandH, int *pbSuccess );
00460 double CPL_DLL CPL_STDCALL GDALGetRasterMaximum( GDALRasterBandH, int *pbSuccess );
00461 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterStatistics(
00462 GDALRasterBandH, int bApproxOK, int bForce,
00463 double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev );
00464 CPLErr CPL_DLL CPL_STDCALL GDALComputeRasterStatistics(
00465 GDALRasterBandH, int bApproxOK,
00466 double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev,
00467 GDALProgressFunc pfnProgress, void *pProgressData );
00468 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterStatistics(
00469 GDALRasterBandH hBand,
00470 double dfMin, double dfMax, double dfMean, double dfStdDev );
00471
00472 const char CPL_DLL * CPL_STDCALL GDALGetRasterUnitType( GDALRasterBandH );
00473 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterUnitType( GDALRasterBandH hBand, const char *pszNewValue );
00474 double CPL_DLL CPL_STDCALL GDALGetRasterOffset( GDALRasterBandH, int *pbSuccess );
00475 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterOffset( GDALRasterBandH hBand, double dfNewOffset);
00476 double CPL_DLL CPL_STDCALL GDALGetRasterScale( GDALRasterBandH, int *pbSuccess );
00477 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterScale( GDALRasterBandH hBand, double dfNewOffset );
00478 void CPL_DLL CPL_STDCALL
00479 GDALComputeRasterMinMax( GDALRasterBandH hBand, int bApproxOK,
00480 double adfMinMax[2] );
00481 CPLErr CPL_DLL CPL_STDCALL GDALFlushRasterCache( GDALRasterBandH hBand );
00482 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterHistogram( GDALRasterBandH hBand,
00483 double dfMin, double dfMax,
00484 int nBuckets, int *panHistogram,
00485 int bIncludeOutOfRange, int bApproxOK,
00486 GDALProgressFunc pfnProgress,
00487 void * pProgressData );
00488 CPLErr CPL_DLL CPL_STDCALL GDALGetDefaultHistogram( GDALRasterBandH hBand,
00489 double *pdfMin, double *pdfMax,
00490 int *pnBuckets, int **ppanHistogram,
00491 int bForce,
00492 GDALProgressFunc pfnProgress,
00493 void * pProgressData );
00494 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultHistogram( GDALRasterBandH hBand,
00495 double dfMin, double dfMax,
00496 int nBuckets, int *panHistogram );
00497 int CPL_DLL CPL_STDCALL
00498 GDALGetRandomRasterSample( GDALRasterBandH, int, float * );
00499 GDALRasterBandH CPL_DLL CPL_STDCALL
00500 GDALGetRasterSampleOverview( GDALRasterBandH, int );
00501 CPLErr CPL_DLL CPL_STDCALL GDALFillRaster( GDALRasterBandH hBand,
00502 double dfRealValue, double dfImaginaryValue );
00503 CPLErr CPL_DLL CPL_STDCALL
00504 GDALComputeBandStats( GDALRasterBandH hBand, int nSampleStep,
00505 double *pdfMean, double *pdfStdDev,
00506 GDALProgressFunc pfnProgress,
00507 void *pProgressData );
00508 CPLErr CPL_DLL GDALOverviewMagnitudeCorrection( GDALRasterBandH hBaseBand,
00509 int nOverviewCount,
00510 GDALRasterBandH *pahOverviews,
00511 GDALProgressFunc pfnProgress,
00512 void *pProgressData );
00513
00514 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL GDALGetDefaultRAT(
00515 GDALRasterBandH hBand );
00516 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultRAT( GDALRasterBandH,
00517 GDALRasterAttributeTableH );
00518 CPLErr CPL_DLL CPL_STDCALL GDALAddDerivedBandPixelFunc( const char *pszName,
00519 GDALDerivedPixelFunc pfnPixelFunc );
00520
00521 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetMaskBand( GDALRasterBandH hBand );
00522 int CPL_DLL CPL_STDCALL GDALGetMaskFlags( GDALRasterBandH hBand );
00523 CPLErr CPL_DLL CPL_STDCALL
00524 GDALCreateMaskBand( GDALRasterBandH hBand, int nFlags );
00525
00526 #define GMF_ALL_VALID 0x01
00527 #define GMF_PER_DATASET 0x02
00528 #define GMF_ALPHA 0x04
00529 #define GMF_NODATA 0x08
00530
00531
00532
00533
00534
00535 GDALAsyncStatusType CPL_DLL CPL_STDCALL
00536 GDALARGetNextUpdatedRegion(GDALAsyncReaderH hARIO, double dfTimeout,
00537 int* pnXBufOff, int* pnYBufOff,
00538 int* pnXBufSize, int* pnYBufSize );
00539 int CPL_DLL CPL_STDCALL GDALARLockBuffer(GDALAsyncReaderH hARIO,
00540 double dfTimeout);
00541 void CPL_DLL CPL_STDCALL GDALARUnlockBuffer(GDALAsyncReaderH hARIO);
00542
00543
00544
00545
00546 int CPL_DLL CPL_STDCALL GDALGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv,
00547 int nOptions );
00548 void CPL_DLL CPL_STDCALL GDALSwapWords( void *pData, int nWordSize, int nWordCount,
00549 int nWordSkip );
00550 void CPL_DLL CPL_STDCALL
00551 GDALCopyWords( void * pSrcData, GDALDataType eSrcType, int nSrcPixelOffset,
00552 void * pDstData, GDALDataType eDstType, int nDstPixelOffset,
00553 int nWordCount );
00554
00555 void CPL_DLL
00556 GDALCopyBits( const GByte *pabySrcData, int nSrcOffset, int nSrcStep,
00557 GByte *pabyDstData, int nDstOffset, int nDstStep,
00558 int nBitCount, int nStepCount );
00559
00560 int CPL_DLL CPL_STDCALL GDALLoadWorldFile( const char *, double * );
00561 int CPL_DLL CPL_STDCALL GDALReadWorldFile( const char *, const char *,
00562 double * );
00563 int CPL_DLL CPL_STDCALL GDALWriteWorldFile( const char *, const char *,
00564 double * );
00565 int CPL_DLL CPL_STDCALL GDALLoadTabFile( const char *, double *, char **,
00566 int *, GDAL_GCP ** );
00567 int CPL_DLL CPL_STDCALL GDALReadTabFile( const char *, double *, char **,
00568 int *, GDAL_GCP ** );
00569 int CPL_DLL CPL_STDCALL GDALLoadOziMapFile( const char *, double *, char **,
00570 int *, GDAL_GCP ** );
00571 int CPL_DLL CPL_STDCALL GDALReadOziMapFile( const char * , double *,
00572 char **, int *, GDAL_GCP ** );
00573 char CPL_DLL ** CPL_STDCALL GDALLoadRPBFile( const char *pszFilename,
00574 char **papszSiblingFiles );
00575 char CPL_DLL ** CPL_STDCALL GDALLoadRPCFile( const char *pszFilename,
00576 char **papszSiblingFiles );
00577 CPLErr CPL_DLL CPL_STDCALL GDALWriteRPBFile( const char *pszFilename,
00578 char **papszMD );
00579 char CPL_DLL ** CPL_STDCALL GDALLoadIMDFile( const char *pszFilename,
00580 char **papszSiblingFiles );
00581 CPLErr CPL_DLL CPL_STDCALL GDALWriteIMDFile( const char *pszFilename,
00582 char **papszMD );
00583
00584 const char CPL_DLL * CPL_STDCALL GDALDecToDMS( double, const char *, int );
00585 double CPL_DLL CPL_STDCALL GDALPackedDMSToDec( double );
00586 double CPL_DLL CPL_STDCALL GDALDecToPackedDMS( double );
00587
00588
00589
00590 #ifndef GDAL_VERSION_INFO_DEFINED
00591 #define GDAL_VERSION_INFO_DEFINED
00592 const char CPL_DLL * CPL_STDCALL GDALVersionInfo( const char * );
00593 #endif
00594
00595 #ifndef GDAL_CHECK_VERSION
00596
00597 int CPL_DLL CPL_STDCALL GDALCheckVersion( int nVersionMajor, int nVersionMinor,
00598 const char* pszCallingComponentName);
00599
00603 #define GDAL_CHECK_VERSION(pszCallingComponentName) \
00604 GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName)
00605
00606 #endif
00607
00608 typedef struct {
00609 double dfLINE_OFF;
00610 double dfSAMP_OFF;
00611 double dfLAT_OFF;
00612 double dfLONG_OFF;
00613 double dfHEIGHT_OFF;
00614
00615 double dfLINE_SCALE;
00616 double dfSAMP_SCALE;
00617 double dfLAT_SCALE;
00618 double dfLONG_SCALE;
00619 double dfHEIGHT_SCALE;
00620
00621 double adfLINE_NUM_COEFF[20];
00622 double adfLINE_DEN_COEFF[20];
00623 double adfSAMP_NUM_COEFF[20];
00624 double adfSAMP_DEN_COEFF[20];
00625
00626 double dfMIN_LONG;
00627 double dfMIN_LAT;
00628 double dfMAX_LONG;
00629 double dfMAX_LAT;
00630
00631 } GDALRPCInfo;
00632
00633 int CPL_DLL CPL_STDCALL GDALExtractRPCInfo( char **, GDALRPCInfo * );
00634
00635
00636
00637
00638
00640 typedef struct
00641 {
00643 short c1;
00644
00646 short c2;
00647
00649 short c3;
00650
00652 short c4;
00653 } GDALColorEntry;
00654
00655 GDALColorTableH CPL_DLL CPL_STDCALL GDALCreateColorTable( GDALPaletteInterp );
00656 void CPL_DLL CPL_STDCALL GDALDestroyColorTable( GDALColorTableH );
00657 GDALColorTableH CPL_DLL CPL_STDCALL GDALCloneColorTable( GDALColorTableH );
00658 GDALPaletteInterp CPL_DLL CPL_STDCALL GDALGetPaletteInterpretation( GDALColorTableH );
00659 int CPL_DLL CPL_STDCALL GDALGetColorEntryCount( GDALColorTableH );
00660 const GDALColorEntry CPL_DLL * CPL_STDCALL GDALGetColorEntry( GDALColorTableH, int );
00661 int CPL_DLL CPL_STDCALL GDALGetColorEntryAsRGB( GDALColorTableH, int, GDALColorEntry *);
00662 void CPL_DLL CPL_STDCALL GDALSetColorEntry( GDALColorTableH, int, const GDALColorEntry * );
00663 void CPL_DLL CPL_STDCALL GDALCreateColorRamp( GDALColorTableH hTable,
00664 int nStartIndex, const GDALColorEntry *psStartColor,
00665 int nEndIndex, const GDALColorEntry *psEndColor );
00666
00667
00668
00669
00670
00672 typedef enum { GFT_Integer , GFT_Real, GFT_String
00676 } GDALRATFieldType;
00677
00679 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
00699 } GDALRATFieldUsage;
00700
00701 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL
00702 GDALCreateRasterAttributeTable(void);
00703 void CPL_DLL CPL_STDCALL GDALDestroyRasterAttributeTable(
00704 GDALRasterAttributeTableH );
00705
00706 int CPL_DLL CPL_STDCALL GDALRATGetColumnCount( GDALRasterAttributeTableH );
00707
00708 const char CPL_DLL * CPL_STDCALL GDALRATGetNameOfCol(
00709 GDALRasterAttributeTableH, int );
00710 GDALRATFieldUsage CPL_DLL CPL_STDCALL GDALRATGetUsageOfCol(
00711 GDALRasterAttributeTableH, int );
00712 GDALRATFieldType CPL_DLL CPL_STDCALL GDALRATGetTypeOfCol(
00713 GDALRasterAttributeTableH, int );
00714
00715 int CPL_DLL CPL_STDCALL GDALRATGetColOfUsage( GDALRasterAttributeTableH,
00716 GDALRATFieldUsage );
00717 int CPL_DLL CPL_STDCALL GDALRATGetRowCount( GDALRasterAttributeTableH );
00718
00719 const char CPL_DLL * CPL_STDCALL GDALRATGetValueAsString(
00720 GDALRasterAttributeTableH, int ,int);
00721 int CPL_DLL CPL_STDCALL GDALRATGetValueAsInt(
00722 GDALRasterAttributeTableH, int ,int);
00723 double CPL_DLL CPL_STDCALL GDALRATGetValueAsDouble(
00724 GDALRasterAttributeTableH, int ,int);
00725
00726 void CPL_DLL CPL_STDCALL GDALRATSetValueAsString( GDALRasterAttributeTableH, int, int,
00727 const char * );
00728 void CPL_DLL CPL_STDCALL GDALRATSetValueAsInt( GDALRasterAttributeTableH, int, int,
00729 int );
00730 void CPL_DLL CPL_STDCALL GDALRATSetValueAsDouble( GDALRasterAttributeTableH, int, int,
00731 double );
00732
00733 int CPL_DLL CPL_STDCALL GDALRATChangesAreWrittenToFile( GDALRasterAttributeTableH hRAT );
00734
00735 CPLErr CPL_DLL CPL_STDCALL GDALRATValuesIOAsDouble( GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag,
00736 int iField, int iStartRow, int iLength, double *pdfData );
00737 CPLErr CPL_DLL CPL_STDCALL GDALRATValuesIOAsInteger( GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag,
00738 int iField, int iStartRow, int iLength, int *pnData);
00739 CPLErr CPL_DLL CPL_STDCALL GDALRATValuesIOAsString( GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag,
00740 int iField, int iStartRow, int iLength, char **papszStrList);
00741
00742 void CPL_DLL CPL_STDCALL GDALRATSetRowCount( GDALRasterAttributeTableH,
00743 int );
00744 CPLErr CPL_DLL CPL_STDCALL GDALRATCreateColumn( GDALRasterAttributeTableH,
00745 const char *,
00746 GDALRATFieldType,
00747 GDALRATFieldUsage );
00748 CPLErr CPL_DLL CPL_STDCALL GDALRATSetLinearBinning( GDALRasterAttributeTableH,
00749 double, double );
00750 int CPL_DLL CPL_STDCALL GDALRATGetLinearBinning( GDALRasterAttributeTableH,
00751 double *, double * );
00752 CPLErr CPL_DLL CPL_STDCALL GDALRATInitializeFromColorTable(
00753 GDALRasterAttributeTableH, GDALColorTableH );
00754 GDALColorTableH CPL_DLL CPL_STDCALL GDALRATTranslateToColorTable(
00755 GDALRasterAttributeTableH, int nEntryCount );
00756 void CPL_DLL CPL_STDCALL GDALRATDumpReadable( GDALRasterAttributeTableH,
00757 FILE * );
00758 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL
00759 GDALRATClone( GDALRasterAttributeTableH );
00760
00761 int CPL_DLL CPL_STDCALL GDALRATGetRowOfValue( GDALRasterAttributeTableH , double );
00762
00763
00764
00765
00766
00767
00768 void CPL_DLL CPL_STDCALL GDALSetCacheMax( int nBytes );
00769 int CPL_DLL CPL_STDCALL GDALGetCacheMax(void);
00770 int CPL_DLL CPL_STDCALL GDALGetCacheUsed(void);
00771 void CPL_DLL CPL_STDCALL GDALSetCacheMax64( GIntBig nBytes );
00772 GIntBig CPL_DLL CPL_STDCALL GDALGetCacheMax64(void);
00773 GIntBig CPL_DLL CPL_STDCALL GDALGetCacheUsed64(void);
00774
00775 int CPL_DLL CPL_STDCALL GDALFlushCacheBlock(void);
00776
00777
00778
00779
00780
00781 CPLVirtualMem CPL_DLL* GDALDatasetGetVirtualMem( GDALDatasetH hDS,
00782 GDALRWFlag eRWFlag,
00783 int nXOff, int nYOff,
00784 int nXSize, int nYSize,
00785 int nBufXSize, int nBufYSize,
00786 GDALDataType eBufType,
00787 int nBandCount, int* panBandMap,
00788 int nPixelSpace,
00789 GIntBig nLineSpace,
00790 GIntBig nBandSpace,
00791 size_t nCacheSize,
00792 size_t nPageSizeHint,
00793 int bSingleThreadUsage,
00794 char **papszOptions );
00795
00796 CPLVirtualMem CPL_DLL* GDALRasterBandGetVirtualMem( GDALRasterBandH hBand,
00797 GDALRWFlag eRWFlag,
00798 int nXOff, int nYOff,
00799 int nXSize, int nYSize,
00800 int nBufXSize, int nBufYSize,
00801 GDALDataType eBufType,
00802 int nPixelSpace,
00803 GIntBig nLineSpace,
00804 size_t nCacheSize,
00805 size_t nPageSizeHint,
00806 int bSingleThreadUsage,
00807 char **papszOptions );
00808
00809 CPLVirtualMem CPL_DLL* GDALGetVirtualMemAuto( GDALRasterBandH hBand,
00810 GDALRWFlag eRWFlag,
00811 int *pnPixelSpace,
00812 GIntBig *pnLineSpace,
00813 char **papszOptions );
00814
00815 typedef enum
00816 {
00818 GTO_TIP,
00820 GTO_BIT,
00822 GTO_BSQ
00823 } GDALTileOrganization;
00824
00825 CPLVirtualMem CPL_DLL* GDALDatasetGetTiledVirtualMem( GDALDatasetH hDS,
00826 GDALRWFlag eRWFlag,
00827 int nXOff, int nYOff,
00828 int nXSize, int nYSize,
00829 int nTileXSize, int nTileYSize,
00830 GDALDataType eBufType,
00831 int nBandCount, int* panBandMap,
00832 GDALTileOrganization eTileOrganization,
00833 size_t nCacheSize,
00834 int bSingleThreadUsage,
00835 char **papszOptions );
00836
00837 CPLVirtualMem CPL_DLL* GDALRasterBandGetTiledVirtualMem( GDALRasterBandH hBand,
00838 GDALRWFlag eRWFlag,
00839 int nXOff, int nYOff,
00840 int nXSize, int nYSize,
00841 int nTileXSize, int nTileYSize,
00842 GDALDataType eBufType,
00843 size_t nCacheSize,
00844 int bSingleThreadUsage,
00845 char **papszOptions );
00846
00847
00848 CPL_C_END
00849
00850 #endif