- Main Page
- Classes
- Files
- Related Pages

- File List
- File Members

# gdal.h

Go to the documentation of this file.

    00001 /******************************************************************************
    00002  * $Id: gdal.h 13162 2007-11-30 15:31:40Z warmerdam $
    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 #include "gdal_version.h"
    00040 #include "cpl_port.h"
    00041 #include "cpl_error.h"
    00042
    00043 /* -------------------------------------------------------------------- */
    00044 /*      Significant constants.                                          */
    00045 /* -------------------------------------------------------------------- */
    00046
    00047 CPL_C_START
    00048
    00050 typedef enum {
    00051     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,
    00063     GDT_TypeCount = 12          /* maximum type # + 1 */
    00064 } GDALDataType;
    00065
    00066 int CPL_DLL CPL_STDCALL GDALGetDataTypeSize( GDALDataType );
    00067 int CPL_DLL CPL_STDCALL GDALDataTypeIsComplex( GDALDataType );
    00068 const char CPL_DLL * CPL_STDCALL GDALGetDataTypeName( GDALDataType );
    00069 GDALDataType CPL_DLL CPL_STDCALL GDALGetDataTypeByName( const char * );
    00070 GDALDataType CPL_DLL CPL_STDCALL GDALDataTypeUnion( GDALDataType, GDALDataType );
    00071
    00073 typedef enum { GA_ReadOnly = 0,           GA_Update = 1
    00076 } GDALAccess;
    00077
    00079 typedef enum {   GF_Read = 0,  GF_Write = 1
    00082 } GDALRWFlag;
    00083
    00085 typedef enum
    00086 {
    00087     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
    00105 } GDALColorInterp;
    00106
    00108 const char CPL_DLL *GDALGetColorInterpretationName( GDALColorInterp );
    00109
    00111 typedef enum
    00112 {                      GPI_Gray=0,  GPI_RGB=1, GPI_CMYK=2,     GPI_HLS=3
    00117 } GDALPaletteInterp;
    00118
    00120 const char CPL_DLL *GDALGetPaletteInterpretationName( GDALPaletteInterp );
    00121
    00122 /* "well known" metadata items. */
    00123
    00124 #define GDALMD_AREA_OR_POINT   "AREA_OR_POINT"
    00125 #  define GDALMD_AOP_AREA      "Area"
    00126 #  define GDALMD_AOP_POINT     "Point"
    00127
    00128 /* -------------------------------------------------------------------- */
    00129 /*      GDAL Specific error codes.                                      */
    00130 /*                                                                      */
    00131 /*      error codes 100 to 299 reserved for GDAL.                       */
    00132 /* -------------------------------------------------------------------- */
    00133 #define CPLE_WrongFormat        200
    00134
    00135 /* -------------------------------------------------------------------- */
    00136 /*      Define handle types related to various internal classes.        */
    00137 /* -------------------------------------------------------------------- */
    00138 typedef void *GDALMajorObjectH;
    00139 typedef void *GDALDatasetH;
    00140 typedef void *GDALRasterBandH;
    00141 typedef void *GDALDriverH;
    00142 typedef void *GDALProjDefH;
    00143 typedef void *GDALColorTableH;
    00144 typedef void *GDALRasterAttributeTableH;
    00145
    00146 /* -------------------------------------------------------------------- */
    00147 /*      Callback "progress" function.                                   */
    00148 /* -------------------------------------------------------------------- */
    00149
    00150 typedef int (CPL_STDCALL *GDALProgressFunc)(double,const char *, void *);
    00151 int CPL_DLL CPL_STDCALL GDALDummyProgress( double, const char *, void *);
    00152 int CPL_DLL CPL_STDCALL GDALTermProgress( double, const char *, void *);
    00153 int CPL_DLL CPL_STDCALL GDALScaledProgress( double, const char *, void *);
    00154 void CPL_DLL * CPL_STDCALL GDALCreateScaledProgress( double, double,
    00155                                         GDALProgressFunc, void * );
    00156 void CPL_DLL CPL_STDCALL GDALDestroyScaledProgress( void * );
    00157
    00158 /* ==================================================================== */
    00159 /*      Registration/driver related.                                    */
    00160 /* ==================================================================== */
    00161
    00162 typedef struct {
    00163     char      *pszOptionName;
    00164     char      *pszValueType;   /* "boolean", "int", "float", "string",
    00165                                   "string-select" */
    00166     char      *pszDescription;
    00167     char      **papszOptions;
    00168 } GDALOptionDefinition;
    00169
    00170 #define GDAL_DMD_LONGNAME "DMD_LONGNAME"
    00171 #define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
    00172 #define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
    00173 #define GDAL_DMD_EXTENSION "DMD_EXTENSION"
    00174 #define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST"
    00175 #define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES"
    00176
    00177 #define GDAL_DCAP_CREATE     "DCAP_CREATE"
    00178 #define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
    00179 #define GDAL_DCAP_VIRTUALIO  "DCAP_VIRTUALIO"
    00180
    00181 void CPL_DLL CPL_STDCALL GDALAllRegister( void );
    00182
    00183 GDALDatasetH CPL_DLL CPL_STDCALL GDALCreate( GDALDriverH hDriver,
    00184                                  const char *, int, int, int, GDALDataType,
    00185                                  char ** );
    00186 GDALDatasetH CPL_DLL CPL_STDCALL
    00187 GDALCreateCopy( GDALDriverH, const char *, GDALDatasetH,
    00188                 int, char **, GDALProgressFunc, void * );
    00189
    00190 GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriver( const char * pszFilename,
    00191                                             char ** papszFileList );
    00192 GDALDatasetH CPL_DLL CPL_STDCALL
    00193 GDALOpen( const char *pszFilename, GDALAccess eAccess );
    00194 GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenShared( const char *, GDALAccess );
    00195 int          CPL_DLL CPL_STDCALL GDALDumpOpenDatasets( FILE * );
    00196
    00197 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriverByName( const char * );
    00198 int CPL_DLL         CPL_STDCALL GDALGetDriverCount( void );
    00199 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriver( int );
    00200 int         CPL_DLL CPL_STDCALL GDALRegisterDriver( GDALDriverH );
    00201 void        CPL_DLL CPL_STDCALL GDALDeregisterDriver( GDALDriverH );
    00202 void        CPL_DLL CPL_STDCALL GDALDestroyDriverManager( void );
    00203 CPLErr      CPL_DLL CPL_STDCALL GDALDeleteDataset( GDALDriverH, const char * );
    00204 CPLErr      CPL_DLL CPL_STDCALL GDALRenameDataset( GDALDriverH,
    00205                                                    const char * pszNewName,
    00206                                                    const char * pszOldName );
    00207 CPLErr      CPL_DLL CPL_STDCALL GDALCopyDatasetFiles( GDALDriverH,
    00208                                                       const char * pszNewName,
    00209                                                       const char * pszOldName);
    00210 int         CPL_DLL CPL_STDCALL GDALValidateCreationOptions( GDALDriverH,
    00211                                                              char** papszCreationOptions);
    00212
    00213 /* The following are deprecated */
    00214 const char CPL_DLL * CPL_STDCALL GDALGetDriverShortName( GDALDriverH );
    00215 const char CPL_DLL * CPL_STDCALL GDALGetDriverLongName( GDALDriverH );
    00216 const char CPL_DLL * CPL_STDCALL GDALGetDriverHelpTopic( GDALDriverH );
    00217 const char CPL_DLL * CPL_STDCALL GDALGetDriverCreationOptionList( GDALDriverH );
    00218
    00219 /* ==================================================================== */
    00220 /*      GDAL_GCP                                                        */
    00221 /* ==================================================================== */
    00222
    00224 typedef struct
    00225 {
    00227     char        *pszId;
    00228
    00230     char        *pszInfo;
    00231
    00233     double      dfGCPPixel;
    00235     double      dfGCPLine;
    00236
    00238     double      dfGCPX;
    00239
    00241     double      dfGCPY;
    00242
    00244     double      dfGCPZ;
    00245 } GDAL_GCP;
    00246
    00247 void CPL_DLL CPL_STDCALL GDALInitGCPs( int, GDAL_GCP * );
    00248 void CPL_DLL CPL_STDCALL GDALDeinitGCPs( int, GDAL_GCP * );
    00249 GDAL_GCP CPL_DLL * CPL_STDCALL GDALDuplicateGCPs( int, const GDAL_GCP * );
    00250
    00251 int CPL_DLL CPL_STDCALL
    00252 GDALGCPsToGeoTransform( int nGCPCount, const GDAL_GCP *pasGCPs,
    00253                         double *padfGeoTransform, int bApproxOK );
    00254 int CPL_DLL CPL_STDCALL
    00255 GDALInvGeoTransform( double *padfGeoTransformIn,
    00256                      double *padfInvGeoTransformOut );
    00257 void CPL_DLL CPL_STDCALL GDALApplyGeoTransform( double *, double, double,
    00258                                                 double *, double * );
    00259
    00260 /* ==================================================================== */
    00261 /*      major objects (dataset, and, driver, drivermanager).            */
    00262 /* ==================================================================== */
    00263
    00264 char CPL_DLL  ** CPL_STDCALL GDALGetMetadata( GDALMajorObjectH, const char * );
    00265 CPLErr CPL_DLL CPL_STDCALL GDALSetMetadata( GDALMajorObjectH, char **,
    00266                                             const char * );
    00267 const char CPL_DLL * CPL_STDCALL
    00268 GDALGetMetadataItem( GDALMajorObjectH, const char *, const char * );
    00269 CPLErr CPL_DLL CPL_STDCALL
    00270 GDALSetMetadataItem( GDALMajorObjectH, const char *, const char *,
    00271                      const char * );
    00272 const char CPL_DLL * CPL_STDCALL GDALGetDescription( GDALMajorObjectH );
    00273 void CPL_DLL CPL_STDCALL GDALSetDescription( GDALMajorObjectH, const char * );
    00274
    00275 /* ==================================================================== */
    00276 /*      GDALDataset class ... normally this represents one file.        */
    00277 /* ==================================================================== */
    00278
    00279 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDatasetDriver( GDALDatasetH );
    00280 char CPL_DLL ** CPL_STDCALL GDALGetFileList( GDALDatasetH );
    00281 void CPL_DLL CPL_STDCALL   GDALClose( GDALDatasetH );
    00282 int CPL_DLL CPL_STDCALL     GDALGetRasterXSize( GDALDatasetH );
    00283 int CPL_DLL CPL_STDCALL     GDALGetRasterYSize( GDALDatasetH );
    00284 int CPL_DLL CPL_STDCALL     GDALGetRasterCount( GDALDatasetH );
    00285 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetRasterBand( GDALDatasetH, int );
    00286
    00287 CPLErr CPL_DLL  CPL_STDCALL GDALAddBand( GDALDatasetH hDS, GDALDataType eType,
    00288                              char **papszOptions );
    00289
    00290 CPLErr CPL_DLL CPL_STDCALL GDALDatasetRasterIO(
    00291     GDALDatasetH hDS, GDALRWFlag eRWFlag,
    00292     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
    00293     void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType,
    00294     int nBandCount, int *panBandCount,
    00295     int nPixelSpace, int nLineSpace, int nBandSpace);
    00296
    00297 CPLErr CPL_DLL CPL_STDCALL GDALDatasetAdviseRead( GDALDatasetH hDS,
    00298     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
    00299     int nBXSize, int nBYSize, GDALDataType eBDataType,
    00300     int nBandCount, int *panBandCount, char **papszOptions );
    00301
    00302 const char CPL_DLL * CPL_STDCALL GDALGetProjectionRef( GDALDatasetH );
    00303 CPLErr CPL_DLL CPL_STDCALL GDALSetProjection( GDALDatasetH, const char * );
    00304 CPLErr CPL_DLL CPL_STDCALL GDALGetGeoTransform( GDALDatasetH, double * );
    00305 CPLErr CPL_DLL CPL_STDCALL GDALSetGeoTransform( GDALDatasetH, double * );
    00306
    00307 int CPL_DLL CPL_STDCALL  GDALGetGCPCount( GDALDatasetH );
    00308 const char CPL_DLL * CPL_STDCALL GDALGetGCPProjection( GDALDatasetH );
    00309 const GDAL_GCP CPL_DLL * CPL_STDCALL GDALGetGCPs( GDALDatasetH );
    00310 CPLErr CPL_DLL CPL_STDCALL GDALSetGCPs( GDALDatasetH, int, const GDAL_GCP *,
    00311                                         const char * );
    00312
    00313 void CPL_DLL * CPL_STDCALL GDALGetInternalHandle( GDALDatasetH, const char * );
    00314 int CPL_DLL CPL_STDCALL GDALReferenceDataset( GDALDatasetH );
    00315 int CPL_DLL CPL_STDCALL GDALDereferenceDataset( GDALDatasetH );
    00316
    00317 CPLErr CPL_DLL CPL_STDCALL
    00318 GDALBuildOverviews( GDALDatasetH, const char *, int, int *,
    00319                     int, int *, GDALProgressFunc, void * );
    00320 void CPL_DLL CPL_STDCALL GDALGetOpenDatasets( GDALDatasetH **hDS, int *pnCount );
    00321 int CPL_DLL CPL_STDCALL GDALGetAccess( GDALDatasetH hDS );
    00322 void CPL_DLL CPL_STDCALL GDALFlushCache( GDALDatasetH hDS );
    00323
    00324 CPLErr CPL_DLL CPL_STDCALL
    00325               GDALCreateDatasetMaskBand( GDALDatasetH hBand, int nFlags );
    00326
    00327 CPLErr CPL_DLL CPL_STDCALL GDALDatasetCopyWholeRaster(
    00328     GDALDatasetH hSrcDS, GDALDatasetH hDstDS, char **papszOptions,
    00329     GDALProgressFunc pfnProgress, void *pProgressData );
    00330
    00331 /* ==================================================================== */
    00332 /*      GDALRasterBand ... one band/channel in a dataset.               */
    00333 /* ==================================================================== */
    00334
    00339 #define SRCVAL(papoSource, eSrcType, ii) \
    00340       (eSrcType == GDT_Byte ? \
    00341           ((GByte *)papoSource)[ii] : \
    00342       (eSrcType == GDT_Float32 ? \
    00343           ((float *)papoSource)[ii] : \
    00344       (eSrcType == GDT_Float64 ? \
    00345           ((double *)papoSource)[ii] : \
    00346       (eSrcType == GDT_Int32 ? \
    00347           ((GInt32 *)papoSource)[ii] : \
    00348       (eSrcType == GDT_UInt16 ? \
    00349           ((GUInt16 *)papoSource)[ii] : \
    00350       (eSrcType == GDT_Int16 ? \
    00351           ((GInt16 *)papoSource)[ii] : \
    00352       (eSrcType == GDT_UInt32 ? \
    00353           ((GUInt32 *)papoSource)[ii] : \
    00354       (eSrcType == GDT_CInt16 ? \
    00355           ((GInt16 *)papoSource)[ii * 2] : \
    00356       (eSrcType == GDT_CInt32 ? \
    00357           ((GInt32 *)papoSource)[ii * 2] : \
    00358       (eSrcType == GDT_CFloat32 ? \
    00359           ((float *)papoSource)[ii * 2] : \
    00360       (eSrcType == GDT_CFloat64 ? \
    00361           ((double *)papoSource)[ii * 2] : 0)))))))))))
    00362
    00363 typedef CPLErr
    00364 (*GDALDerivedPixelFunc)(void **papoSources, int nSources, void *pData,
    00365                         int nBufXSize, int nBufYSize,
    00366                         GDALDataType eSrcType, GDALDataType eBufType,
    00367                         int nPixelSpace, int nLineSpace);
    00368
    00369 GDALDataType CPL_DLL CPL_STDCALL GDALGetRasterDataType( GDALRasterBandH );
    00370 void CPL_DLL CPL_STDCALL
    00371 GDALGetBlockSize( GDALRasterBandH, int * pnXSize, int * pnYSize );
    00372
    00373 CPLErr CPL_DLL CPL_STDCALL GDALRasterAdviseRead( GDALRasterBandH hRB,
    00374     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
    00375     int nBXSize, int nBYSize, GDALDataType eBDataType, char **papszOptions );
    00376
    00377 CPLErr CPL_DLL CPL_STDCALL
    00378 GDALRasterIO( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
    00379               int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
    00380               void * pBuffer, int nBXSize, int nBYSize,GDALDataType eBDataType,
    00381               int nPixelSpace, int nLineSpace );
    00382 CPLErr CPL_DLL CPL_STDCALL GDALReadBlock( GDALRasterBandH, int, int, void * );
    00383 CPLErr CPL_DLL CPL_STDCALL GDALWriteBlock( GDALRasterBandH, int, int, void * );
    00384 int CPL_DLL CPL_STDCALL GDALGetRasterBandXSize( GDALRasterBandH );
    00385 int CPL_DLL CPL_STDCALL GDALGetRasterBandYSize( GDALRasterBandH );
    00386 GDALAccess CPL_DLL CPL_STDCALL GDALGetRasterAccess( GDALRasterBandH );
    00387 int CPL_DLL CPL_STDCALL GDALGetBandNumber( GDALRasterBandH );
    00388 GDALDatasetH CPL_DLL CPL_STDCALL GDALGetBandDataset( GDALRasterBandH );
    00389
    00390 GDALColorInterp CPL_DLL CPL_STDCALL
    00391 GDALGetRasterColorInterpretation( GDALRasterBandH );
    00392 CPLErr CPL_DLL CPL_STDCALL
    00393 GDALSetRasterColorInterpretation( GDALRasterBandH, GDALColorInterp );
    00394 GDALColorTableH CPL_DLL CPL_STDCALL GDALGetRasterColorTable( GDALRasterBandH );
    00395 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterColorTable( GDALRasterBandH, GDALColorTableH );
    00396 int CPL_DLL CPL_STDCALL GDALHasArbitraryOverviews( GDALRasterBandH );
    00397 int CPL_DLL CPL_STDCALL GDALGetOverviewCount( GDALRasterBandH );
    00398 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetOverview( GDALRasterBandH, int );
    00399 double CPL_DLL CPL_STDCALL GDALGetRasterNoDataValue( GDALRasterBandH, int * );
    00400 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterNoDataValue( GDALRasterBandH, double );
    00401 char CPL_DLL ** CPL_STDCALL GDALGetRasterCategoryNames( GDALRasterBandH );
    00402 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterCategoryNames( GDALRasterBandH, char ** );
    00403 double CPL_DLL CPL_STDCALL GDALGetRasterMinimum( GDALRasterBandH, int *pbSuccess );
    00404 double CPL_DLL CPL_STDCALL GDALGetRasterMaximum( GDALRasterBandH, int *pbSuccess );
    00405 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterStatistics(
    00406     GDALRasterBandH, int bApproxOK, int bForce,
    00407     double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev );
    00408 CPLErr CPL_DLL CPL_STDCALL GDALComputeRasterStatistics(
    00409     GDALRasterBandH, int bApproxOK,
    00410     double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev,
    00411     GDALProgressFunc pfnProgress, void *pProgressData );
    00412 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterStatistics(
    00413     GDALRasterBandH hBand,
    00414     double dfMin, double dfMax, double dfMean, double dfStdDev );
    00415
    00416 const char CPL_DLL * CPL_STDCALL GDALGetRasterUnitType( GDALRasterBandH );
    00417 double CPL_DLL CPL_STDCALL GDALGetRasterOffset( GDALRasterBandH, int *pbSuccess );
    00418 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterOffset( GDALRasterBandH hBand, double dfNewOffset);
    00419 double CPL_DLL CPL_STDCALL GDALGetRasterScale( GDALRasterBandH, int *pbSuccess );
    00420 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterScale( GDALRasterBandH hBand, double dfNewOffset );
    00421 void CPL_DLL CPL_STDCALL
    00422 GDALComputeRasterMinMax( GDALRasterBandH hBand, int bApproxOK,
    00423                          double adfMinMax[2] );
    00424 CPLErr CPL_DLL CPL_STDCALL GDALFlushRasterCache( GDALRasterBandH hBand );
    00425 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterHistogram( GDALRasterBandH hBand,
    00426                                        double dfMin, double dfMax,
    00427                                        int nBuckets, int *panHistogram,
    00428                                        int bIncludeOutOfRange, int bApproxOK,
    00429                                        GDALProgressFunc pfnProgress,
    00430                                        void * pProgressData );
    00431 CPLErr CPL_DLL CPL_STDCALL GDALGetDefaultHistogram( GDALRasterBandH hBand,
    00432                                        double *pdfMin, double *pdfMax,
    00433                                        int *pnBuckets, int **ppanHistogram,
    00434                                        int bForce,
    00435                                        GDALProgressFunc pfnProgress,
    00436                                        void * pProgressData );
    00437 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultHistogram( GDALRasterBandH hBand,
    00438                                        double dfMin, double dfMax,
    00439                                        int nBuckets, int *panHistogram );
    00440 int CPL_DLL CPL_STDCALL
    00441 GDALGetRandomRasterSample( GDALRasterBandH, int, float * );
    00442 GDALRasterBandH CPL_DLL CPL_STDCALL
    00443 GDALGetRasterSampleOverview( GDALRasterBandH, int );
    00444 CPLErr CPL_DLL CPL_STDCALL GDALFillRaster( GDALRasterBandH hBand,
    00445                           double dfRealValue, double dfImaginaryValue );
    00446 CPLErr CPL_DLL CPL_STDCALL
    00447 GDALComputeBandStats( GDALRasterBandH hBand, int nSampleStep,
    00448                              double *pdfMean, double *pdfStdDev,
    00449                              GDALProgressFunc pfnProgress,
    00450                              void *pProgressData );
    00451 CPLErr CPL_DLL  GDALOverviewMagnitudeCorrection( GDALRasterBandH hBaseBand,
    00452                                         int nOverviewCount,
    00453                                         GDALRasterBandH *pahOverviews,
    00454                                         GDALProgressFunc pfnProgress,
    00455                                         void *pProgressData );
    00456
    00457 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL GDALGetDefaultRAT(
    00458     GDALRasterBandH hBand );
    00459 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultRAT( GDALRasterBandH,
    00460                                               GDALRasterAttributeTableH );
    00461 CPLErr CPL_DLL CPL_STDCALL GDALAddDerivedBandPixelFunc( const char *pszName,
    00462                                     GDALDerivedPixelFunc pfnPixelFunc );
    00463
    00464 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetMaskBand( GDALRasterBandH hBand );
    00465 int CPL_DLL CPL_STDCALL GDALGetMaskFlags( GDALRasterBandH hBand );
    00466 CPLErr CPL_DLL CPL_STDCALL
    00467                        GDALCreateMaskBand( GDALRasterBandH hBand, int nFlags );
    00468
    00469 #define GMF_ALL_VALID     0x01
    00470 #define GMF_PER_DATASET   0x02
    00471 #define GMF_ALPHA         0x04
    00472 #define GMF_NODATA        0x08
    00473
    00474 /* -------------------------------------------------------------------- */
    00475 /*      Helper functions.                                               */
    00476 /* -------------------------------------------------------------------- */
    00477 int CPL_DLL CPL_STDCALL GDALGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv,
    00478                                          int nOptions );
    00479 void CPL_DLL CPL_STDCALL GDALSwapWords( void *pData, int nWordSize, int nWordCount,
    00480                             int nWordSkip );
    00481 void CPL_DLL CPL_STDCALL
    00482     GDALCopyWords( void * pSrcData, GDALDataType eSrcType, int nSrcPixelOffset,
    00483                    void * pDstData, GDALDataType eDstType, int nDstPixelOffset,
    00484                    int nWordCount );
    00485
    00486 void CPL_DLL
    00487 GDALCopyBits( const GByte *pabySrcData, int nSrcOffset, int nSrcStep,
    00488               GByte *pabyDstData, int nDstOffset, int nDstStep,
    00489               int nBitCount, int nStepCount );
    00490
    00491 int CPL_DLL CPL_STDCALL GDALReadWorldFile( const char *pszBaseFilename,
    00492                        const char *pszExtension,
    00493                        double * padfGeoTransform );
    00494 int CPL_DLL CPL_STDCALL GDALWriteWorldFile( const char *pszBaseFilename,
    00495                        const char *pszExtension,
    00496                        double * padfGeoTransform );
    00497 int CPL_DLL CPL_STDCALL GDALReadTabFile( const char *pszBaseFilename,
    00498                              double *padfGeoTransform, char **ppszWKT,
    00499                              int *pnGCPCount, GDAL_GCP **ppasGCPs );
    00500
    00501 const char CPL_DLL * CPL_STDCALL GDALDecToDMS( double, const char *, int );
    00502 double CPL_DLL CPL_STDCALL GDALPackedDMSToDec( double );
    00503 double CPL_DLL CPL_STDCALL GDALDecToPackedDMS( double );
    00504
    00505 const char CPL_DLL * CPL_STDCALL GDALVersionInfo( const char * );
    00506
    00507 #ifndef GDAL_CHECK_VERSION
    00508
    00520 int CPL_DLL CPL_STDCALL GDALCheckVersion( int nVersionMajor, int nVersionMinor,
    00521                                           const char* pszCallingComponentName);
    00522
    00524 #define GDAL_CHECK_VERSION(pszCallingComponentName) \
    00525  GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName)
    00526
    00527 #endif
    00528
    00529 typedef struct {
    00530     double      dfLINE_OFF;
    00531     double      dfSAMP_OFF;
    00532     double      dfLAT_OFF;
    00533     double      dfLONG_OFF;
    00534     double      dfHEIGHT_OFF;
    00535
    00536     double      dfLINE_SCALE;
    00537     double      dfSAMP_SCALE;
    00538     double      dfLAT_SCALE;
    00539     double      dfLONG_SCALE;
    00540     double      dfHEIGHT_SCALE;
    00541
    00542     double      adfLINE_NUM_COEFF[20];
    00543     double      adfLINE_DEN_COEFF[20];
    00544     double      adfSAMP_NUM_COEFF[20];
    00545     double      adfSAMP_DEN_COEFF[20];
    00546
    00547     double      dfMIN_LONG;
    00548     double      dfMIN_LAT;
    00549     double      dfMAX_LONG;
    00550     double      dfMAX_LAT;
    00551
    00552 } GDALRPCInfo;
    00553
    00554 int CPL_DLL CPL_STDCALL GDALExtractRPCInfo( char **, GDALRPCInfo * );
    00555
    00556 /* ==================================================================== */
    00557 /*      Color tables.                                                   */
    00558 /* ==================================================================== */
    00560 typedef struct
    00561 {
    00563     short      c1;
    00564
    00566     short      c2;
    00567
    00569     short      c3;
    00570
    00572     short      c4;
    00573 } GDALColorEntry;
    00574
    00575 GDALColorTableH CPL_DLL CPL_STDCALL GDALCreateColorTable( GDALPaletteInterp );
    00576 void CPL_DLL CPL_STDCALL GDALDestroyColorTable( GDALColorTableH );
    00577 GDALColorTableH CPL_DLL CPL_STDCALL GDALCloneColorTable( GDALColorTableH );
    00578 GDALPaletteInterp CPL_DLL CPL_STDCALL GDALGetPaletteInterpretation( GDALColorTableH );
    00579 int CPL_DLL CPL_STDCALL GDALGetColorEntryCount( GDALColorTableH );
    00580 const GDALColorEntry CPL_DLL * CPL_STDCALL GDALGetColorEntry( GDALColorTableH, int );
    00581 int CPL_DLL CPL_STDCALL GDALGetColorEntryAsRGB( GDALColorTableH, int, GDALColorEntry *);
    00582 void CPL_DLL CPL_STDCALL GDALSetColorEntry( GDALColorTableH, int, const GDALColorEntry * );
    00583 void CPL_DLL CPL_STDCALL GDALCreateColorRamp( GDALColorTableH hTable,
    00584             int nStartIndex, const GDALColorEntry *psStartColor,
    00585             int nEndIndex, const GDALColorEntry *psEndColor );
    00586
    00587 /* ==================================================================== */
    00588 /*      Raster Attribute Table                                          */
    00589 /* ==================================================================== */
    00590
    00591 typedef enum {             GFT_Integer ,    GFT_Real,                    GFT_String
    00595 } GDALRATFieldType;
    00596
    00597 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
    00617 } GDALRATFieldUsage;
    00618
    00619 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL
    00620                                            GDALCreateRasterAttributeTable(void);
    00621 void CPL_DLL CPL_STDCALL GDALDestroyRasterAttributeTable(
    00622     GDALRasterAttributeTableH );
    00623
    00624 int CPL_DLL CPL_STDCALL GDALRATGetColumnCount( GDALRasterAttributeTableH );
    00625
    00626 const char CPL_DLL * CPL_STDCALL GDALRATGetNameOfCol(
    00627     GDALRasterAttributeTableH, int );
    00628 GDALRATFieldUsage CPL_DLL CPL_STDCALL GDALRATGetUsageOfCol(
    00629     GDALRasterAttributeTableH, int );
    00630 GDALRATFieldType CPL_DLL CPL_STDCALL GDALRATGetTypeOfCol(
    00631     GDALRasterAttributeTableH, int );
    00632
    00633 int CPL_DLL CPL_STDCALL GDALRATGetColOfUsage( GDALRasterAttributeTableH,
    00634                                               GDALRATFieldUsage );
    00635 int CPL_DLL CPL_STDCALL GDALRATGetRowCount( GDALRasterAttributeTableH );
    00636
    00637 const char CPL_DLL * CPL_STDCALL GDALRATGetValueAsString(
    00638     GDALRasterAttributeTableH, int ,int);
    00639 int CPL_DLL CPL_STDCALL GDALRATGetValueAsInt(
    00640     GDALRasterAttributeTableH, int ,int);
    00641 double CPL_DLL CPL_STDCALL GDALRATGetValueAsDouble(
    00642     GDALRasterAttributeTableH, int ,int);
    00643
    00644 void CPL_DLL CPL_STDCALL GDALRATSetValueAsString( GDALRasterAttributeTableH, int, int,
    00645                                                   const char * );
    00646 void CPL_DLL CPL_STDCALL GDALRATSetValueAsInt( GDALRasterAttributeTableH, int, int,
    00647                                                int );
    00648 void CPL_DLL CPL_STDCALL GDALRATSetValueAsDouble( GDALRasterAttributeTableH, int, int,
    00649                                                   double );
    00650 void CPL_DLL CPL_STDCALL GDALRATSetRowCount( GDALRasterAttributeTableH,
    00651                                              int );
    00652 CPLErr CPL_DLL CPL_STDCALL GDALRATCreateColumn( GDALRasterAttributeTableH,
    00653                                                 const char *,
    00654                                                 GDALRATFieldType,
    00655                                                 GDALRATFieldUsage );
    00656 CPLErr CPL_DLL CPL_STDCALL GDALRATSetLinearBinning( GDALRasterAttributeTableH,
    00657                                                     double, double );
    00658 int CPL_DLL CPL_STDCALL GDALRATGetLinearBinning( GDALRasterAttributeTableH,
    00659                                                  double *, double * );
    00660 CPLErr CPL_DLL CPL_STDCALL GDALRATInitializeFromColorTable(
    00661     GDALRasterAttributeTableH, GDALColorTableH );
    00662 GDALColorTableH CPL_DLL CPL_STDCALL GDALRATTranslateToColorTable(
    00663     int nEntryCount );
    00664 void CPL_DLL CPL_STDCALL GDALRATDumpReadable( GDALRasterAttributeTableH,
    00665                                               FILE * );
    00666 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL
    00667     GDALRATClone( GDALRasterAttributeTableH );
    00668
    00669 int CPL_DLL CPL_STDCALL GDALRATGetRowOfValue( GDALRasterAttributeTableH , double );
    00670
    00671
    00672 /* ==================================================================== */
    00673 /*      GDAL Cache Management                                           */
    00674 /* ==================================================================== */
    00675
    00676 void CPL_DLL CPL_STDCALL GDALSetCacheMax( int nBytes );
    00677 int CPL_DLL CPL_STDCALL GDALGetCacheMax(void);
    00678 int CPL_DLL CPL_STDCALL GDALGetCacheUsed(void);
    00679 int CPL_DLL CPL_STDCALL GDALFlushCacheBlock(void);
    00680
    00681 CPL_C_END
    00682
    00683 #endif /* ndef GDAL_H_INCLUDED */

Generated for GDAL by 1.5.1.