GDAL
gdal.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  * $Id: gdal.h 23431 2011-11-27 15:02:24Z rouault $
00003  *
00004  * Project:  GDAL Core
00005  * Purpose:  GDAL Core C/Public declarations.
00006  * Author:   Frank Warmerdam, warmerdam@pobox.com
00007  *
00008  ******************************************************************************
00009  * Copyright (c) 1998, 2002 Frank Warmerdam
00010  *
00011  * Permission is hereby granted, free of charge, to any person obtaining a
00012  * copy of this software and associated documentation files (the "Software"),
00013  * to deal in the Software without restriction, including without limitation
00014  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00015  * and/or sell copies of the Software, and to permit persons to whom the
00016  * Software is furnished to do so, subject to the following conditions:
00017  *
00018  * The above copyright notice and this permission notice shall be included
00019  * in all copies or substantial portions of the Software.
00020  *
00021  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00022  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00023  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00024  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00025  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00026  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00027  * DEALINGS IN THE SOFTWARE.
00028  ****************************************************************************/
00029 
00030 #ifndef GDAL_H_INCLUDED
00031 #define GDAL_H_INCLUDED
00032 
00039 #ifndef DOXYGEN_SKIP
00040 #include "gdal_version.h"
00041 #include "cpl_port.h"
00042 #include "cpl_error.h"
00043 #endif
00044 
00045 /* -------------------------------------------------------------------- */
00046 /*      Significant constants.                                          */
00047 /* -------------------------------------------------------------------- */
00048 
00049 CPL_C_START
00050 
00052 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,
00065     GDT_TypeCount = 12          /* maximum type # + 1 */
00066 } GDALDataType;
00067 
00068 int CPL_DLL CPL_STDCALL GDALGetDataTypeSize( GDALDataType );
00069 int CPL_DLL CPL_STDCALL GDALDataTypeIsComplex( GDALDataType );
00070 const char CPL_DLL * CPL_STDCALL GDALGetDataTypeName( GDALDataType );
00071 GDALDataType CPL_DLL CPL_STDCALL GDALGetDataTypeByName( const char * );
00072 GDALDataType CPL_DLL CPL_STDCALL GDALDataTypeUnion( GDALDataType, GDALDataType );
00073 
00077 typedef enum 
00078 {       
00079         GARIO_PENDING = 0,
00080         GARIO_UPDATE = 1,
00081         GARIO_ERROR = 2,
00082         GARIO_COMPLETE = 3,
00083         GARIO_TypeCount = 4
00084 } GDALAsyncStatusType;
00085 
00086 const char CPL_DLL * CPL_STDCALL GDALGetAsyncStatusTypeName( GDALAsyncStatusType );
00087 GDALAsyncStatusType CPL_DLL CPL_STDCALL GDALGetAsyncStatusTypeByName( const char * );
00088 
00090 typedef enum { GA_ReadOnly = 0,           GA_Update = 1
00093 } GDALAccess;
00094 
00096 typedef enum {   GF_Read = 0,  GF_Write = 1
00099 } GDALRWFlag;
00100 
00102 typedef enum
00103 {
00104     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
00122 } GDALColorInterp;
00123 
00124 const char CPL_DLL *GDALGetColorInterpretationName( GDALColorInterp );
00125 GDALColorInterp CPL_DLL GDALGetColorInterpretationByName( const char *pszName );
00126 
00128 typedef enum 
00129 {                      GPI_Gray=0,  GPI_RGB=1, GPI_CMYK=2,     GPI_HLS=3
00134 } GDALPaletteInterp;
00135 
00136 const char CPL_DLL *GDALGetPaletteInterpretationName( GDALPaletteInterp );
00137 
00138 /* "well known" metadata items. */
00139 
00140 #define GDALMD_AREA_OR_POINT   "AREA_OR_POINT" 
00141 #  define GDALMD_AOP_AREA      "Area"
00142 #  define GDALMD_AOP_POINT     "Point"
00143 
00144 /* -------------------------------------------------------------------- */
00145 /*      GDAL Specific error codes.                                      */
00146 /*                                                                      */
00147 /*      error codes 100 to 299 reserved for GDAL.                       */
00148 /* -------------------------------------------------------------------- */
00149 #define CPLE_WrongFormat        200
00150 
00151 /* -------------------------------------------------------------------- */
00152 /*      Define handle types related to various internal classes.        */
00153 /* -------------------------------------------------------------------- */
00154 
00156 typedef void *GDALMajorObjectH;
00157 
00159 typedef void *GDALDatasetH;
00160 
00162 typedef void *GDALRasterBandH;
00163 
00165 typedef void *GDALDriverH;
00166 
00167 #ifndef DOXYGEN_SKIP
00168 /* Deprecated / unused */
00169 typedef void *GDALProjDefH;
00170 #endif
00171 
00173 typedef void *GDALColorTableH;
00174 
00176 typedef void *GDALRasterAttributeTableH;
00177 
00179 typedef void *GDALAsyncReaderH;
00180 
00181 /* -------------------------------------------------------------------- */
00182 /*      Callback "progress" function.                                   */
00183 /* -------------------------------------------------------------------- */
00184 
00185 typedef int (CPL_STDCALL *GDALProgressFunc)(double dfComplete, const char *pszMessage, void *pProgressArg);
00186 
00187 int CPL_DLL CPL_STDCALL GDALDummyProgress( double, const char *, void *);
00188 int CPL_DLL CPL_STDCALL GDALTermProgress( double, const char *, void *);
00189 int CPL_DLL CPL_STDCALL GDALScaledProgress( double, const char *, void *);
00190 void CPL_DLL * CPL_STDCALL GDALCreateScaledProgress( double, double,
00191                                         GDALProgressFunc, void * );
00192 void CPL_DLL CPL_STDCALL GDALDestroyScaledProgress( void * );
00193 
00194 /* ==================================================================== */
00195 /*      Registration/driver related.                                    */
00196 /* ==================================================================== */
00197 
00198 #ifndef DOXYGEN_SKIP
00199 /* Deprecated / unused */
00200 typedef struct {
00201     char      *pszOptionName;
00202     char      *pszValueType;   /* "boolean", "int", "float", "string", 
00203                                   "string-select" */
00204     char      *pszDescription;
00205     char      **papszOptions;
00206 } GDALOptionDefinition;
00207 #endif
00208 
00209 #define GDAL_DMD_LONGNAME "DMD_LONGNAME"
00210 #define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
00211 #define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
00212 #define GDAL_DMD_EXTENSION "DMD_EXTENSION"
00213 #define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST" 
00214 #define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES" 
00215 
00216 #define GDAL_DCAP_CREATE     "DCAP_CREATE"
00217 #define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
00218 #define GDAL_DCAP_VIRTUALIO  "DCAP_VIRTUALIO"
00219 
00220 void CPL_DLL CPL_STDCALL GDALAllRegister( void );
00221 
00222 GDALDatasetH CPL_DLL CPL_STDCALL GDALCreate( GDALDriverH hDriver,
00223                                  const char *, int, int, int, GDALDataType,
00224                                  char ** ) CPL_WARN_UNUSED_RESULT;
00225 GDALDatasetH CPL_DLL CPL_STDCALL
00226 GDALCreateCopy( GDALDriverH, const char *, GDALDatasetH,
00227                 int, char **, GDALProgressFunc, void * ) CPL_WARN_UNUSED_RESULT;
00228 
00229 GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriver( const char * pszFilename,
00230                                             char ** papszFileList );
00231 GDALDatasetH CPL_DLL CPL_STDCALL
00232 GDALOpen( const char *pszFilename, GDALAccess eAccess ) CPL_WARN_UNUSED_RESULT;
00233 GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenShared( const char *, GDALAccess ) CPL_WARN_UNUSED_RESULT;
00234 int          CPL_DLL CPL_STDCALL GDALDumpOpenDatasets( FILE * );
00235 
00236 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriverByName( const char * );
00237 int CPL_DLL         CPL_STDCALL GDALGetDriverCount( void );
00238 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriver( int );
00239 void        CPL_DLL CPL_STDCALL GDALDestroyDriver( GDALDriverH );
00240 int         CPL_DLL CPL_STDCALL GDALRegisterDriver( GDALDriverH );
00241 void        CPL_DLL CPL_STDCALL GDALDeregisterDriver( GDALDriverH );
00242 void        CPL_DLL CPL_STDCALL GDALDestroyDriverManager( void );
00243 CPLErr      CPL_DLL CPL_STDCALL GDALDeleteDataset( GDALDriverH, const char * );
00244 CPLErr      CPL_DLL CPL_STDCALL GDALRenameDataset( GDALDriverH, 
00245                                                    const char * pszNewName,
00246                                                    const char * pszOldName );
00247 CPLErr      CPL_DLL CPL_STDCALL GDALCopyDatasetFiles( GDALDriverH, 
00248                                                       const char * pszNewName,
00249                                                       const char * pszOldName);
00250 int         CPL_DLL CPL_STDCALL GDALValidateCreationOptions( GDALDriverH,
00251                                                              char** papszCreationOptions);
00252 
00253 /* The following are deprecated */
00254 const char CPL_DLL * CPL_STDCALL GDALGetDriverShortName( GDALDriverH );
00255 const char CPL_DLL * CPL_STDCALL GDALGetDriverLongName( GDALDriverH );
00256 const char CPL_DLL * CPL_STDCALL GDALGetDriverHelpTopic( GDALDriverH );
00257 const char CPL_DLL * CPL_STDCALL GDALGetDriverCreationOptionList( GDALDriverH );
00258 
00259 /* ==================================================================== */
00260 /*      GDAL_GCP                                                        */
00261 /* ==================================================================== */
00262 
00264 typedef struct
00265 {
00267     char        *pszId; 
00268 
00270     char        *pszInfo;
00271 
00273     double      dfGCPPixel;
00275     double      dfGCPLine;
00276 
00278     double      dfGCPX;
00279 
00281     double      dfGCPY;
00282 
00284     double      dfGCPZ;
00285 } GDAL_GCP;
00286 
00287 void CPL_DLL CPL_STDCALL GDALInitGCPs( int, GDAL_GCP * );
00288 void CPL_DLL CPL_STDCALL GDALDeinitGCPs( int, GDAL_GCP * );
00289 GDAL_GCP CPL_DLL * CPL_STDCALL GDALDuplicateGCPs( int, const GDAL_GCP * );
00290 
00291 int CPL_DLL CPL_STDCALL
00292 GDALGCPsToGeoTransform( int nGCPCount, const GDAL_GCP *pasGCPs, 
00293                         double *padfGeoTransform, int bApproxOK ); 
00294 int CPL_DLL CPL_STDCALL
00295 GDALInvGeoTransform( double *padfGeoTransformIn, 
00296                      double *padfInvGeoTransformOut );
00297 void CPL_DLL CPL_STDCALL GDALApplyGeoTransform( double *, double, double, 
00298                                                 double *, double * );
00299 
00300 /* ==================================================================== */
00301 /*      major objects (dataset, and, driver, drivermanager).            */
00302 /* ==================================================================== */
00303 
00304 char CPL_DLL  ** CPL_STDCALL GDALGetMetadata( GDALMajorObjectH, const char * );
00305 CPLErr CPL_DLL CPL_STDCALL GDALSetMetadata( GDALMajorObjectH, char **,
00306                                             const char * );
00307 const char CPL_DLL * CPL_STDCALL 
00308 GDALGetMetadataItem( GDALMajorObjectH, const char *, const char * );
00309 CPLErr CPL_DLL CPL_STDCALL
00310 GDALSetMetadataItem( GDALMajorObjectH, const char *, const char *,
00311                      const char * );
00312 const char CPL_DLL * CPL_STDCALL GDALGetDescription( GDALMajorObjectH );
00313 void CPL_DLL CPL_STDCALL GDALSetDescription( GDALMajorObjectH, const char * );
00314 
00315 /* ==================================================================== */
00316 /*      GDALDataset class ... normally this represents one file.        */
00317 /* ==================================================================== */
00318 
00319 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDatasetDriver( GDALDatasetH );
00320 char CPL_DLL ** CPL_STDCALL GDALGetFileList( GDALDatasetH );
00321 void CPL_DLL CPL_STDCALL   GDALClose( GDALDatasetH );
00322 int CPL_DLL CPL_STDCALL     GDALGetRasterXSize( GDALDatasetH );
00323 int CPL_DLL CPL_STDCALL     GDALGetRasterYSize( GDALDatasetH );
00324 int CPL_DLL CPL_STDCALL     GDALGetRasterCount( GDALDatasetH );
00325 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetRasterBand( GDALDatasetH, int );
00326 
00327 CPLErr CPL_DLL  CPL_STDCALL GDALAddBand( GDALDatasetH hDS, GDALDataType eType, 
00328                              char **papszOptions );
00329 
00330 GDALAsyncReaderH CPL_DLL CPL_STDCALL 
00331 GDALBeginAsyncReader(GDALDatasetH hDS, int nXOff, int nYOff,
00332                      int nXSize, int nYSize,
00333                      void *pBuf, int nBufXSize, int nBufYSize,
00334                      GDALDataType eBufType, int nBandCount, int* panBandMap,
00335                      int nPixelSpace, int nLineSpace, int nBandSpace,
00336                      char **papszOptions);
00337 
00338 void  CPL_DLL CPL_STDCALL 
00339 GDALEndAsyncReader(GDALDatasetH hDS, GDALAsyncReaderH hAsynchReaderH);
00340 
00341 CPLErr CPL_DLL CPL_STDCALL GDALDatasetRasterIO( 
00342     GDALDatasetH hDS, GDALRWFlag eRWFlag,
00343     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00344     void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType,
00345     int nBandCount, int *panBandCount, 
00346     int nPixelSpace, int nLineSpace, int nBandSpace);
00347 
00348 CPLErr CPL_DLL CPL_STDCALL GDALDatasetAdviseRead( GDALDatasetH hDS, 
00349     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00350     int nBXSize, int nBYSize, GDALDataType eBDataType,
00351     int nBandCount, int *panBandCount, char **papszOptions );
00352 
00353 const char CPL_DLL * CPL_STDCALL GDALGetProjectionRef( GDALDatasetH );
00354 CPLErr CPL_DLL CPL_STDCALL GDALSetProjection( GDALDatasetH, const char * );
00355 CPLErr CPL_DLL CPL_STDCALL GDALGetGeoTransform( GDALDatasetH, double * );
00356 CPLErr CPL_DLL CPL_STDCALL GDALSetGeoTransform( GDALDatasetH, double * );
00357 
00358 int CPL_DLL CPL_STDCALL  GDALGetGCPCount( GDALDatasetH );
00359 const char CPL_DLL * CPL_STDCALL GDALGetGCPProjection( GDALDatasetH );
00360 const GDAL_GCP CPL_DLL * CPL_STDCALL GDALGetGCPs( GDALDatasetH );
00361 CPLErr CPL_DLL CPL_STDCALL GDALSetGCPs( GDALDatasetH, int, const GDAL_GCP *,
00362                                         const char * );
00363 
00364 void CPL_DLL * CPL_STDCALL GDALGetInternalHandle( GDALDatasetH, const char * );
00365 int CPL_DLL CPL_STDCALL GDALReferenceDataset( GDALDatasetH );
00366 int CPL_DLL CPL_STDCALL GDALDereferenceDataset( GDALDatasetH );
00367 
00368 CPLErr CPL_DLL CPL_STDCALL
00369 GDALBuildOverviews( GDALDatasetH, const char *, int, int *,
00370                     int, int *, GDALProgressFunc, void * );
00371 void CPL_DLL CPL_STDCALL GDALGetOpenDatasets( GDALDatasetH **hDS, int *pnCount );
00372 int CPL_DLL CPL_STDCALL GDALGetAccess( GDALDatasetH hDS );
00373 void CPL_DLL CPL_STDCALL GDALFlushCache( GDALDatasetH hDS );
00374 
00375 CPLErr CPL_DLL CPL_STDCALL 
00376               GDALCreateDatasetMaskBand( GDALDatasetH hDS, int nFlags );
00377 
00378 CPLErr CPL_DLL CPL_STDCALL GDALDatasetCopyWholeRaster(
00379     GDALDatasetH hSrcDS, GDALDatasetH hDstDS, char **papszOptions, 
00380     GDALProgressFunc pfnProgress, void *pProgressData );
00381 
00382 CPLErr CPL_DLL CPL_STDCALL GDALRasterBandCopyWholeRaster(
00383     GDALRasterBandH hSrcBand, GDALRasterBandH hDstBand, char **papszOptions,
00384     GDALProgressFunc pfnProgress, void *pProgressData );
00385 
00386 CPLErr CPL_DLL 
00387 GDALRegenerateOverviews( GDALRasterBandH hSrcBand, 
00388                          int nOverviewCount, GDALRasterBandH *pahOverviewBands,
00389                          const char *pszResampling, 
00390                          GDALProgressFunc pfnProgress, void *pProgressData );
00391 
00392 /* ==================================================================== */
00393 /*      GDALRasterBand ... one band/channel in a dataset.               */
00394 /* ==================================================================== */
00395 
00400 #define SRCVAL(papoSource, eSrcType, ii) \
00401       (eSrcType == GDT_Byte ? \
00402           ((GByte *)papoSource)[ii] : \
00403       (eSrcType == GDT_Float32 ? \
00404           ((float *)papoSource)[ii] : \
00405       (eSrcType == GDT_Float64 ? \
00406           ((double *)papoSource)[ii] : \
00407       (eSrcType == GDT_Int32 ? \
00408           ((GInt32 *)papoSource)[ii] : \
00409       (eSrcType == GDT_UInt16 ? \
00410           ((GUInt16 *)papoSource)[ii] : \
00411       (eSrcType == GDT_Int16 ? \
00412           ((GInt16 *)papoSource)[ii] : \
00413       (eSrcType == GDT_UInt32 ? \
00414           ((GUInt32 *)papoSource)[ii] : \
00415       (eSrcType == GDT_CInt16 ? \
00416           ((GInt16 *)papoSource)[ii * 2] : \
00417       (eSrcType == GDT_CInt32 ? \
00418           ((GInt32 *)papoSource)[ii * 2] : \
00419       (eSrcType == GDT_CFloat32 ? \
00420           ((float *)papoSource)[ii * 2] : \
00421       (eSrcType == GDT_CFloat64 ? \
00422           ((double *)papoSource)[ii * 2] : 0)))))))))))
00423 
00424 typedef CPLErr
00425 (*GDALDerivedPixelFunc)(void **papoSources, int nSources, void *pData,
00426                         int nBufXSize, int nBufYSize,
00427                         GDALDataType eSrcType, GDALDataType eBufType,
00428                         int nPixelSpace, int nLineSpace);
00429 
00430 GDALDataType CPL_DLL CPL_STDCALL GDALGetRasterDataType( GDALRasterBandH );
00431 void CPL_DLL CPL_STDCALL 
00432 GDALGetBlockSize( GDALRasterBandH, int * pnXSize, int * pnYSize );
00433 
00434 CPLErr CPL_DLL CPL_STDCALL GDALRasterAdviseRead( GDALRasterBandH hRB, 
00435     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00436     int nBXSize, int nBYSize, GDALDataType eBDataType, char **papszOptions );
00437 
00438 CPLErr CPL_DLL CPL_STDCALL 
00439 GDALRasterIO( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
00440               int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00441               void * pBuffer, int nBXSize, int nBYSize,GDALDataType eBDataType,
00442               int nPixelSpace, int nLineSpace );
00443 CPLErr CPL_DLL CPL_STDCALL GDALReadBlock( GDALRasterBandH, int, int, void * );
00444 CPLErr CPL_DLL CPL_STDCALL GDALWriteBlock( GDALRasterBandH, int, int, void * );
00445 int CPL_DLL CPL_STDCALL GDALGetRasterBandXSize( GDALRasterBandH );
00446 int CPL_DLL CPL_STDCALL GDALGetRasterBandYSize( GDALRasterBandH );
00447 GDALAccess CPL_DLL CPL_STDCALL GDALGetRasterAccess( GDALRasterBandH );
00448 int CPL_DLL CPL_STDCALL GDALGetBandNumber( GDALRasterBandH );
00449 GDALDatasetH CPL_DLL CPL_STDCALL GDALGetBandDataset( GDALRasterBandH );
00450 
00451 GDALColorInterp CPL_DLL CPL_STDCALL
00452 GDALGetRasterColorInterpretation( GDALRasterBandH );
00453 CPLErr CPL_DLL CPL_STDCALL 
00454 GDALSetRasterColorInterpretation( GDALRasterBandH, GDALColorInterp );
00455 GDALColorTableH CPL_DLL CPL_STDCALL GDALGetRasterColorTable( GDALRasterBandH );
00456 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterColorTable( GDALRasterBandH, GDALColorTableH );
00457 int CPL_DLL CPL_STDCALL GDALHasArbitraryOverviews( GDALRasterBandH );
00458 int CPL_DLL CPL_STDCALL GDALGetOverviewCount( GDALRasterBandH );
00459 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetOverview( GDALRasterBandH, int );
00460 double CPL_DLL CPL_STDCALL GDALGetRasterNoDataValue( GDALRasterBandH, int * );
00461 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterNoDataValue( GDALRasterBandH, double );
00462 char CPL_DLL ** CPL_STDCALL GDALGetRasterCategoryNames( GDALRasterBandH );
00463 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterCategoryNames( GDALRasterBandH, char ** );
00464 double CPL_DLL CPL_STDCALL GDALGetRasterMinimum( GDALRasterBandH, int *pbSuccess );
00465 double CPL_DLL CPL_STDCALL GDALGetRasterMaximum( GDALRasterBandH, int *pbSuccess );
00466 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterStatistics( 
00467     GDALRasterBandH, int bApproxOK, int bForce, 
00468     double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev );
00469 CPLErr CPL_DLL CPL_STDCALL GDALComputeRasterStatistics( 
00470     GDALRasterBandH, int bApproxOK, 
00471     double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev,
00472     GDALProgressFunc pfnProgress, void *pProgressData );
00473 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterStatistics( 
00474     GDALRasterBandH hBand, 
00475     double dfMin, double dfMax, double dfMean, double dfStdDev );
00476 
00477 const char CPL_DLL * CPL_STDCALL GDALGetRasterUnitType( GDALRasterBandH );
00478 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterUnitType( GDALRasterBandH hBand, const char *pszNewValue );
00479 double CPL_DLL CPL_STDCALL GDALGetRasterOffset( GDALRasterBandH, int *pbSuccess );
00480 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterOffset( GDALRasterBandH hBand, double dfNewOffset);
00481 double CPL_DLL CPL_STDCALL GDALGetRasterScale( GDALRasterBandH, int *pbSuccess );
00482 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterScale( GDALRasterBandH hBand, double dfNewOffset );
00483 void CPL_DLL CPL_STDCALL 
00484 GDALComputeRasterMinMax( GDALRasterBandH hBand, int bApproxOK,
00485                          double adfMinMax[2] );
00486 CPLErr CPL_DLL CPL_STDCALL GDALFlushRasterCache( GDALRasterBandH hBand );
00487 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterHistogram( GDALRasterBandH hBand,
00488                                        double dfMin, double dfMax,
00489                                        int nBuckets, int *panHistogram,
00490                                        int bIncludeOutOfRange, int bApproxOK,
00491                                        GDALProgressFunc pfnProgress,
00492                                        void * pProgressData );
00493 CPLErr CPL_DLL CPL_STDCALL GDALGetDefaultHistogram( GDALRasterBandH hBand,
00494                                        double *pdfMin, double *pdfMax,
00495                                        int *pnBuckets, int **ppanHistogram,
00496                                        int bForce,
00497                                        GDALProgressFunc pfnProgress,
00498                                        void * pProgressData );
00499 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultHistogram( GDALRasterBandH hBand,
00500                                        double dfMin, double dfMax,
00501                                        int nBuckets, int *panHistogram );
00502 int CPL_DLL CPL_STDCALL
00503 GDALGetRandomRasterSample( GDALRasterBandH, int, float * );
00504 GDALRasterBandH CPL_DLL CPL_STDCALL
00505 GDALGetRasterSampleOverview( GDALRasterBandH, int );
00506 CPLErr CPL_DLL CPL_STDCALL GDALFillRaster( GDALRasterBandH hBand,
00507                           double dfRealValue, double dfImaginaryValue );
00508 CPLErr CPL_DLL CPL_STDCALL
00509 GDALComputeBandStats( GDALRasterBandH hBand, int nSampleStep, 
00510                              double *pdfMean, double *pdfStdDev, 
00511                              GDALProgressFunc pfnProgress,
00512                              void *pProgressData );
00513 CPLErr CPL_DLL  GDALOverviewMagnitudeCorrection( GDALRasterBandH hBaseBand, 
00514                                         int nOverviewCount, 
00515                                         GDALRasterBandH *pahOverviews, 
00516                                         GDALProgressFunc pfnProgress, 
00517                                         void *pProgressData );
00518 
00519 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL GDALGetDefaultRAT( 
00520     GDALRasterBandH hBand );
00521 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultRAT( GDALRasterBandH, 
00522                                               GDALRasterAttributeTableH );
00523 CPLErr CPL_DLL CPL_STDCALL GDALAddDerivedBandPixelFunc( const char *pszName,
00524                                     GDALDerivedPixelFunc pfnPixelFunc );
00525 
00526 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetMaskBand( GDALRasterBandH hBand );
00527 int CPL_DLL CPL_STDCALL GDALGetMaskFlags( GDALRasterBandH hBand );
00528 CPLErr CPL_DLL CPL_STDCALL 
00529                        GDALCreateMaskBand( GDALRasterBandH hBand, int nFlags );
00530 
00531 #define GMF_ALL_VALID     0x01
00532 #define GMF_PER_DATASET   0x02
00533 #define GMF_ALPHA         0x04
00534 #define GMF_NODATA        0x08
00535 
00536 /* ==================================================================== */
00537 /*     GDALAsyncReader                                                  */
00538 /* ==================================================================== */
00539 
00540 GDALAsyncStatusType CPL_DLL CPL_STDCALL 
00541 GDALARGetNextUpdatedRegion(GDALAsyncReaderH hARIO, double dfTimeout,
00542                          int* pnXBufOff, int* pnYBufOff, 
00543                          int* pnXBufSize, int* pnYBufSize );
00544 int CPL_DLL CPL_STDCALL GDALARLockBuffer(GDALAsyncReaderH hARIO,
00545                                         double dfTimeout);
00546 void CPL_DLL CPL_STDCALL GDALARUnlockBuffer(GDALAsyncReaderH hARIO); 
00547 
00548 /* -------------------------------------------------------------------- */
00549 /*      Helper functions.                                               */
00550 /* -------------------------------------------------------------------- */
00551 int CPL_DLL CPL_STDCALL GDALGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv, 
00552                                          int nOptions );
00553 void CPL_DLL CPL_STDCALL GDALSwapWords( void *pData, int nWordSize, int nWordCount,
00554                             int nWordSkip );
00555 void CPL_DLL CPL_STDCALL 
00556     GDALCopyWords( void * pSrcData, GDALDataType eSrcType, int nSrcPixelOffset,
00557                    void * pDstData, GDALDataType eDstType, int nDstPixelOffset,
00558                    int nWordCount );
00559 
00560 void CPL_DLL 
00561 GDALCopyBits( const GByte *pabySrcData, int nSrcOffset, int nSrcStep, 
00562               GByte *pabyDstData, int nDstOffset, int nDstStep,
00563               int nBitCount, int nStepCount );
00564 
00565 int CPL_DLL CPL_STDCALL GDALLoadWorldFile( const char *, double * );
00566 int CPL_DLL CPL_STDCALL GDALReadWorldFile( const char *, const char *,
00567                                            double * );
00568 int CPL_DLL CPL_STDCALL GDALWriteWorldFile( const char *, const char *,
00569                                             double * );
00570 int CPL_DLL CPL_STDCALL GDALLoadTabFile( const char *, double *, char **,
00571                                          int *, GDAL_GCP ** );
00572 int CPL_DLL CPL_STDCALL GDALReadTabFile( const char *, double *, char **,
00573                                          int *, GDAL_GCP ** );
00574 int CPL_DLL CPL_STDCALL GDALLoadOziMapFile( const char *, double *, char **,
00575                                             int *, GDAL_GCP ** );
00576 int CPL_DLL CPL_STDCALL GDALReadOziMapFile( const char * ,  double *,
00577                                             char **, int *, GDAL_GCP ** );
00578 char CPL_DLL ** CPL_STDCALL GDALLoadRPBFile( const char *pszFilename, 
00579                                              char **papszSiblingFiles );
00580 char CPL_DLL ** CPL_STDCALL GDALLoadRPCFile( const char *pszFilename, 
00581                                              char **papszSiblingFiles );
00582 CPLErr CPL_DLL CPL_STDCALL GDALWriteRPBFile( const char *pszFilename, 
00583                                              char **papszMD );
00584 char CPL_DLL ** CPL_STDCALL GDALLoadIMDFile( const char *pszFilename, 
00585                                              char **papszSiblingFiles );
00586 CPLErr CPL_DLL CPL_STDCALL GDALWriteIMDFile( const char *pszFilename, 
00587                                              char **papszMD );
00588 
00589 const char CPL_DLL * CPL_STDCALL GDALDecToDMS( double, const char *, int );
00590 double CPL_DLL CPL_STDCALL GDALPackedDMSToDec( double );
00591 double CPL_DLL CPL_STDCALL GDALDecToPackedDMS( double );
00592 
00593 /* Note to developers : please keep this section in sync with ogr_core.h */
00594 
00595 #ifndef GDAL_VERSION_INFO_DEFINED
00596 #define GDAL_VERSION_INFO_DEFINED
00597 const char CPL_DLL * CPL_STDCALL GDALVersionInfo( const char * );
00598 #endif
00599 
00600 #ifndef GDAL_CHECK_VERSION
00601 
00602 int CPL_DLL CPL_STDCALL GDALCheckVersion( int nVersionMajor, int nVersionMinor,
00603                                           const char* pszCallingComponentName);
00604 
00608 #define GDAL_CHECK_VERSION(pszCallingComponentName) \
00609  GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName)
00610 
00611 #endif
00612 
00613 typedef struct { 
00614     double      dfLINE_OFF;
00615     double      dfSAMP_OFF;
00616     double      dfLAT_OFF;
00617     double      dfLONG_OFF;
00618     double      dfHEIGHT_OFF;
00619 
00620     double      dfLINE_SCALE;
00621     double      dfSAMP_SCALE;
00622     double      dfLAT_SCALE;
00623     double      dfLONG_SCALE;
00624     double      dfHEIGHT_SCALE;
00625 
00626     double      adfLINE_NUM_COEFF[20];
00627     double      adfLINE_DEN_COEFF[20];
00628     double      adfSAMP_NUM_COEFF[20];
00629     double      adfSAMP_DEN_COEFF[20];
00630     
00631     double      dfMIN_LONG;
00632     double      dfMIN_LAT;
00633     double      dfMAX_LONG;
00634     double      dfMAX_LAT;
00635 
00636 } GDALRPCInfo;
00637 
00638 int CPL_DLL CPL_STDCALL GDALExtractRPCInfo( char **, GDALRPCInfo * );
00639 
00640 /* ==================================================================== */
00641 /*      Color tables.                                                   */
00642 /* ==================================================================== */
00643 
00645 typedef struct
00646 {
00648     short      c1;      
00649 
00651     short      c2;      
00652 
00654     short      c3;      
00655 
00657     short      c4;      
00658 } GDALColorEntry;
00659 
00660 GDALColorTableH CPL_DLL CPL_STDCALL GDALCreateColorTable( GDALPaletteInterp );
00661 void CPL_DLL CPL_STDCALL GDALDestroyColorTable( GDALColorTableH );
00662 GDALColorTableH CPL_DLL CPL_STDCALL GDALCloneColorTable( GDALColorTableH );
00663 GDALPaletteInterp CPL_DLL CPL_STDCALL GDALGetPaletteInterpretation( GDALColorTableH );
00664 int CPL_DLL CPL_STDCALL GDALGetColorEntryCount( GDALColorTableH );
00665 const GDALColorEntry CPL_DLL * CPL_STDCALL GDALGetColorEntry( GDALColorTableH, int );
00666 int CPL_DLL CPL_STDCALL GDALGetColorEntryAsRGB( GDALColorTableH, int, GDALColorEntry *);
00667 void CPL_DLL CPL_STDCALL GDALSetColorEntry( GDALColorTableH, int, const GDALColorEntry * );
00668 void CPL_DLL CPL_STDCALL GDALCreateColorRamp( GDALColorTableH hTable, 
00669             int nStartIndex, const GDALColorEntry *psStartColor,
00670             int nEndIndex, const GDALColorEntry *psEndColor );
00671 
00672 /* ==================================================================== */
00673 /*      Raster Attribute Table                                          */
00674 /* ==================================================================== */
00675 
00677 typedef enum {             GFT_Integer ,    GFT_Real,                    GFT_String
00681 } GDALRATFieldType;
00682 
00684 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
00704 } GDALRATFieldUsage;
00705 
00706 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL 
00707                                            GDALCreateRasterAttributeTable(void);
00708 void CPL_DLL CPL_STDCALL GDALDestroyRasterAttributeTable(
00709     GDALRasterAttributeTableH );
00710 
00711 int CPL_DLL CPL_STDCALL GDALRATGetColumnCount( GDALRasterAttributeTableH );
00712 
00713 const char CPL_DLL * CPL_STDCALL GDALRATGetNameOfCol( 
00714     GDALRasterAttributeTableH, int );
00715 GDALRATFieldUsage CPL_DLL CPL_STDCALL GDALRATGetUsageOfCol( 
00716     GDALRasterAttributeTableH, int );
00717 GDALRATFieldType CPL_DLL CPL_STDCALL GDALRATGetTypeOfCol( 
00718     GDALRasterAttributeTableH, int );
00719 
00720 int CPL_DLL CPL_STDCALL GDALRATGetColOfUsage( GDALRasterAttributeTableH, 
00721                                               GDALRATFieldUsage );
00722 int CPL_DLL CPL_STDCALL GDALRATGetRowCount( GDALRasterAttributeTableH );
00723 
00724 const char CPL_DLL * CPL_STDCALL GDALRATGetValueAsString( 
00725     GDALRasterAttributeTableH, int ,int);
00726 int CPL_DLL CPL_STDCALL GDALRATGetValueAsInt( 
00727     GDALRasterAttributeTableH, int ,int);
00728 double CPL_DLL CPL_STDCALL GDALRATGetValueAsDouble( 
00729     GDALRasterAttributeTableH, int ,int);
00730 
00731 void CPL_DLL CPL_STDCALL GDALRATSetValueAsString( GDALRasterAttributeTableH, int, int,
00732                                                   const char * );
00733 void CPL_DLL CPL_STDCALL GDALRATSetValueAsInt( GDALRasterAttributeTableH, int, int,
00734                                                int );
00735 void CPL_DLL CPL_STDCALL GDALRATSetValueAsDouble( GDALRasterAttributeTableH, int, int,
00736                                                   double );
00737 void CPL_DLL CPL_STDCALL GDALRATSetRowCount( GDALRasterAttributeTableH, 
00738                                              int );
00739 CPLErr CPL_DLL CPL_STDCALL GDALRATCreateColumn( GDALRasterAttributeTableH, 
00740                                                 const char *, 
00741                                                 GDALRATFieldType, 
00742                                                 GDALRATFieldUsage );
00743 CPLErr CPL_DLL CPL_STDCALL GDALRATSetLinearBinning( GDALRasterAttributeTableH, 
00744                                                     double, double );
00745 int CPL_DLL CPL_STDCALL GDALRATGetLinearBinning( GDALRasterAttributeTableH, 
00746                                                  double *, double * );
00747 CPLErr CPL_DLL CPL_STDCALL GDALRATInitializeFromColorTable(
00748     GDALRasterAttributeTableH, GDALColorTableH );
00749 GDALColorTableH CPL_DLL CPL_STDCALL GDALRATTranslateToColorTable(
00750     GDALRasterAttributeTableH, int nEntryCount );
00751 void CPL_DLL CPL_STDCALL GDALRATDumpReadable( GDALRasterAttributeTableH, 
00752                                               FILE * );
00753 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL 
00754     GDALRATClone( GDALRasterAttributeTableH );
00755 
00756 int CPL_DLL CPL_STDCALL GDALRATGetRowOfValue( GDALRasterAttributeTableH , double );
00757 
00758 
00759 /* ==================================================================== */
00760 /*      GDAL Cache Management                                           */
00761 /* ==================================================================== */
00762 
00763 void CPL_DLL CPL_STDCALL GDALSetCacheMax( int nBytes );
00764 int CPL_DLL CPL_STDCALL GDALGetCacheMax(void);
00765 int CPL_DLL CPL_STDCALL GDALGetCacheUsed(void);
00766 void CPL_DLL CPL_STDCALL GDALSetCacheMax64( GIntBig nBytes );
00767 GIntBig CPL_DLL CPL_STDCALL GDALGetCacheMax64(void);
00768 GIntBig CPL_DLL CPL_STDCALL GDALGetCacheUsed64(void);
00769 
00770 int CPL_DLL CPL_STDCALL GDALFlushCacheBlock(void);
00771 
00772 CPL_C_END
00773 
00774 #endif /* ndef GDAL_H_INCLUDED */

Generated for GDAL by doxygen 1.7.6.1.