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 #include "cpl_minixml.h"
00047 #include "ogr_api.h"
00048 #endif
00049
00050
00051
00052
00053
00054 CPL_C_START
00055
00057 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,
00070 GDT_TypeCount = 12
00071 } GDALDataType;
00072
00073 int CPL_DLL CPL_STDCALL GDALGetDataTypeSize( GDALDataType );
00074 int CPL_DLL CPL_STDCALL GDALDataTypeIsComplex( GDALDataType );
00075 const char CPL_DLL * CPL_STDCALL GDALGetDataTypeName( GDALDataType );
00076 GDALDataType CPL_DLL CPL_STDCALL GDALGetDataTypeByName( const char * );
00077 GDALDataType CPL_DLL CPL_STDCALL GDALDataTypeUnion( GDALDataType, GDALDataType );
00078
00082 typedef enum
00083 {
00084 GARIO_PENDING = 0,
00085 GARIO_UPDATE = 1,
00086 GARIO_ERROR = 2,
00087 GARIO_COMPLETE = 3,
00088 GARIO_TypeCount = 4
00089 } GDALAsyncStatusType;
00090
00091 const char CPL_DLL * CPL_STDCALL GDALGetAsyncStatusTypeName( GDALAsyncStatusType );
00092 GDALAsyncStatusType CPL_DLL CPL_STDCALL GDALGetAsyncStatusTypeByName( const char * );
00093
00095 typedef enum { GA_ReadOnly = 0, GA_Update = 1
00098 } GDALAccess;
00099
00101 typedef enum { GF_Read = 0, GF_Write = 1
00104 } GDALRWFlag;
00105
00106
00110 typedef enum
00111 { GRIORA_NearestNeighbour = 0, GRIORA_Bilinear = 1, GRIORA_Cubic = 2, GRIORA_CubicSpline = 3, GRIORA_Lanczos = 4, GRIORA_Average = 5,
00119 GRIORA_Mode = 6, GRIORA_Gauss = 7
00121
00122 } GDALRIOResampleAlg;
00123
00124
00125
00129 typedef struct
00130 {
00132 int nVersion;
00133
00135 GDALRIOResampleAlg eResampleAlg;
00136
00138 GDALProgressFunc pfnProgress;
00140 void *pProgressData;
00141
00146 int bFloatingPointWindowValidity;
00148 double dfXOff;
00150 double dfYOff;
00152 double dfXSize;
00154 double dfYSize;
00155 } GDALRasterIOExtraArg;
00156
00157 #define RASTERIO_EXTRA_ARG_CURRENT_VERSION 1
00158
00162 #define INIT_RASTERIO_EXTRA_ARG(s) \
00163 do { (s).nVersion = RASTERIO_EXTRA_ARG_CURRENT_VERSION; \
00164 (s).eResampleAlg = GRIORA_NearestNeighbour; \
00165 (s).pfnProgress = NULL; \
00166 (s).pProgressData = NULL; \
00167 (s).bFloatingPointWindowValidity = FALSE; } while(0)
00168
00170 typedef enum
00171 {
00172 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
00190 } GDALColorInterp;
00191
00192 const char CPL_DLL *GDALGetColorInterpretationName( GDALColorInterp );
00193 GDALColorInterp CPL_DLL GDALGetColorInterpretationByName( const char *pszName );
00194
00196 typedef enum
00197 { GPI_Gray=0, GPI_RGB=1, GPI_CMYK=2, GPI_HLS=3
00202 } GDALPaletteInterp;
00203
00204 const char CPL_DLL *GDALGetPaletteInterpretationName( GDALPaletteInterp );
00205
00206
00207
00208 #define GDALMD_AREA_OR_POINT "AREA_OR_POINT"
00209 # define GDALMD_AOP_AREA "Area"
00210 # define GDALMD_AOP_POINT "Point"
00211
00212
00213
00214
00215
00216
00217 #define CPLE_WrongFormat 200
00218
00219
00220
00221
00222
00224 typedef void *GDALMajorObjectH;
00225
00227 typedef void *GDALDatasetH;
00228
00230 typedef void *GDALRasterBandH;
00231
00233 typedef void *GDALDriverH;
00234
00236 typedef void *GDALColorTableH;
00237
00239 typedef void *GDALRasterAttributeTableH;
00240
00242 typedef void *GDALAsyncReaderH;
00243
00245 typedef GIntBig GSpacing;
00246
00247
00248
00249
00250
00252 #define GDAL_DMD_LONGNAME "DMD_LONGNAME"
00253
00255 #define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
00256
00258 #define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
00259
00261 #define GDAL_DMD_EXTENSION "DMD_EXTENSION"
00262
00267 #define GDAL_DMD_CONNECTION_PREFIX "DMD_CONNECTION_PREFIX"
00268
00272 #define GDAL_DMD_EXTENSIONS "DMD_EXTENSIONS"
00273
00275 #define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST"
00276
00280 #define GDAL_DMD_OPENOPTIONLIST "DMD_OPENOPTIONLIST"
00281
00283 #define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES"
00284
00288 #define GDAL_DMD_CREATIONFIELDDATATYPES "DMD_CREATIONFIELDDATATYPES"
00289
00291 #define GDAL_DMD_SUBDATASETS "DMD_SUBDATASETS"
00292
00294 #define GDAL_DCAP_OPEN "DCAP_OPEN"
00295
00297 #define GDAL_DCAP_CREATE "DCAP_CREATE"
00298
00300 #define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
00301
00303 #define GDAL_DCAP_VIRTUALIO "DCAP_VIRTUALIO"
00304
00308 #define GDAL_DCAP_RASTER "DCAP_RASTER"
00309
00313 #define GDAL_DCAP_VECTOR "DCAP_VECTOR"
00314
00318 #define GDAL_DCAP_NOTNULL_FIELDS "DCAP_NOTNULL_FIELDS"
00319
00323 #define GDAL_DCAP_DEFAULT_FIELDS "DCAP_DEFAULT_FIELDS"
00324
00328 #define GDAL_DCAP_NOTNULL_GEOMFIELDS "DCAP_NOTNULL_GEOMFIELDS"
00329
00330 void CPL_DLL CPL_STDCALL GDALAllRegister( void );
00331
00332 GDALDatasetH CPL_DLL CPL_STDCALL GDALCreate( GDALDriverH hDriver,
00333 const char *, int, int, int, GDALDataType,
00334 char ** ) CPL_WARN_UNUSED_RESULT;
00335 GDALDatasetH CPL_DLL CPL_STDCALL
00336 GDALCreateCopy( GDALDriverH, const char *, GDALDatasetH,
00337 int, char **, GDALProgressFunc, void * ) CPL_WARN_UNUSED_RESULT;
00338
00339 GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriver( const char * pszFilename,
00340 char ** papszFileList );
00341 GDALDatasetH CPL_DLL CPL_STDCALL
00342 GDALOpen( const char *pszFilename, GDALAccess eAccess ) CPL_WARN_UNUSED_RESULT;
00343 GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenShared( const char *, GDALAccess ) CPL_WARN_UNUSED_RESULT;
00344
00345
00346
00347
00348
00353 #define GDAL_OF_READONLY 0x00
00354
00359 #define GDAL_OF_UPDATE 0x01
00360
00365 #define GDAL_OF_ALL 0x00
00366
00371 #define GDAL_OF_RASTER 0x02
00372
00377 #define GDAL_OF_VECTOR 0x04
00378
00379
00380
00381 #ifndef DOXYGEN_SKIP
00382 #define GDAL_OF_KIND_MASK 0x1E
00383 #endif
00384
00389 #define GDAL_OF_SHARED 0x20
00390
00395 #define GDAL_OF_VERBOSE_ERROR 0x40
00396
00403 #define GDAL_OF_INTERNAL 0x80
00404
00405 GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenEx( const char* pszFilename,
00406 unsigned int nOpenFlags,
00407 const char* const* papszAllowedDrivers,
00408 const char* const* papszOpenOptions,
00409 const char* const* papszSiblingFiles ) CPL_WARN_UNUSED_RESULT;
00410
00411 int CPL_DLL CPL_STDCALL GDALDumpOpenDatasets( FILE * );
00412
00413 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriverByName( const char * );
00414 int CPL_DLL CPL_STDCALL GDALGetDriverCount( void );
00415 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriver( int );
00416 void CPL_DLL CPL_STDCALL GDALDestroyDriver( GDALDriverH );
00417 int CPL_DLL CPL_STDCALL GDALRegisterDriver( GDALDriverH );
00418 void CPL_DLL CPL_STDCALL GDALDeregisterDriver( GDALDriverH );
00419 void CPL_DLL CPL_STDCALL GDALDestroyDriverManager( void );
00420 void CPL_DLL GDALDestroy( void );
00421 CPLErr CPL_DLL CPL_STDCALL GDALDeleteDataset( GDALDriverH, const char * );
00422 CPLErr CPL_DLL CPL_STDCALL GDALRenameDataset( GDALDriverH,
00423 const char * pszNewName,
00424 const char * pszOldName );
00425 CPLErr CPL_DLL CPL_STDCALL GDALCopyDatasetFiles( GDALDriverH,
00426 const char * pszNewName,
00427 const char * pszOldName);
00428 int CPL_DLL CPL_STDCALL GDALValidateCreationOptions( GDALDriverH,
00429 char** papszCreationOptions);
00430
00431
00432 const char CPL_DLL * CPL_STDCALL GDALGetDriverShortName( GDALDriverH );
00433 const char CPL_DLL * CPL_STDCALL GDALGetDriverLongName( GDALDriverH );
00434 const char CPL_DLL * CPL_STDCALL GDALGetDriverHelpTopic( GDALDriverH );
00435 const char CPL_DLL * CPL_STDCALL GDALGetDriverCreationOptionList( GDALDriverH );
00436
00437
00438
00439
00440
00442 typedef struct
00443 {
00445 char *pszId;
00446
00448 char *pszInfo;
00449
00451 double dfGCPPixel;
00453 double dfGCPLine;
00454
00456 double dfGCPX;
00457
00459 double dfGCPY;
00460
00462 double dfGCPZ;
00463 } GDAL_GCP;
00464
00465 void CPL_DLL CPL_STDCALL GDALInitGCPs( int, GDAL_GCP * );
00466 void CPL_DLL CPL_STDCALL GDALDeinitGCPs( int, GDAL_GCP * );
00467 GDAL_GCP CPL_DLL * CPL_STDCALL GDALDuplicateGCPs( int, const GDAL_GCP * );
00468
00469 int CPL_DLL CPL_STDCALL
00470 GDALGCPsToGeoTransform( int nGCPCount, const GDAL_GCP *pasGCPs,
00471 double *padfGeoTransform, int bApproxOK ) CPL_WARN_UNUSED_RESULT;
00472 int CPL_DLL CPL_STDCALL
00473 GDALInvGeoTransform( double *padfGeoTransformIn,
00474 double *padfInvGeoTransformOut ) CPL_WARN_UNUSED_RESULT;
00475 void CPL_DLL CPL_STDCALL GDALApplyGeoTransform( double *, double, double,
00476 double *, double * );
00477 void CPL_DLL GDALComposeGeoTransforms(const double *padfGeoTransform1,
00478 const double *padfGeoTransform2,
00479 double *padfGeoTransformOut);
00480
00481
00482
00483
00484
00485 char CPL_DLL ** CPL_STDCALL GDALGetMetadataDomainList( GDALMajorObjectH hObject );
00486 char CPL_DLL ** CPL_STDCALL GDALGetMetadata( GDALMajorObjectH, const char * );
00487 CPLErr CPL_DLL CPL_STDCALL GDALSetMetadata( GDALMajorObjectH, char **,
00488 const char * );
00489 const char CPL_DLL * CPL_STDCALL
00490 GDALGetMetadataItem( GDALMajorObjectH, const char *, const char * );
00491 CPLErr CPL_DLL CPL_STDCALL
00492 GDALSetMetadataItem( GDALMajorObjectH, const char *, const char *,
00493 const char * );
00494 const char CPL_DLL * CPL_STDCALL GDALGetDescription( GDALMajorObjectH );
00495 void CPL_DLL CPL_STDCALL GDALSetDescription( GDALMajorObjectH, const char * );
00496
00497
00498
00499
00500
00501 #define GDAL_DS_LAYER_CREATIONOPTIONLIST "DS_LAYER_CREATIONOPTIONLIST"
00502
00503 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDatasetDriver( GDALDatasetH );
00504 char CPL_DLL ** CPL_STDCALL GDALGetFileList( GDALDatasetH );
00505 void CPL_DLL CPL_STDCALL GDALClose( GDALDatasetH );
00506 int CPL_DLL CPL_STDCALL GDALGetRasterXSize( GDALDatasetH );
00507 int CPL_DLL CPL_STDCALL GDALGetRasterYSize( GDALDatasetH );
00508 int CPL_DLL CPL_STDCALL GDALGetRasterCount( GDALDatasetH );
00509 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetRasterBand( GDALDatasetH, int );
00510
00511 CPLErr CPL_DLL CPL_STDCALL GDALAddBand( GDALDatasetH hDS, GDALDataType eType,
00512 char **papszOptions );
00513
00514 GDALAsyncReaderH CPL_DLL CPL_STDCALL
00515 GDALBeginAsyncReader(GDALDatasetH hDS, int nXOff, int nYOff,
00516 int nXSize, int nYSize,
00517 void *pBuf, int nBufXSize, int nBufYSize,
00518 GDALDataType eBufType, int nBandCount, int* panBandMap,
00519 int nPixelSpace, int nLineSpace, int nBandSpace,
00520 char **papszOptions);
00521
00522 void CPL_DLL CPL_STDCALL
00523 GDALEndAsyncReader(GDALDatasetH hDS, GDALAsyncReaderH hAsynchReaderH);
00524
00525 CPLErr CPL_DLL CPL_STDCALL GDALDatasetRasterIO(
00526 GDALDatasetH hDS, GDALRWFlag eRWFlag,
00527 int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00528 void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType,
00529 int nBandCount, int *panBandCount,
00530 int nPixelSpace, int nLineSpace, int nBandSpace);
00531
00532 CPLErr CPL_DLL CPL_STDCALL GDALDatasetRasterIOEx(
00533 GDALDatasetH hDS, GDALRWFlag eRWFlag,
00534 int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00535 void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType,
00536 int nBandCount, int *panBandCount,
00537 GSpacing nPixelSpace, GSpacing nLineSpace, GSpacing nBandSpace,
00538 GDALRasterIOExtraArg* psExtraArg);
00539
00540 CPLErr CPL_DLL CPL_STDCALL GDALDatasetAdviseRead( GDALDatasetH hDS,
00541 int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00542 int nBXSize, int nBYSize, GDALDataType eBDataType,
00543 int nBandCount, int *panBandCount, char **papszOptions );
00544
00545 const char CPL_DLL * CPL_STDCALL GDALGetProjectionRef( GDALDatasetH );
00546 CPLErr CPL_DLL CPL_STDCALL GDALSetProjection( GDALDatasetH, const char * );
00547 CPLErr CPL_DLL CPL_STDCALL GDALGetGeoTransform( GDALDatasetH, double * );
00548 CPLErr CPL_DLL CPL_STDCALL GDALSetGeoTransform( GDALDatasetH, double * );
00549
00550 int CPL_DLL CPL_STDCALL GDALGetGCPCount( GDALDatasetH );
00551 const char CPL_DLL * CPL_STDCALL GDALGetGCPProjection( GDALDatasetH );
00552 const GDAL_GCP CPL_DLL * CPL_STDCALL GDALGetGCPs( GDALDatasetH );
00553 CPLErr CPL_DLL CPL_STDCALL GDALSetGCPs( GDALDatasetH, int, const GDAL_GCP *,
00554 const char * );
00555
00556 void CPL_DLL * CPL_STDCALL GDALGetInternalHandle( GDALDatasetH, const char * );
00557 int CPL_DLL CPL_STDCALL GDALReferenceDataset( GDALDatasetH );
00558 int CPL_DLL CPL_STDCALL GDALDereferenceDataset( GDALDatasetH );
00559
00560 CPLErr CPL_DLL CPL_STDCALL
00561 GDALBuildOverviews( GDALDatasetH, const char *, int, int *,
00562 int, int *, GDALProgressFunc, void * );
00563 void CPL_DLL CPL_STDCALL GDALGetOpenDatasets( GDALDatasetH **hDS, int *pnCount );
00564 int CPL_DLL CPL_STDCALL GDALGetAccess( GDALDatasetH hDS );
00565 void CPL_DLL CPL_STDCALL GDALFlushCache( GDALDatasetH hDS );
00566
00567 CPLErr CPL_DLL CPL_STDCALL
00568 GDALCreateDatasetMaskBand( GDALDatasetH hDS, int nFlags );
00569
00570 CPLErr CPL_DLL CPL_STDCALL GDALDatasetCopyWholeRaster(
00571 GDALDatasetH hSrcDS, GDALDatasetH hDstDS, char **papszOptions,
00572 GDALProgressFunc pfnProgress, void *pProgressData );
00573
00574 CPLErr CPL_DLL CPL_STDCALL GDALRasterBandCopyWholeRaster(
00575 GDALRasterBandH hSrcBand, GDALRasterBandH hDstBand, char **papszOptions,
00576 GDALProgressFunc pfnProgress, void *pProgressData );
00577
00578 CPLErr CPL_DLL
00579 GDALRegenerateOverviews( GDALRasterBandH hSrcBand,
00580 int nOverviewCount, GDALRasterBandH *pahOverviewBands,
00581 const char *pszResampling,
00582 GDALProgressFunc pfnProgress, void *pProgressData );
00583
00584 int CPL_DLL GDALDatasetGetLayerCount( GDALDatasetH );
00585 OGRLayerH CPL_DLL GDALDatasetGetLayer( GDALDatasetH, int );
00586 OGRLayerH CPL_DLL GDALDatasetGetLayerByName( GDALDatasetH, const char * );
00587 OGRErr CPL_DLL GDALDatasetDeleteLayer( GDALDatasetH, int );
00588 OGRLayerH CPL_DLL GDALDatasetCreateLayer( GDALDatasetH, const char *,
00589 OGRSpatialReferenceH, OGRwkbGeometryType,
00590 char ** );
00591 OGRLayerH CPL_DLL GDALDatasetCopyLayer( GDALDatasetH, OGRLayerH, const char *,
00592 char ** );
00593 int CPL_DLL GDALDatasetTestCapability( GDALDatasetH, const char * );
00594 OGRLayerH CPL_DLL GDALDatasetExecuteSQL( GDALDatasetH, const char *,
00595 OGRGeometryH, const char * );
00596 void CPL_DLL GDALDatasetReleaseResultSet( GDALDatasetH, OGRLayerH );
00597 OGRStyleTableH CPL_DLL GDALDatasetGetStyleTable( GDALDatasetH );
00598 void CPL_DLL GDALDatasetSetStyleTableDirectly( GDALDatasetH, OGRStyleTableH );
00599 void CPL_DLL GDALDatasetSetStyleTable( GDALDatasetH, OGRStyleTableH );
00600 OGRErr CPL_DLL GDALDatasetStartTransaction(GDALDatasetH hDS, int bForce);
00601 OGRErr CPL_DLL GDALDatasetCommitTransaction(GDALDatasetH hDS);
00602 OGRErr CPL_DLL GDALDatasetRollbackTransaction(GDALDatasetH hDS);
00603
00604
00605
00606
00607
00608
00613 #define SRCVAL(papoSource, eSrcType, ii) \
00614 (eSrcType == GDT_Byte ? \
00615 ((GByte *)papoSource)[ii] : \
00616 (eSrcType == GDT_Float32 ? \
00617 ((float *)papoSource)[ii] : \
00618 (eSrcType == GDT_Float64 ? \
00619 ((double *)papoSource)[ii] : \
00620 (eSrcType == GDT_Int32 ? \
00621 ((GInt32 *)papoSource)[ii] : \
00622 (eSrcType == GDT_UInt16 ? \
00623 ((GUInt16 *)papoSource)[ii] : \
00624 (eSrcType == GDT_Int16 ? \
00625 ((GInt16 *)papoSource)[ii] : \
00626 (eSrcType == GDT_UInt32 ? \
00627 ((GUInt32 *)papoSource)[ii] : \
00628 (eSrcType == GDT_CInt16 ? \
00629 ((GInt16 *)papoSource)[ii * 2] : \
00630 (eSrcType == GDT_CInt32 ? \
00631 ((GInt32 *)papoSource)[ii * 2] : \
00632 (eSrcType == GDT_CFloat32 ? \
00633 ((float *)papoSource)[ii * 2] : \
00634 (eSrcType == GDT_CFloat64 ? \
00635 ((double *)papoSource)[ii * 2] : 0)))))))))))
00636
00637 typedef CPLErr
00638 (*GDALDerivedPixelFunc)(void **papoSources, int nSources, void *pData,
00639 int nBufXSize, int nBufYSize,
00640 GDALDataType eSrcType, GDALDataType eBufType,
00641 int nPixelSpace, int nLineSpace);
00642
00643 GDALDataType CPL_DLL CPL_STDCALL GDALGetRasterDataType( GDALRasterBandH );
00644 void CPL_DLL CPL_STDCALL
00645 GDALGetBlockSize( GDALRasterBandH, int * pnXSize, int * pnYSize );
00646
00647 CPLErr CPL_DLL CPL_STDCALL GDALRasterAdviseRead( GDALRasterBandH hRB,
00648 int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00649 int nBXSize, int nBYSize, GDALDataType eBDataType, char **papszOptions );
00650
00651 CPLErr CPL_DLL CPL_STDCALL
00652 GDALRasterIO( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
00653 int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00654 void * pBuffer, int nBXSize, int nBYSize,GDALDataType eBDataType,
00655 int nPixelSpace, int nLineSpace );
00656 CPLErr CPL_DLL CPL_STDCALL
00657 GDALRasterIOEx( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
00658 int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00659 void * pBuffer, int nBXSize, int nBYSize,GDALDataType eBDataType,
00660 GSpacing nPixelSpace, GSpacing nLineSpace,
00661 GDALRasterIOExtraArg* psExtraArg );
00662 CPLErr CPL_DLL CPL_STDCALL GDALReadBlock( GDALRasterBandH, int, int, void * );
00663 CPLErr CPL_DLL CPL_STDCALL GDALWriteBlock( GDALRasterBandH, int, int, void * );
00664 int CPL_DLL CPL_STDCALL GDALGetRasterBandXSize( GDALRasterBandH );
00665 int CPL_DLL CPL_STDCALL GDALGetRasterBandYSize( GDALRasterBandH );
00666 GDALAccess CPL_DLL CPL_STDCALL GDALGetRasterAccess( GDALRasterBandH );
00667 int CPL_DLL CPL_STDCALL GDALGetBandNumber( GDALRasterBandH );
00668 GDALDatasetH CPL_DLL CPL_STDCALL GDALGetBandDataset( GDALRasterBandH );
00669
00670 GDALColorInterp CPL_DLL CPL_STDCALL
00671 GDALGetRasterColorInterpretation( GDALRasterBandH );
00672 CPLErr CPL_DLL CPL_STDCALL
00673 GDALSetRasterColorInterpretation( GDALRasterBandH, GDALColorInterp );
00674 GDALColorTableH CPL_DLL CPL_STDCALL GDALGetRasterColorTable( GDALRasterBandH );
00675 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterColorTable( GDALRasterBandH, GDALColorTableH );
00676 int CPL_DLL CPL_STDCALL GDALHasArbitraryOverviews( GDALRasterBandH );
00677 int CPL_DLL CPL_STDCALL GDALGetOverviewCount( GDALRasterBandH );
00678 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetOverview( GDALRasterBandH, int );
00679 double CPL_DLL CPL_STDCALL GDALGetRasterNoDataValue( GDALRasterBandH, int * );
00680 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterNoDataValue( GDALRasterBandH, double );
00681 char CPL_DLL ** CPL_STDCALL GDALGetRasterCategoryNames( GDALRasterBandH );
00682 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterCategoryNames( GDALRasterBandH, char ** );
00683 double CPL_DLL CPL_STDCALL GDALGetRasterMinimum( GDALRasterBandH, int *pbSuccess );
00684 double CPL_DLL CPL_STDCALL GDALGetRasterMaximum( GDALRasterBandH, int *pbSuccess );
00685 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterStatistics(
00686 GDALRasterBandH, int bApproxOK, int bForce,
00687 double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev );
00688 CPLErr CPL_DLL CPL_STDCALL GDALComputeRasterStatistics(
00689 GDALRasterBandH, int bApproxOK,
00690 double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev,
00691 GDALProgressFunc pfnProgress, void *pProgressData );
00692 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterStatistics(
00693 GDALRasterBandH hBand,
00694 double dfMin, double dfMax, double dfMean, double dfStdDev );
00695
00696 const char CPL_DLL * CPL_STDCALL GDALGetRasterUnitType( GDALRasterBandH );
00697 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterUnitType( GDALRasterBandH hBand, const char *pszNewValue );
00698 double CPL_DLL CPL_STDCALL GDALGetRasterOffset( GDALRasterBandH, int *pbSuccess );
00699 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterOffset( GDALRasterBandH hBand, double dfNewOffset);
00700 double CPL_DLL CPL_STDCALL GDALGetRasterScale( GDALRasterBandH, int *pbSuccess );
00701 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterScale( GDALRasterBandH hBand, double dfNewOffset );
00702 void CPL_DLL CPL_STDCALL
00703 GDALComputeRasterMinMax( GDALRasterBandH hBand, int bApproxOK,
00704 double adfMinMax[2] );
00705 CPLErr CPL_DLL CPL_STDCALL GDALFlushRasterCache( GDALRasterBandH hBand );
00706 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterHistogram( GDALRasterBandH hBand,
00707 double dfMin, double dfMax,
00708 int nBuckets, int *panHistogram,
00709 int bIncludeOutOfRange, int bApproxOK,
00710 GDALProgressFunc pfnProgress,
00711 void * pProgressData ) CPL_WARN_DEPRECATED("Use GDALGetRasterHistogramEx() instead");
00712 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterHistogramEx( GDALRasterBandH hBand,
00713 double dfMin, double dfMax,
00714 int nBuckets, GUIntBig *panHistogram,
00715 int bIncludeOutOfRange, int bApproxOK,
00716 GDALProgressFunc pfnProgress,
00717 void * pProgressData );
00718 CPLErr CPL_DLL CPL_STDCALL GDALGetDefaultHistogram( GDALRasterBandH hBand,
00719 double *pdfMin, double *pdfMax,
00720 int *pnBuckets, int **ppanHistogram,
00721 int bForce,
00722 GDALProgressFunc pfnProgress,
00723 void * pProgressData ) CPL_WARN_DEPRECATED("Use GDALGetDefaultHistogramEx() instead");
00724 CPLErr CPL_DLL CPL_STDCALL GDALGetDefaultHistogramEx( GDALRasterBandH hBand,
00725 double *pdfMin, double *pdfMax,
00726 int *pnBuckets, GUIntBig **ppanHistogram,
00727 int bForce,
00728 GDALProgressFunc pfnProgress,
00729 void * pProgressData );
00730 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultHistogram( GDALRasterBandH hBand,
00731 double dfMin, double dfMax,
00732 int nBuckets, int *panHistogram ) CPL_WARN_DEPRECATED("Use GDALSetDefaultHistogramEx() instead");
00733 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultHistogramEx( GDALRasterBandH hBand,
00734 double dfMin, double dfMax,
00735 int nBuckets, GUIntBig *panHistogram );
00736 int CPL_DLL CPL_STDCALL
00737 GDALGetRandomRasterSample( GDALRasterBandH, int, float * );
00738 GDALRasterBandH CPL_DLL CPL_STDCALL
00739 GDALGetRasterSampleOverview( GDALRasterBandH, int );
00740 GDALRasterBandH CPL_DLL CPL_STDCALL
00741 GDALGetRasterSampleOverviewEx( GDALRasterBandH, GUIntBig );
00742 CPLErr CPL_DLL CPL_STDCALL GDALFillRaster( GDALRasterBandH hBand,
00743 double dfRealValue, double dfImaginaryValue );
00744 CPLErr CPL_DLL CPL_STDCALL
00745 GDALComputeBandStats( GDALRasterBandH hBand, int nSampleStep,
00746 double *pdfMean, double *pdfStdDev,
00747 GDALProgressFunc pfnProgress,
00748 void *pProgressData );
00749 CPLErr CPL_DLL GDALOverviewMagnitudeCorrection( GDALRasterBandH hBaseBand,
00750 int nOverviewCount,
00751 GDALRasterBandH *pahOverviews,
00752 GDALProgressFunc pfnProgress,
00753 void *pProgressData );
00754
00755 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL GDALGetDefaultRAT(
00756 GDALRasterBandH hBand );
00757 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultRAT( GDALRasterBandH,
00758 GDALRasterAttributeTableH );
00759 CPLErr CPL_DLL CPL_STDCALL GDALAddDerivedBandPixelFunc( const char *pszName,
00760 GDALDerivedPixelFunc pfnPixelFunc );
00761
00762 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetMaskBand( GDALRasterBandH hBand );
00763 int CPL_DLL CPL_STDCALL GDALGetMaskFlags( GDALRasterBandH hBand );
00764 CPLErr CPL_DLL CPL_STDCALL
00765 GDALCreateMaskBand( GDALRasterBandH hBand, int nFlags );
00766
00767 #define GMF_ALL_VALID 0x01
00768 #define GMF_PER_DATASET 0x02
00769 #define GMF_ALPHA 0x04
00770 #define GMF_NODATA 0x08
00771
00772
00773
00774
00775
00776 GDALAsyncStatusType CPL_DLL CPL_STDCALL
00777 GDALARGetNextUpdatedRegion(GDALAsyncReaderH hARIO, double dfTimeout,
00778 int* pnXBufOff, int* pnYBufOff,
00779 int* pnXBufSize, int* pnYBufSize );
00780 int CPL_DLL CPL_STDCALL GDALARLockBuffer(GDALAsyncReaderH hARIO,
00781 double dfTimeout);
00782 void CPL_DLL CPL_STDCALL GDALARUnlockBuffer(GDALAsyncReaderH hARIO);
00783
00784
00785
00786
00787 int CPL_DLL CPL_STDCALL GDALGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv,
00788 int nOptions );
00789 void CPL_DLL CPL_STDCALL GDALSwapWords( void *pData, int nWordSize, int nWordCount,
00790 int nWordSkip );
00791 void CPL_DLL CPL_STDCALL
00792 GDALCopyWords( void * pSrcData, GDALDataType eSrcType, int nSrcPixelOffset,
00793 void * pDstData, GDALDataType eDstType, int nDstPixelOffset,
00794 int nWordCount );
00795
00796 void CPL_DLL
00797 GDALCopyBits( const GByte *pabySrcData, int nSrcOffset, int nSrcStep,
00798 GByte *pabyDstData, int nDstOffset, int nDstStep,
00799 int nBitCount, int nStepCount );
00800
00801 int CPL_DLL CPL_STDCALL GDALLoadWorldFile( const char *, double * );
00802 int CPL_DLL CPL_STDCALL GDALReadWorldFile( const char *, const char *,
00803 double * );
00804 int CPL_DLL CPL_STDCALL GDALWriteWorldFile( const char *, const char *,
00805 double * );
00806 int CPL_DLL CPL_STDCALL GDALLoadTabFile( const char *, double *, char **,
00807 int *, GDAL_GCP ** );
00808 int CPL_DLL CPL_STDCALL GDALReadTabFile( const char *, double *, char **,
00809 int *, GDAL_GCP ** );
00810 int CPL_DLL CPL_STDCALL GDALLoadOziMapFile( const char *, double *, char **,
00811 int *, GDAL_GCP ** );
00812 int CPL_DLL CPL_STDCALL GDALReadOziMapFile( const char * , double *,
00813 char **, int *, GDAL_GCP ** );
00814
00815 const char CPL_DLL * CPL_STDCALL GDALDecToDMS( double, const char *, int );
00816 double CPL_DLL CPL_STDCALL GDALPackedDMSToDec( double );
00817 double CPL_DLL CPL_STDCALL GDALDecToPackedDMS( double );
00818
00819
00820
00821 #ifndef GDAL_VERSION_INFO_DEFINED
00822 #define GDAL_VERSION_INFO_DEFINED
00823 const char CPL_DLL * CPL_STDCALL GDALVersionInfo( const char * );
00824 #endif
00825
00826 #ifndef GDAL_CHECK_VERSION
00827
00828 int CPL_DLL CPL_STDCALL GDALCheckVersion( int nVersionMajor, int nVersionMinor,
00829 const char* pszCallingComponentName);
00830
00834 #define GDAL_CHECK_VERSION(pszCallingComponentName) \
00835 GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName)
00836
00837 #endif
00838
00839 typedef struct {
00840 double dfLINE_OFF;
00841 double dfSAMP_OFF;
00842 double dfLAT_OFF;
00843 double dfLONG_OFF;
00844 double dfHEIGHT_OFF;
00845
00846 double dfLINE_SCALE;
00847 double dfSAMP_SCALE;
00848 double dfLAT_SCALE;
00849 double dfLONG_SCALE;
00850 double dfHEIGHT_SCALE;
00851
00852 double adfLINE_NUM_COEFF[20];
00853 double adfLINE_DEN_COEFF[20];
00854 double adfSAMP_NUM_COEFF[20];
00855 double adfSAMP_DEN_COEFF[20];
00856
00857 double dfMIN_LONG;
00858 double dfMIN_LAT;
00859 double dfMAX_LONG;
00860 double dfMAX_LAT;
00861
00862 } GDALRPCInfo;
00863
00864 int CPL_DLL CPL_STDCALL GDALExtractRPCInfo( char **, GDALRPCInfo * );
00865
00866
00867
00868
00869
00871 typedef struct
00872 {
00874 short c1;
00875
00877 short c2;
00878
00880 short c3;
00881
00883 short c4;
00884 } GDALColorEntry;
00885
00886 GDALColorTableH CPL_DLL CPL_STDCALL GDALCreateColorTable( GDALPaletteInterp );
00887 void CPL_DLL CPL_STDCALL GDALDestroyColorTable( GDALColorTableH );
00888 GDALColorTableH CPL_DLL CPL_STDCALL GDALCloneColorTable( GDALColorTableH );
00889 GDALPaletteInterp CPL_DLL CPL_STDCALL GDALGetPaletteInterpretation( GDALColorTableH );
00890 int CPL_DLL CPL_STDCALL GDALGetColorEntryCount( GDALColorTableH );
00891 const GDALColorEntry CPL_DLL * CPL_STDCALL GDALGetColorEntry( GDALColorTableH, int );
00892 int CPL_DLL CPL_STDCALL GDALGetColorEntryAsRGB( GDALColorTableH, int, GDALColorEntry *);
00893 void CPL_DLL CPL_STDCALL GDALSetColorEntry( GDALColorTableH, int, const GDALColorEntry * );
00894 void CPL_DLL CPL_STDCALL GDALCreateColorRamp( GDALColorTableH hTable,
00895 int nStartIndex, const GDALColorEntry *psStartColor,
00896 int nEndIndex, const GDALColorEntry *psEndColor );
00897
00898
00899
00900
00901
00903 typedef enum { GFT_Integer , GFT_Real, GFT_String
00907 } GDALRATFieldType;
00908
00910 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
00930 } GDALRATFieldUsage;
00931
00932 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL
00933 GDALCreateRasterAttributeTable(void);
00934 void CPL_DLL CPL_STDCALL GDALDestroyRasterAttributeTable(
00935 GDALRasterAttributeTableH );
00936
00937 int CPL_DLL CPL_STDCALL GDALRATGetColumnCount( GDALRasterAttributeTableH );
00938
00939 const char CPL_DLL * CPL_STDCALL GDALRATGetNameOfCol(
00940 GDALRasterAttributeTableH, int );
00941 GDALRATFieldUsage CPL_DLL CPL_STDCALL GDALRATGetUsageOfCol(
00942 GDALRasterAttributeTableH, int );
00943 GDALRATFieldType CPL_DLL CPL_STDCALL GDALRATGetTypeOfCol(
00944 GDALRasterAttributeTableH, int );
00945
00946 int CPL_DLL CPL_STDCALL GDALRATGetColOfUsage( GDALRasterAttributeTableH,
00947 GDALRATFieldUsage );
00948 int CPL_DLL CPL_STDCALL GDALRATGetRowCount( GDALRasterAttributeTableH );
00949
00950 const char CPL_DLL * CPL_STDCALL GDALRATGetValueAsString(
00951 GDALRasterAttributeTableH, int ,int);
00952 int CPL_DLL CPL_STDCALL GDALRATGetValueAsInt(
00953 GDALRasterAttributeTableH, int ,int);
00954 double CPL_DLL CPL_STDCALL GDALRATGetValueAsDouble(
00955 GDALRasterAttributeTableH, int ,int);
00956
00957 void CPL_DLL CPL_STDCALL GDALRATSetValueAsString( GDALRasterAttributeTableH, int, int,
00958 const char * );
00959 void CPL_DLL CPL_STDCALL GDALRATSetValueAsInt( GDALRasterAttributeTableH, int, int,
00960 int );
00961 void CPL_DLL CPL_STDCALL GDALRATSetValueAsDouble( GDALRasterAttributeTableH, int, int,
00962 double );
00963
00964 int CPL_DLL CPL_STDCALL GDALRATChangesAreWrittenToFile( GDALRasterAttributeTableH hRAT );
00965
00966 CPLErr CPL_DLL CPL_STDCALL GDALRATValuesIOAsDouble( GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag,
00967 int iField, int iStartRow, int iLength, double *pdfData );
00968 CPLErr CPL_DLL CPL_STDCALL GDALRATValuesIOAsInteger( GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag,
00969 int iField, int iStartRow, int iLength, int *pnData);
00970 CPLErr CPL_DLL CPL_STDCALL GDALRATValuesIOAsString( GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag,
00971 int iField, int iStartRow, int iLength, char **papszStrList);
00972
00973 void CPL_DLL CPL_STDCALL GDALRATSetRowCount( GDALRasterAttributeTableH,
00974 int );
00975 CPLErr CPL_DLL CPL_STDCALL GDALRATCreateColumn( GDALRasterAttributeTableH,
00976 const char *,
00977 GDALRATFieldType,
00978 GDALRATFieldUsage );
00979 CPLErr CPL_DLL CPL_STDCALL GDALRATSetLinearBinning( GDALRasterAttributeTableH,
00980 double, double );
00981 int CPL_DLL CPL_STDCALL GDALRATGetLinearBinning( GDALRasterAttributeTableH,
00982 double *, double * );
00983 CPLErr CPL_DLL CPL_STDCALL GDALRATInitializeFromColorTable(
00984 GDALRasterAttributeTableH, GDALColorTableH );
00985 GDALColorTableH CPL_DLL CPL_STDCALL GDALRATTranslateToColorTable(
00986 GDALRasterAttributeTableH, int nEntryCount );
00987 void CPL_DLL CPL_STDCALL GDALRATDumpReadable( GDALRasterAttributeTableH,
00988 FILE * );
00989 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL
00990 GDALRATClone( GDALRasterAttributeTableH );
00991
00992 void CPL_DLL* CPL_STDCALL
00993 GDALRATSerializeJSON( GDALRasterAttributeTableH );
00994
00995 int CPL_DLL CPL_STDCALL GDALRATGetRowOfValue( GDALRasterAttributeTableH , double );
00996
00997
00998
00999
01000
01001
01002 void CPL_DLL CPL_STDCALL GDALSetCacheMax( int nBytes );
01003 int CPL_DLL CPL_STDCALL GDALGetCacheMax(void);
01004 int CPL_DLL CPL_STDCALL GDALGetCacheUsed(void);
01005 void CPL_DLL CPL_STDCALL GDALSetCacheMax64( GIntBig nBytes );
01006 GIntBig CPL_DLL CPL_STDCALL GDALGetCacheMax64(void);
01007 GIntBig CPL_DLL CPL_STDCALL GDALGetCacheUsed64(void);
01008
01009 int CPL_DLL CPL_STDCALL GDALFlushCacheBlock(void);
01010
01011
01012
01013
01014
01015 CPLVirtualMem CPL_DLL* GDALDatasetGetVirtualMem( GDALDatasetH hDS,
01016 GDALRWFlag eRWFlag,
01017 int nXOff, int nYOff,
01018 int nXSize, int nYSize,
01019 int nBufXSize, int nBufYSize,
01020 GDALDataType eBufType,
01021 int nBandCount, int* panBandMap,
01022 int nPixelSpace,
01023 GIntBig nLineSpace,
01024 GIntBig nBandSpace,
01025 size_t nCacheSize,
01026 size_t nPageSizeHint,
01027 int bSingleThreadUsage,
01028 char **papszOptions );
01029
01030 CPLVirtualMem CPL_DLL* GDALRasterBandGetVirtualMem( GDALRasterBandH hBand,
01031 GDALRWFlag eRWFlag,
01032 int nXOff, int nYOff,
01033 int nXSize, int nYSize,
01034 int nBufXSize, int nBufYSize,
01035 GDALDataType eBufType,
01036 int nPixelSpace,
01037 GIntBig nLineSpace,
01038 size_t nCacheSize,
01039 size_t nPageSizeHint,
01040 int bSingleThreadUsage,
01041 char **papszOptions );
01042
01043 CPLVirtualMem CPL_DLL* GDALGetVirtualMemAuto( GDALRasterBandH hBand,
01044 GDALRWFlag eRWFlag,
01045 int *pnPixelSpace,
01046 GIntBig *pnLineSpace,
01047 char **papszOptions );
01048
01049 typedef enum
01050 {
01052 GTO_TIP,
01054 GTO_BIT,
01056 GTO_BSQ
01057 } GDALTileOrganization;
01058
01059 CPLVirtualMem CPL_DLL* GDALDatasetGetTiledVirtualMem( GDALDatasetH hDS,
01060 GDALRWFlag eRWFlag,
01061 int nXOff, int nYOff,
01062 int nXSize, int nYSize,
01063 int nTileXSize, int nTileYSize,
01064 GDALDataType eBufType,
01065 int nBandCount, int* panBandMap,
01066 GDALTileOrganization eTileOrganization,
01067 size_t nCacheSize,
01068 int bSingleThreadUsage,
01069 char **papszOptions );
01070
01071 CPLVirtualMem CPL_DLL* GDALRasterBandGetTiledVirtualMem( GDALRasterBandH hBand,
01072 GDALRWFlag eRWFlag,
01073 int nXOff, int nYOff,
01074 int nXSize, int nYSize,
01075 int nTileXSize, int nTileYSize,
01076 GDALDataType eBufType,
01077 size_t nCacheSize,
01078 int bSingleThreadUsage,
01079 char **papszOptions );
01080
01081
01082
01083
01084
01085 CPLXMLNode CPL_DLL* GDALGetJPEG2000Structure(const char* pszFilename,
01086 char** papszOptions);
01087
01088 CPL_C_END
01089
01090 #endif