GDAL

gdal.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * $Id: gdal.h 17687 2009-09-25 13:43:56Z dron $
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 
00075 typedef enum { GA_ReadOnly = 0,           GA_Update = 1
00078 } GDALAccess;
00079 
00081 typedef enum {   GF_Read = 0,  GF_Write = 1
00084 } GDALRWFlag;
00085 
00087 typedef enum
00088 {
00089     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
00107 } GDALColorInterp;
00108 
00109 const char CPL_DLL *GDALGetColorInterpretationName( GDALColorInterp );
00110 GDALColorInterp CPL_DLL GDALGetColorInterpretationByName( const char *pszName );
00111 
00113 typedef enum 
00114 {                      GPI_Gray=0,  GPI_RGB=1, GPI_CMYK=2,     GPI_HLS=3
00119 } GDALPaletteInterp;
00120 
00121 const char CPL_DLL *GDALGetPaletteInterpretationName( GDALPaletteInterp );
00122 
00123 /* "well known" metadata items. */
00124 
00125 #define GDALMD_AREA_OR_POINT   "AREA_OR_POINT" 
00126 #  define GDALMD_AOP_AREA      "Area"
00127 #  define GDALMD_AOP_POINT     "Point"
00128 
00129 /* -------------------------------------------------------------------- */
00130 /*      GDAL Specific error codes.                                      */
00131 /*                                                                      */
00132 /*      error codes 100 to 299 reserved for GDAL.                       */
00133 /* -------------------------------------------------------------------- */
00134 #define CPLE_WrongFormat        200
00135 
00136 /* -------------------------------------------------------------------- */
00137 /*      Define handle types related to various internal classes.        */
00138 /* -------------------------------------------------------------------- */
00139 
00141 typedef void *GDALMajorObjectH;
00142 
00144 typedef void *GDALDatasetH;
00145 
00147 typedef void *GDALRasterBandH;
00148 
00150 typedef void *GDALDriverH;
00151 
00152 #ifndef DOXYGEN_SKIP
00153 /* Deprecated / unused */
00154 typedef void *GDALProjDefH;
00155 #endif
00156 
00158 typedef void *GDALColorTableH;
00159 
00161 typedef void *GDALRasterAttributeTableH;
00162 
00163 /* -------------------------------------------------------------------- */
00164 /*      Callback "progress" function.                                   */
00165 /* -------------------------------------------------------------------- */
00166 
00167 typedef int (CPL_STDCALL *GDALProgressFunc)(double dfComplete, const char *pszMessage, void *pProgressArg);
00168 
00169 int CPL_DLL CPL_STDCALL GDALDummyProgress( double, const char *, void *);
00170 int CPL_DLL CPL_STDCALL GDALTermProgress( double, const char *, void *);
00171 int CPL_DLL CPL_STDCALL GDALScaledProgress( double, const char *, void *);
00172 void CPL_DLL * CPL_STDCALL GDALCreateScaledProgress( double, double,
00173                                         GDALProgressFunc, void * );
00174 void CPL_DLL CPL_STDCALL GDALDestroyScaledProgress( void * );
00175 
00176 /* ==================================================================== */
00177 /*      Registration/driver related.                                    */
00178 /* ==================================================================== */
00179 
00180 #ifndef DOXYGEN_SKIP
00181 /* Deprecated / unused */
00182 typedef struct {
00183     char      *pszOptionName;
00184     char      *pszValueType;   /* "boolean", "int", "float", "string", 
00185                                   "string-select" */
00186     char      *pszDescription;
00187     char      **papszOptions;
00188 } GDALOptionDefinition;
00189 #endif
00190 
00191 #define GDAL_DMD_LONGNAME "DMD_LONGNAME"
00192 #define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
00193 #define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
00194 #define GDAL_DMD_EXTENSION "DMD_EXTENSION"
00195 #define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST" 
00196 #define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES" 
00197 
00198 #define GDAL_DCAP_CREATE     "DCAP_CREATE"
00199 #define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
00200 #define GDAL_DCAP_VIRTUALIO  "DCAP_VIRTUALIO"
00201 
00202 void CPL_DLL CPL_STDCALL GDALAllRegister( void );
00203 
00204 GDALDatasetH CPL_DLL CPL_STDCALL GDALCreate( GDALDriverH hDriver,
00205                                  const char *, int, int, int, GDALDataType,
00206                                  char ** );
00207 GDALDatasetH CPL_DLL CPL_STDCALL
00208 GDALCreateCopy( GDALDriverH, const char *, GDALDatasetH,
00209                 int, char **, GDALProgressFunc, void * );
00210 
00211 GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriver( const char * pszFilename,
00212                                             char ** papszFileList );
00213 GDALDatasetH CPL_DLL CPL_STDCALL
00214 GDALOpen( const char *pszFilename, GDALAccess eAccess );
00215 GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenShared( const char *, GDALAccess );
00216 int          CPL_DLL CPL_STDCALL GDALDumpOpenDatasets( FILE * );
00217 
00218 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriverByName( const char * );
00219 int CPL_DLL         CPL_STDCALL GDALGetDriverCount( void );
00220 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriver( int );
00221 void        CPL_DLL CPL_STDCALL GDALDestroyDriver( GDALDriverH );
00222 int         CPL_DLL CPL_STDCALL GDALRegisterDriver( GDALDriverH );
00223 void        CPL_DLL CPL_STDCALL GDALDeregisterDriver( GDALDriverH );
00224 void        CPL_DLL CPL_STDCALL GDALDestroyDriverManager( void );
00225 CPLErr      CPL_DLL CPL_STDCALL GDALDeleteDataset( GDALDriverH, const char * );
00226 CPLErr      CPL_DLL CPL_STDCALL GDALRenameDataset( GDALDriverH, 
00227                                                    const char * pszNewName,
00228                                                    const char * pszOldName );
00229 CPLErr      CPL_DLL CPL_STDCALL GDALCopyDatasetFiles( GDALDriverH, 
00230                                                       const char * pszNewName,
00231                                                       const char * pszOldName);
00232 int         CPL_DLL CPL_STDCALL GDALValidateCreationOptions( GDALDriverH,
00233                                                              char** papszCreationOptions);
00234 
00235 /* The following are deprecated */
00236 const char CPL_DLL * CPL_STDCALL GDALGetDriverShortName( GDALDriverH );
00237 const char CPL_DLL * CPL_STDCALL GDALGetDriverLongName( GDALDriverH );
00238 const char CPL_DLL * CPL_STDCALL GDALGetDriverHelpTopic( GDALDriverH );
00239 const char CPL_DLL * CPL_STDCALL GDALGetDriverCreationOptionList( GDALDriverH );
00240 
00241 /* ==================================================================== */
00242 /*      GDAL_GCP                                                        */
00243 /* ==================================================================== */
00244 
00246 typedef struct
00247 {
00249     char        *pszId; 
00250 
00252     char        *pszInfo;
00253 
00255     double      dfGCPPixel;
00257     double      dfGCPLine;
00258 
00260     double      dfGCPX;
00261 
00263     double      dfGCPY;
00264 
00266     double      dfGCPZ;
00267 } GDAL_GCP;
00268 
00269 void CPL_DLL CPL_STDCALL GDALInitGCPs( int, GDAL_GCP * );
00270 void CPL_DLL CPL_STDCALL GDALDeinitGCPs( int, GDAL_GCP * );
00271 GDAL_GCP CPL_DLL * CPL_STDCALL GDALDuplicateGCPs( int, const GDAL_GCP * );
00272 
00273 int CPL_DLL CPL_STDCALL
00274 GDALGCPsToGeoTransform( int nGCPCount, const GDAL_GCP *pasGCPs, 
00275                         double *padfGeoTransform, int bApproxOK ); 
00276 int CPL_DLL CPL_STDCALL
00277 GDALInvGeoTransform( double *padfGeoTransformIn, 
00278                      double *padfInvGeoTransformOut );
00279 void CPL_DLL CPL_STDCALL GDALApplyGeoTransform( double *, double, double, 
00280                                                 double *, double * );
00281 
00282 /* ==================================================================== */
00283 /*      major objects (dataset, and, driver, drivermanager).            */
00284 /* ==================================================================== */
00285 
00286 char CPL_DLL  ** CPL_STDCALL GDALGetMetadata( GDALMajorObjectH, const char * );
00287 CPLErr CPL_DLL CPL_STDCALL GDALSetMetadata( GDALMajorObjectH, char **,
00288                                             const char * );
00289 const char CPL_DLL * CPL_STDCALL 
00290 GDALGetMetadataItem( GDALMajorObjectH, const char *, const char * );
00291 CPLErr CPL_DLL CPL_STDCALL
00292 GDALSetMetadataItem( GDALMajorObjectH, const char *, const char *,
00293                      const char * );
00294 const char CPL_DLL * CPL_STDCALL GDALGetDescription( GDALMajorObjectH );
00295 void CPL_DLL CPL_STDCALL GDALSetDescription( GDALMajorObjectH, const char * );
00296 
00297 /* ==================================================================== */
00298 /*      GDALDataset class ... normally this represents one file.        */
00299 /* ==================================================================== */
00300 
00301 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDatasetDriver( GDALDatasetH );
00302 char CPL_DLL ** CPL_STDCALL GDALGetFileList( GDALDatasetH );
00303 void CPL_DLL CPL_STDCALL   GDALClose( GDALDatasetH );
00304 int CPL_DLL CPL_STDCALL     GDALGetRasterXSize( GDALDatasetH );
00305 int CPL_DLL CPL_STDCALL     GDALGetRasterYSize( GDALDatasetH );
00306 int CPL_DLL CPL_STDCALL     GDALGetRasterCount( GDALDatasetH );
00307 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetRasterBand( GDALDatasetH, int );
00308 
00309 CPLErr CPL_DLL  CPL_STDCALL GDALAddBand( GDALDatasetH hDS, GDALDataType eType, 
00310                              char **papszOptions );
00311 
00312 CPLErr CPL_DLL CPL_STDCALL GDALDatasetRasterIO( 
00313     GDALDatasetH hDS, GDALRWFlag eRWFlag,
00314     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00315     void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType,
00316     int nBandCount, int *panBandCount, 
00317     int nPixelSpace, int nLineSpace, int nBandSpace);
00318 
00319 CPLErr CPL_DLL CPL_STDCALL GDALDatasetAdviseRead( GDALDatasetH hDS, 
00320     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00321     int nBXSize, int nBYSize, GDALDataType eBDataType,
00322     int nBandCount, int *panBandCount, char **papszOptions );
00323 
00324 const char CPL_DLL * CPL_STDCALL GDALGetProjectionRef( GDALDatasetH );
00325 CPLErr CPL_DLL CPL_STDCALL GDALSetProjection( GDALDatasetH, const char * );
00326 CPLErr CPL_DLL CPL_STDCALL GDALGetGeoTransform( GDALDatasetH, double * );
00327 CPLErr CPL_DLL CPL_STDCALL GDALSetGeoTransform( GDALDatasetH, double * );
00328 
00329 int CPL_DLL CPL_STDCALL  GDALGetGCPCount( GDALDatasetH );
00330 const char CPL_DLL * CPL_STDCALL GDALGetGCPProjection( GDALDatasetH );
00331 const GDAL_GCP CPL_DLL * CPL_STDCALL GDALGetGCPs( GDALDatasetH );
00332 CPLErr CPL_DLL CPL_STDCALL GDALSetGCPs( GDALDatasetH, int, const GDAL_GCP *,
00333                                         const char * );
00334 
00335 void CPL_DLL * CPL_STDCALL GDALGetInternalHandle( GDALDatasetH, const char * );
00336 int CPL_DLL CPL_STDCALL GDALReferenceDataset( GDALDatasetH );
00337 int CPL_DLL CPL_STDCALL GDALDereferenceDataset( GDALDatasetH );
00338 
00339 CPLErr CPL_DLL CPL_STDCALL
00340 GDALBuildOverviews( GDALDatasetH, const char *, int, int *,
00341                     int, int *, GDALProgressFunc, void * );
00342 void CPL_DLL CPL_STDCALL GDALGetOpenDatasets( GDALDatasetH **hDS, int *pnCount );
00343 int CPL_DLL CPL_STDCALL GDALGetAccess( GDALDatasetH hDS );
00344 void CPL_DLL CPL_STDCALL GDALFlushCache( GDALDatasetH hDS );
00345 
00346 CPLErr CPL_DLL CPL_STDCALL 
00347               GDALCreateDatasetMaskBand( GDALDatasetH hDS, int nFlags );
00348 
00349 CPLErr CPL_DLL CPL_STDCALL GDALDatasetCopyWholeRaster(
00350     GDALDatasetH hSrcDS, GDALDatasetH hDstDS, char **papszOptions, 
00351     GDALProgressFunc pfnProgress, void *pProgressData );
00352 
00353 CPLErr CPL_DLL 
00354 GDALRegenerateOverviews( GDALRasterBandH hSrcBand, 
00355                          int nOverviewCount, GDALRasterBandH *pahOverviewBands,
00356                          const char *pszResampling, 
00357                          GDALProgressFunc pfnProgress, void *pProgressData );
00358 
00359 /* ==================================================================== */
00360 /*      GDALRasterBand ... one band/channel in a dataset.               */
00361 /* ==================================================================== */
00362 
00367 #define SRCVAL(papoSource, eSrcType, ii) \
00368       (eSrcType == GDT_Byte ? \
00369           ((GByte *)papoSource)[ii] : \
00370       (eSrcType == GDT_Float32 ? \
00371           ((float *)papoSource)[ii] : \
00372       (eSrcType == GDT_Float64 ? \
00373           ((double *)papoSource)[ii] : \
00374       (eSrcType == GDT_Int32 ? \
00375           ((GInt32 *)papoSource)[ii] : \
00376       (eSrcType == GDT_UInt16 ? \
00377           ((GUInt16 *)papoSource)[ii] : \
00378       (eSrcType == GDT_Int16 ? \
00379           ((GInt16 *)papoSource)[ii] : \
00380       (eSrcType == GDT_UInt32 ? \
00381           ((GUInt32 *)papoSource)[ii] : \
00382       (eSrcType == GDT_CInt16 ? \
00383           ((GInt16 *)papoSource)[ii * 2] : \
00384       (eSrcType == GDT_CInt32 ? \
00385           ((GInt32 *)papoSource)[ii * 2] : \
00386       (eSrcType == GDT_CFloat32 ? \
00387           ((float *)papoSource)[ii * 2] : \
00388       (eSrcType == GDT_CFloat64 ? \
00389           ((double *)papoSource)[ii * 2] : 0)))))))))))
00390 
00391 typedef CPLErr
00392 (*GDALDerivedPixelFunc)(void **papoSources, int nSources, void *pData,
00393                         int nBufXSize, int nBufYSize,
00394                         GDALDataType eSrcType, GDALDataType eBufType,
00395                         int nPixelSpace, int nLineSpace);
00396 
00397 GDALDataType CPL_DLL CPL_STDCALL GDALGetRasterDataType( GDALRasterBandH );
00398 void CPL_DLL CPL_STDCALL 
00399 GDALGetBlockSize( GDALRasterBandH, int * pnXSize, int * pnYSize );
00400 
00401 CPLErr CPL_DLL CPL_STDCALL GDALRasterAdviseRead( GDALRasterBandH hRB, 
00402     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00403     int nBXSize, int nBYSize, GDALDataType eBDataType, char **papszOptions );
00404 
00405 CPLErr CPL_DLL CPL_STDCALL 
00406 GDALRasterIO( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
00407               int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00408               void * pBuffer, int nBXSize, int nBYSize,GDALDataType eBDataType,
00409               int nPixelSpace, int nLineSpace );
00410 CPLErr CPL_DLL CPL_STDCALL GDALReadBlock( GDALRasterBandH, int, int, void * );
00411 CPLErr CPL_DLL CPL_STDCALL GDALWriteBlock( GDALRasterBandH, int, int, void * );
00412 int CPL_DLL CPL_STDCALL GDALGetRasterBandXSize( GDALRasterBandH );
00413 int CPL_DLL CPL_STDCALL GDALGetRasterBandYSize( GDALRasterBandH );
00414 GDALAccess CPL_DLL CPL_STDCALL GDALGetRasterAccess( GDALRasterBandH );
00415 int CPL_DLL CPL_STDCALL GDALGetBandNumber( GDALRasterBandH );
00416 GDALDatasetH CPL_DLL CPL_STDCALL GDALGetBandDataset( GDALRasterBandH );
00417 
00418 GDALColorInterp CPL_DLL CPL_STDCALL
00419 GDALGetRasterColorInterpretation( GDALRasterBandH );
00420 CPLErr CPL_DLL CPL_STDCALL 
00421 GDALSetRasterColorInterpretation( GDALRasterBandH, GDALColorInterp );
00422 GDALColorTableH CPL_DLL CPL_STDCALL GDALGetRasterColorTable( GDALRasterBandH );
00423 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterColorTable( GDALRasterBandH, GDALColorTableH );
00424 int CPL_DLL CPL_STDCALL GDALHasArbitraryOverviews( GDALRasterBandH );
00425 int CPL_DLL CPL_STDCALL GDALGetOverviewCount( GDALRasterBandH );
00426 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetOverview( GDALRasterBandH, int );
00427 double CPL_DLL CPL_STDCALL GDALGetRasterNoDataValue( GDALRasterBandH, int * );
00428 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterNoDataValue( GDALRasterBandH, double );
00429 char CPL_DLL ** CPL_STDCALL GDALGetRasterCategoryNames( GDALRasterBandH );
00430 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterCategoryNames( GDALRasterBandH, char ** );
00431 double CPL_DLL CPL_STDCALL GDALGetRasterMinimum( GDALRasterBandH, int *pbSuccess );
00432 double CPL_DLL CPL_STDCALL GDALGetRasterMaximum( GDALRasterBandH, int *pbSuccess );
00433 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterStatistics( 
00434     GDALRasterBandH, int bApproxOK, int bForce, 
00435     double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev );
00436 CPLErr CPL_DLL CPL_STDCALL GDALComputeRasterStatistics( 
00437     GDALRasterBandH, int bApproxOK, 
00438     double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev,
00439     GDALProgressFunc pfnProgress, void *pProgressData );
00440 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterStatistics( 
00441     GDALRasterBandH hBand, 
00442     double dfMin, double dfMax, double dfMean, double dfStdDev );
00443 
00444 const char CPL_DLL * CPL_STDCALL GDALGetRasterUnitType( GDALRasterBandH );
00445 double CPL_DLL CPL_STDCALL GDALGetRasterOffset( GDALRasterBandH, int *pbSuccess );
00446 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterOffset( GDALRasterBandH hBand, double dfNewOffset);
00447 double CPL_DLL CPL_STDCALL GDALGetRasterScale( GDALRasterBandH, int *pbSuccess );
00448 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterScale( GDALRasterBandH hBand, double dfNewOffset );
00449 void CPL_DLL CPL_STDCALL 
00450 GDALComputeRasterMinMax( GDALRasterBandH hBand, int bApproxOK,
00451                          double adfMinMax[2] );
00452 CPLErr CPL_DLL CPL_STDCALL GDALFlushRasterCache( GDALRasterBandH hBand );
00453 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterHistogram( GDALRasterBandH hBand,
00454                                        double dfMin, double dfMax,
00455                                        int nBuckets, int *panHistogram,
00456                                        int bIncludeOutOfRange, int bApproxOK,
00457                                        GDALProgressFunc pfnProgress,
00458                                        void * pProgressData );
00459 CPLErr CPL_DLL CPL_STDCALL GDALGetDefaultHistogram( GDALRasterBandH hBand,
00460                                        double *pdfMin, double *pdfMax,
00461                                        int *pnBuckets, int **ppanHistogram,
00462                                        int bForce,
00463                                        GDALProgressFunc pfnProgress,
00464                                        void * pProgressData );
00465 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultHistogram( GDALRasterBandH hBand,
00466                                        double dfMin, double dfMax,
00467                                        int nBuckets, int *panHistogram );
00468 int CPL_DLL CPL_STDCALL
00469 GDALGetRandomRasterSample( GDALRasterBandH, int, float * );
00470 GDALRasterBandH CPL_DLL CPL_STDCALL
00471 GDALGetRasterSampleOverview( GDALRasterBandH, int );
00472 CPLErr CPL_DLL CPL_STDCALL GDALFillRaster( GDALRasterBandH hBand,
00473                           double dfRealValue, double dfImaginaryValue );
00474 CPLErr CPL_DLL CPL_STDCALL
00475 GDALComputeBandStats( GDALRasterBandH hBand, int nSampleStep, 
00476                              double *pdfMean, double *pdfStdDev, 
00477                              GDALProgressFunc pfnProgress,
00478                              void *pProgressData );
00479 CPLErr CPL_DLL  GDALOverviewMagnitudeCorrection( GDALRasterBandH hBaseBand, 
00480                                         int nOverviewCount, 
00481                                         GDALRasterBandH *pahOverviews, 
00482                                         GDALProgressFunc pfnProgress, 
00483                                         void *pProgressData );
00484 
00485 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL GDALGetDefaultRAT( 
00486     GDALRasterBandH hBand );
00487 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultRAT( GDALRasterBandH, 
00488                                               GDALRasterAttributeTableH );
00489 CPLErr CPL_DLL CPL_STDCALL GDALAddDerivedBandPixelFunc( const char *pszName,
00490                                     GDALDerivedPixelFunc pfnPixelFunc );
00491 
00492 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetMaskBand( GDALRasterBandH hBand );
00493 int CPL_DLL CPL_STDCALL GDALGetMaskFlags( GDALRasterBandH hBand );
00494 CPLErr CPL_DLL CPL_STDCALL 
00495                        GDALCreateMaskBand( GDALRasterBandH hBand, int nFlags );
00496 
00497 #define GMF_ALL_VALID     0x01
00498 #define GMF_PER_DATASET   0x02
00499 #define GMF_ALPHA         0x04
00500 #define GMF_NODATA        0x08
00501 
00502 /* -------------------------------------------------------------------- */
00503 /*      Helper functions.                                               */
00504 /* -------------------------------------------------------------------- */
00505 int CPL_DLL CPL_STDCALL GDALGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv, 
00506                                          int nOptions );
00507 void CPL_DLL CPL_STDCALL GDALSwapWords( void *pData, int nWordSize, int nWordCount,
00508                             int nWordSkip );
00509 void CPL_DLL CPL_STDCALL 
00510     GDALCopyWords( void * pSrcData, GDALDataType eSrcType, int nSrcPixelOffset,
00511                    void * pDstData, GDALDataType eDstType, int nDstPixelOffset,
00512                    int nWordCount );
00513 
00514 void CPL_DLL 
00515 GDALCopyBits( const GByte *pabySrcData, int nSrcOffset, int nSrcStep, 
00516               GByte *pabyDstData, int nDstOffset, int nDstStep,
00517               int nBitCount, int nStepCount );
00518 
00519 int CPL_DLL CPL_STDCALL GDALLoadWorldFile( const char *, double * );
00520 int CPL_DLL CPL_STDCALL GDALReadWorldFile( const char *, const char *,
00521                                            double * );
00522 int CPL_DLL CPL_STDCALL GDALWriteWorldFile( const char *, const char *,
00523                                             double * );
00524 int CPL_DLL CPL_STDCALL GDALLoadTabFile( const char *, double *, char **,
00525                                          int *, GDAL_GCP ** );
00526 int CPL_DLL CPL_STDCALL GDALReadTabFile( const char *, double *, char **,
00527                                          int *, GDAL_GCP ** );
00528 int CPL_DLL CPL_STDCALL GDALLoadOziMapFile( const char *, double *, char **,
00529                                             int *, GDAL_GCP ** );
00530 int CPL_DLL CPL_STDCALL GDALReadOziMapFile( const char * ,  double *,
00531                                             char **, int *, GDAL_GCP ** );
00532 char CPL_DLL ** CPL_STDCALL GDALLoadRPBFile( const char *pszFilename, 
00533                                              char **papszSiblingFiles );
00534 CPLErr CPL_DLL CPL_STDCALL GDALWriteRPBFile( const char *pszFilename, 
00535                                              char **papszMD );
00536 char CPL_DLL ** CPL_STDCALL GDALLoadIMDFile( const char *pszFilename, 
00537                                              char **papszSiblingFiles );
00538 CPLErr CPL_DLL CPL_STDCALL GDALWriteIMDFile( const char *pszFilename, 
00539                                              char **papszMD );
00540 
00541 const char CPL_DLL * CPL_STDCALL GDALDecToDMS( double, const char *, int );
00542 double CPL_DLL CPL_STDCALL GDALPackedDMSToDec( double );
00543 double CPL_DLL CPL_STDCALL GDALDecToPackedDMS( double );
00544 
00545 /* Note to developers : please keep this section in sync with ogr_core.h */
00546 
00547 #ifndef GDAL_VERSION_INFO_DEFINED
00548 #define GDAL_VERSION_INFO_DEFINED
00549 const char CPL_DLL * CPL_STDCALL GDALVersionInfo( const char * );
00550 #endif
00551 
00552 #ifndef GDAL_CHECK_VERSION
00553 
00554 int CPL_DLL CPL_STDCALL GDALCheckVersion( int nVersionMajor, int nVersionMinor,
00555                                           const char* pszCallingComponentName);
00556 
00560 #define GDAL_CHECK_VERSION(pszCallingComponentName) \
00561  GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName)
00562 
00563 #endif
00564 
00565 typedef struct { 
00566     double      dfLINE_OFF;
00567     double      dfSAMP_OFF;
00568     double      dfLAT_OFF;
00569     double      dfLONG_OFF;
00570     double      dfHEIGHT_OFF;
00571 
00572     double      dfLINE_SCALE;
00573     double      dfSAMP_SCALE;
00574     double      dfLAT_SCALE;
00575     double      dfLONG_SCALE;
00576     double      dfHEIGHT_SCALE;
00577 
00578     double      adfLINE_NUM_COEFF[20];
00579     double      adfLINE_DEN_COEFF[20];
00580     double      adfSAMP_NUM_COEFF[20];
00581     double      adfSAMP_DEN_COEFF[20];
00582     
00583     double      dfMIN_LONG;
00584     double      dfMIN_LAT;
00585     double      dfMAX_LONG;
00586     double      dfMAX_LAT;
00587 
00588 } GDALRPCInfo;
00589 
00590 int CPL_DLL CPL_STDCALL GDALExtractRPCInfo( char **, GDALRPCInfo * );
00591 
00592 /* ==================================================================== */
00593 /*      Color tables.                                                   */
00594 /* ==================================================================== */
00595 
00597 typedef struct
00598 {
00600     short      c1;      
00601 
00603     short      c2;      
00604 
00606     short      c3;      
00607 
00609     short      c4;      
00610 } GDALColorEntry;
00611 
00612 GDALColorTableH CPL_DLL CPL_STDCALL GDALCreateColorTable( GDALPaletteInterp );
00613 void CPL_DLL CPL_STDCALL GDALDestroyColorTable( GDALColorTableH );
00614 GDALColorTableH CPL_DLL CPL_STDCALL GDALCloneColorTable( GDALColorTableH );
00615 GDALPaletteInterp CPL_DLL CPL_STDCALL GDALGetPaletteInterpretation( GDALColorTableH );
00616 int CPL_DLL CPL_STDCALL GDALGetColorEntryCount( GDALColorTableH );
00617 const GDALColorEntry CPL_DLL * CPL_STDCALL GDALGetColorEntry( GDALColorTableH, int );
00618 int CPL_DLL CPL_STDCALL GDALGetColorEntryAsRGB( GDALColorTableH, int, GDALColorEntry *);
00619 void CPL_DLL CPL_STDCALL GDALSetColorEntry( GDALColorTableH, int, const GDALColorEntry * );
00620 void CPL_DLL CPL_STDCALL GDALCreateColorRamp( GDALColorTableH hTable, 
00621             int nStartIndex, const GDALColorEntry *psStartColor,
00622             int nEndIndex, const GDALColorEntry *psEndColor );
00623 
00624 /* ==================================================================== */
00625 /*      Raster Attribute Table                                          */
00626 /* ==================================================================== */
00627 
00629 typedef enum {             GFT_Integer ,    GFT_Real,                    GFT_String
00633 } GDALRATFieldType;
00634 
00636 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
00656 } GDALRATFieldUsage;
00657 
00658 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL 
00659                                            GDALCreateRasterAttributeTable(void);
00660 void CPL_DLL CPL_STDCALL GDALDestroyRasterAttributeTable(
00661     GDALRasterAttributeTableH );
00662 
00663 int CPL_DLL CPL_STDCALL GDALRATGetColumnCount( GDALRasterAttributeTableH );
00664 
00665 const char CPL_DLL * CPL_STDCALL GDALRATGetNameOfCol( 
00666     GDALRasterAttributeTableH, int );
00667 GDALRATFieldUsage CPL_DLL CPL_STDCALL GDALRATGetUsageOfCol( 
00668     GDALRasterAttributeTableH, int );
00669 GDALRATFieldType CPL_DLL CPL_STDCALL GDALRATGetTypeOfCol( 
00670     GDALRasterAttributeTableH, int );
00671 
00672 int CPL_DLL CPL_STDCALL GDALRATGetColOfUsage( GDALRasterAttributeTableH, 
00673                                               GDALRATFieldUsage );
00674 int CPL_DLL CPL_STDCALL GDALRATGetRowCount( GDALRasterAttributeTableH );
00675 
00676 const char CPL_DLL * CPL_STDCALL GDALRATGetValueAsString( 
00677     GDALRasterAttributeTableH, int ,int);
00678 int CPL_DLL CPL_STDCALL GDALRATGetValueAsInt( 
00679     GDALRasterAttributeTableH, int ,int);
00680 double CPL_DLL CPL_STDCALL GDALRATGetValueAsDouble( 
00681     GDALRasterAttributeTableH, int ,int);
00682 
00683 void CPL_DLL CPL_STDCALL GDALRATSetValueAsString( GDALRasterAttributeTableH, int, int,
00684                                                   const char * );
00685 void CPL_DLL CPL_STDCALL GDALRATSetValueAsInt( GDALRasterAttributeTableH, int, int,
00686                                                int );
00687 void CPL_DLL CPL_STDCALL GDALRATSetValueAsDouble( GDALRasterAttributeTableH, int, int,
00688                                                   double );
00689 void CPL_DLL CPL_STDCALL GDALRATSetRowCount( GDALRasterAttributeTableH, 
00690                                              int );
00691 CPLErr CPL_DLL CPL_STDCALL GDALRATCreateColumn( GDALRasterAttributeTableH, 
00692                                                 const char *, 
00693                                                 GDALRATFieldType, 
00694                                                 GDALRATFieldUsage );
00695 CPLErr CPL_DLL CPL_STDCALL GDALRATSetLinearBinning( GDALRasterAttributeTableH, 
00696                                                     double, double );
00697 int CPL_DLL CPL_STDCALL GDALRATGetLinearBinning( GDALRasterAttributeTableH, 
00698                                                  double *, double * );
00699 CPLErr CPL_DLL CPL_STDCALL GDALRATInitializeFromColorTable(
00700     GDALRasterAttributeTableH, GDALColorTableH );
00701 GDALColorTableH CPL_DLL CPL_STDCALL GDALRATTranslateToColorTable(
00702     GDALRasterAttributeTableH, int nEntryCount );
00703 void CPL_DLL CPL_STDCALL GDALRATDumpReadable( GDALRasterAttributeTableH, 
00704                                               FILE * );
00705 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL 
00706     GDALRATClone( GDALRasterAttributeTableH );
00707 
00708 int CPL_DLL CPL_STDCALL GDALRATGetRowOfValue( GDALRasterAttributeTableH , double );
00709 
00710 
00711 /* ==================================================================== */
00712 /*      GDAL Cache Management                                           */
00713 /* ==================================================================== */
00714 
00715 void CPL_DLL CPL_STDCALL GDALSetCacheMax( int nBytes );
00716 int CPL_DLL CPL_STDCALL GDALGetCacheMax(void);
00717 int CPL_DLL CPL_STDCALL GDALGetCacheUsed(void);
00718 int CPL_DLL CPL_STDCALL GDALFlushCacheBlock(void);
00719 
00720 CPL_C_END
00721 
00722 #endif /* ndef GDAL_H_INCLUDED */

Generated for GDAL by doxygen 1.7.3.