- Main Page
- Classes
- Files
- Directories
- Related Pages

- File List
- File Members

# gdal_priv.h

    00001 /******************************************************************************
    00002  * $Id: gdal_priv.h,v 1.72 2006/04/13 03:16:01 fwarmerdam Exp $
    00003  *
    00004  * Name:     gdal_priv.h
    00005  * Project:  GDAL Core
    00006  * Purpose:  GDAL Core C++/Private declarations.
    00007  * Author:   Frank Warmerdam, warmerdam@pobox.com
    00008  *
    00009  ******************************************************************************
    00010  * Copyright (c) 1998, Frank Warmerdam
    00011  *
    00012  * Permission is hereby granted, free of charge, to any person obtaining a
    00013  * copy of this software and associated documentation files (the "Software"),
    00014  * to deal in the Software without restriction, including without limitation
    00015  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
    00016  * and/or sell copies of the Software, and to permit persons to whom the
    00017  * Software is furnished to do so, subject to the following conditions:
    00018  *
    00019  * The above copyright notice and this permission notice shall be included
    00020  * in all copies or substantial portions of the Software.
    00021  *
    00022  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
    00023  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    00024  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    00025  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    00026  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    00027  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    00028  * DEALINGS IN THE SOFTWARE.
    00029  ******************************************************************************
    00030  *
    00031  * $Log: gdal_priv.h,v $
    00032  * Revision 1.72  2006/04/13 03:16:01  fwarmerdam
    00033  * keep track if an object is PAM enabled, bug 1135
    00034  *
    00035  * Revision 1.71  2006/02/07 19:07:07  fwarmerdam
    00036  * applied some strategic improved outofmemory checking
    00037  *
    00038  * Revision 1.70  2005/11/17 22:02:32  fwarmerdam
    00039  * avoid overwriting existing .aux file, overview filename now CPLString
    00040  *
    00041  * Revision 1.69  2005/10/13 01:19:57  fwarmerdam
    00042  * moved GDALMultiDomainMetadata into GDALMajorObject
    00043  *
    00044  * Revision 1.68  2005/09/26 15:52:03  fwarmerdam
    00045  * centralized .aux opening logic
    00046  *
    00047  * Revision 1.67  2005/09/23 20:52:21  fwarmerdam
    00048  * added the GMO flags on GDALMajorObject
    00049  *
    00050  * Revision 1.66  2005/09/23 16:55:39  fwarmerdam
    00051  * use CPLString instead of std::string
    00052  *
    00053  * Revision 1.65  2005/09/17 04:04:16  fwarmerdam
    00054  * provide default implementation for RAT functions
    00055  *
    00056  * Revision 1.64  2005/09/17 03:46:37  fwarmerdam
    00057  * added HFAAuxBuildOverviews
    00058  *
    00059  * Revision 1.63  2005/09/16 20:31:15  fwarmerdam
    00060  * added bOvrIsAux, and RAT methods
    00061  *
    00062  * Revision 1.62  2005/07/25 21:24:28  ssoule
    00063  * Changed GDALColorTable's "GDALColorEntry *paoEntries" to
    00064  * "std::vector<GDALColorEntry> aoEntries".
    00065  *
    00066  * Revision 1.61  2005/07/25 19:52:43  ssoule
    00067  * Changed GDALMajorObject's char *pszDescription to std::string sDescription.
    00068  *
    00069  * Revision 1.60  2005/07/11 21:08:17  fwarmerdam
    00070  * Removed GetAge() method.
    00071  *
    00072  * Revision 1.59  2005/07/11 19:07:02  fwarmerdam
    00073  * removed GDALRasterBlock nAge.
    00074  *
    00075  * Revision 1.58  2005/05/23 06:44:48  fwarmerdam
    00076  * blockrefs now fetched locked
    00077  *
    00078  * Revision 1.57  2005/05/13 18:19:15  fwarmerdam
    00079  * Added SetDefaultHistogram
    00080  *
    00081  * Revision 1.56  2005/05/10 15:30:28  fwarmerdam
    00082  * export some overview functions
    00083  *
    00084  * Revision 1.55  2005/05/10 04:49:24  fwarmerdam
    00085  * added getdefaulthistogram and GDALOvLevelAdjust
    00086  *
    00087  * Revision 1.54  2005/04/27 16:29:33  fwarmerdam
    00088  * GetHistogram() made virtual.  Added methods for getting and setting
    00089  * statistics.  Added SetUnitType method.
    00090  *
    00091  * Revision 1.53  2005/04/07 17:31:00  fwarmerdam
    00092  * added some brief descriptions of classes
    00093  *
    00094  * Revision 1.52  2005/04/04 15:24:48  fwarmerdam
    00095  * Most C entry points now CPL_STDCALL
    00096  *
    00097  * Revision 1.51  2005/02/17 22:16:12  fwarmerdam
    00098  * changed to use two level block cache
    00099  *
    00100  * Revision 1.50  2005/01/15 16:09:37  fwarmerdam
    00101  * added SetOffset, SetScale methods
    00102  *
    00103  * Revision 1.49  2005/01/04 21:14:01  fwarmerdam
    00104  * added GDAL_FORCE_CACHING config variable
    00105  */
    00106
    00107 #ifndef GDAL_PRIV_H_INCLUDED
    00108 #define GDAL_PRIV_H_INCLUDED
    00109
    00110 /* -------------------------------------------------------------------- */
    00111 /*      Predeclare various classes before pulling in gdal.h, the        */
    00112 /*      public declarations.                                            */
    00113 /* -------------------------------------------------------------------- */
    00114 class GDALMajorObject;
    00115 class GDALDataset;
    00116 class GDALRasterBand;
    00117 class GDALDriver;
    00118 class GDALRasterAttributeTable;
    00119
    00120 /* -------------------------------------------------------------------- */
    00121 /*      Pull in the public declarations.  This gets the C apis, and     */
    00122 /*      also various constants.  However, we will still get to          */
    00123 /*      provide the real class definitions for the GDAL classes.        */
    00124 /* -------------------------------------------------------------------- */
    00125
    00126 #include "gdal.h"
    00127 #include "gdal_frmts.h"
    00128 #include "cpl_vsi.h"
    00129 #include "cpl_conv.h"
    00130 #include "cpl_string.h"
    00131 #include "cpl_minixml.h"
    00132 #include <vector>
    00133
    00134 #define GMO_VALID                0x0001
    00135 #define GMO_IGNORE_UNIMPLEMENTED 0x0002
    00136 #define GMO_SUPPORT_MD           0x0004
    00137 #define GMO_SUPPORT_MDMD         0x0008
    00138 #define GMO_MD_DIRTY             0x0010
    00139 #define GMO_PAM_CLASS            0x0020
    00140
    00141 /************************************************************************/
    00142 /*                       GDALMultiDomainMetadata                        */
    00143 /************************************************************************/
    00144
    00145 class CPL_DLL GDALMultiDomainMetadata
    00146 {
    00147 private:
    00148     char **papszDomainList;
    00149     char ***papapszMetadataLists;
    00150
    00151 public:
    00152     GDALMultiDomainMetadata();
    00153     ~GDALMultiDomainMetadata();
    00154
    00155     int         XMLInit( CPLXMLNode *psMetadata, int bMerge );
    00156     CPLXMLNode  *Serialize();
    00157
    00158     char      **GetDomainList() { return papszDomainList; }
    00159
    00160     char      **GetMetadata( const char * pszDomain = "" );
    00161     CPLErr      SetMetadata( char ** papszMetadata,
    00162                              const char * pszDomain = "" );
    00163     const char *GetMetadataItem( const char * pszName,
    00164                                  const char * pszDomain = "" );
    00165     CPLErr      SetMetadataItem( const char * pszName,
    00166                                  const char * pszValue,
    00167                                  const char * pszDomain = "" );
    00168
    00169     void        Clear();
    00170 };
    00171
    00172 /* ******************************************************************** */
    00173 /*                           GDALMajorObject                            */
    00174 /*                                                                      */
    00175 /*      Base class providing metadata, description and other            */
    00176 /*      services shared by major objects.                               */
    00177 /* ******************************************************************** */
    00178
    00180
    00181 class CPL_DLL GDALMajorObject
    00182 {
    00183   protected:
    00184     int                 nFlags; // GMO_* flags.
    00185     CPLString           sDescription;
    00186     GDALMultiDomainMetadata oMDMD;
    00187
    00188   public:
    00189                         GDALMajorObject();
    00190     virtual            ~GDALMajorObject();
    00191
    00192     int                 GetMOFlags();
    00193     void                SetMOFlags(int nFlags);
    00194
    00195     virtual const char *GetDescription() const;
    00196     virtual void        SetDescription( const char * );
    00197
    00198     virtual char      **GetMetadata( const char * pszDomain = "" );
    00199     virtual CPLErr      SetMetadata( char ** papszMetadata,
    00200                                      const char * pszDomain = "" );
    00201     virtual const char *GetMetadataItem( const char * pszName,
    00202                                          const char * pszDomain = "" );
    00203     virtual CPLErr      SetMetadataItem( const char * pszName,
    00204                                          const char * pszValue,
    00205                                          const char * pszDomain = "" );
    00206 };
    00207
    00208 /* ******************************************************************** */
    00209 /*                         GDALDefaultOverviews                         */
    00210 /* ******************************************************************** */
    00211 class CPL_DLL GDALDefaultOverviews
    00212 {
    00213     GDALDataset *poDS;
    00214     GDALDataset *poODS;
    00215
    00216     CPLString  osOvrFilename;
    00217
    00218     int        bOvrIsAux;
    00219
    00220   public:
    00221                GDALDefaultOverviews();
    00222                ~GDALDefaultOverviews();
    00223
    00224     void       Initialize( GDALDataset *poDS, const char *pszName = NULL,
    00225                            int bNameIsOVR = FALSE );
    00226     int        IsInitialized() { return poDS != NULL; }
    00227
    00228     int        GetOverviewCount(int);
    00229     GDALRasterBand *GetOverview(int,int);
    00230
    00231     CPLErr     BuildOverviews( const char * pszBasename,
    00232                                const char * pszResampling,
    00233                                int nOverviews, int * panOverviewList,
    00234                                int nBands, int * panBandList,
    00235                                GDALProgressFunc pfnProgress,
    00236                                void *pProgressData );
    00237 };
    00238
    00239 /* ******************************************************************** */
    00240 /*                             GDALDataset                              */
    00241 /* ******************************************************************** */
    00242
    00244
    00245 class CPL_DLL GDALDataset : public GDALMajorObject
    00246 {
    00247     friend GDALDatasetH CPL_STDCALL GDALOpen( const char *, GDALAccess);
    00248     friend GDALDatasetH CPL_STDCALL GDALOpenShared( const char *, GDALAccess);
    00249     friend class GDALDriver;
    00250
    00251   protected:
    00252     GDALDriver  *poDriver;
    00253     GDALAccess  eAccess;
    00254
    00255     // Stored raster information.
    00256     int         nRasterXSize;
    00257     int         nRasterYSize;
    00258     int         nBands;
    00259     GDALRasterBand **papoBands;
    00260
    00261     int         bForceCachedIO;
    00262
    00263     int         nRefCount;
    00264     int         bShared;
    00265
    00266                 GDALDataset(void);
    00267     void        RasterInitialize( int, int );
    00268     void        SetBand( int, GDALRasterBand * );
    00269
    00270     GDALDefaultOverviews oOvManager;
    00271
    00272     virtual CPLErr IBuildOverviews( const char *, int, int *,
    00273                                     int, int *, GDALProgressFunc, void * );
    00274
    00275     virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int,
    00276                               void *, int, int, GDALDataType,
    00277                               int, int *, int, int, int );
    00278
    00279     CPLErr BlockBasedRasterIO( GDALRWFlag, int, int, int, int,
    00280                                void *, int, int, GDALDataType,
    00281                                int, int *, int, int, int );
    00282     void   BlockBasedFlushCache();
    00283
    00284     friend class GDALRasterBand;
    00285
    00286   public:
    00287     virtual     ~GDALDataset();
    00288
    00289     int         GetRasterXSize( void );
    00290     int         GetRasterYSize( void );
    00291     int         GetRasterCount( void );
    00292     GDALRasterBand *GetRasterBand( int );
    00293
    00294     virtual void FlushCache(void);
    00295
    00296     virtual const char *GetProjectionRef(void);
    00297     virtual CPLErr SetProjection( const char * );
    00298
    00299     virtual CPLErr GetGeoTransform( double * );
    00300     virtual CPLErr SetGeoTransform( double * );
    00301
    00302     virtual CPLErr        AddBand( GDALDataType eType,
    00303                                    char **papszOptions=NULL );
    00304
    00305     virtual void *GetInternalHandle( const char * );
    00306     virtual GDALDriver *GetDriver(void);
    00307
    00308     virtual int    GetGCPCount();
    00309     virtual const char *GetGCPProjection();
    00310     virtual const GDAL_GCP *GetGCPs();
    00311     virtual CPLErr SetGCPs( int nGCPCount, const GDAL_GCP *pasGCPList,
    00312                             const char *pszGCPProjection );
    00313
    00314     virtual CPLErr AdviseRead( int nXOff, int nYOff, int nXSize, int nYSize,
    00315                                int nBufXSize, int nBufYSize,
    00316                                GDALDataType eDT,
    00317                                int nBandCount, int *panBandList,
    00318                                char **papszOptions );
    00319
    00320     CPLErr      RasterIO( GDALRWFlag, int, int, int, int,
    00321                           void *, int, int, GDALDataType,
    00322                           int, int *, int, int, int );
    00323
    00324     int           Reference();
    00325     int           Dereference();
    00326     GDALAccess    GetAccess() { return eAccess; }
    00327
    00328     int           GetShared();
    00329     void          MarkAsShared();
    00330
    00331     static GDALDataset **GetOpenDatasets( int *pnDatasetCount );
    00332
    00333     CPLErr BuildOverviews( const char *, int, int *,
    00334                            int, int *, GDALProgressFunc, void * );
    00335 };
    00336
    00337 /* ******************************************************************** */
    00338 /*                           GDALRasterBlock                            */
    00339 /* ******************************************************************** */
    00340
    00343 class CPL_DLL GDALRasterBlock
    00344 {
    00345     GDALDataType        eType;
    00346
    00347     int                 bDirty;
    00348     int                 nLockCount;
    00349
    00350     int                 nXOff;
    00351     int                 nYOff;
    00352
    00353     int                 nXSize;
    00354     int                 nYSize;
    00355
    00356     void                *pData;
    00357
    00358     GDALRasterBand      *poBand;
    00359
    00360     GDALRasterBlock     *poNext;
    00361     GDALRasterBlock     *poPrevious;
    00362
    00363   public:
    00364                 GDALRasterBlock( GDALRasterBand *, int, int );
    00365     virtual     ~GDALRasterBlock();
    00366
    00367     CPLErr      Internalize( void );    /* make copy of data */
    00368     void        Touch( void );          /* update age */
    00369     void        MarkDirty( void );      /* data has been modified since read */
    00370     void        MarkClean( void );
    00371     void        AddLock( void ) { nLockCount++; }
    00372     void        DropLock( void ) { nLockCount--; }
    00373     void        Detach();
    00374
    00375     CPLErr      Write();
    00376
    00377     GDALDataType GetDataType() { return eType; }
    00378     int         GetXOff() { return nXOff; }
    00379     int         GetYOff() { return nYOff; }
    00380     int         GetXSize() { return nXSize; }
    00381     int         GetYSize() { return nYSize; }
    00382     int         GetDirty() { return bDirty; }
    00383     int         GetLockCount() { return nLockCount; }
    00384
    00385     void        *GetDataRef( void ) { return pData; }
    00386
    00387     GDALRasterBand *GetBand() { return poBand; }
    00388
    00389     static int  FlushCacheBlock();
    00390     static void Verify();
    00391
    00392     static int  SafeLockBlock( GDALRasterBlock ** );
    00393 };
    00394
    00395 /* ******************************************************************** */
    00396 /*                             GDALColorTable                           */
    00397 /* ******************************************************************** */
    00398
    00399 class CPL_DLL GDALColorTable
    00400 {
    00401     GDALPaletteInterp eInterp;
    00402
    00403     std::vector<GDALColorEntry> aoEntries;
    00404
    00405 public:
    00406                 GDALColorTable( GDALPaletteInterp = GPI_RGB );
    00407                 ~GDALColorTable();
    00408
    00409     GDALColorTable *Clone() const;
    00410
    00411     GDALPaletteInterp GetPaletteInterpretation() const;
    00412
    00413     int           GetColorEntryCount() const;
    00414     const GDALColorEntry *GetColorEntry( int ) const;
    00415     int           GetColorEntryAsRGB( int, GDALColorEntry * ) const;
    00416     void          SetColorEntry( int, const GDALColorEntry * );
    00417 };
    00418
    00419 /* ******************************************************************** */
    00420 /*                            GDALRasterBand                            */
    00421 /* ******************************************************************** */
    00422
    00424
    00425 class CPL_DLL GDALRasterBand : public GDALMajorObject
    00426 {
    00427   protected:
    00428     GDALDataset *poDS;
    00429     int         nBand; /* 1 based */
    00430
    00431     int         nRasterXSize;
    00432     int         nRasterYSize;
    00433
    00434     GDALDataType eDataType;
    00435     GDALAccess  eAccess;
    00436
    00437     /* stuff related to blocking, and raster cache */
    00438     int         nBlockXSize;
    00439     int         nBlockYSize;
    00440     int         nBlocksPerRow;
    00441     int         nBlocksPerColumn;
    00442
    00443     int         bSubBlockingActive;
    00444     int         nSubBlocksPerRow;
    00445     int         nSubBlocksPerColumn;
    00446     GDALRasterBlock **papoBlocks;
    00447
    00448     int         nBlockReads;
    00449     int         bForceCachedIO;
    00450
    00451     friend class GDALDataset;
    00452     friend class GDALRasterBlock;
    00453
    00454   protected:
    00455     virtual CPLErr IReadBlock( int, int, void * ) = 0;
    00456     virtual CPLErr IWriteBlock( int, int, void * );
    00457     virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int,
    00458                               void *, int, int, GDALDataType,
    00459                               int, int );
    00460     CPLErr         OverviewRasterIO( GDALRWFlag, int, int, int, int,
    00461                                      void *, int, int, GDALDataType,
    00462                                      int, int );
    00463
    00464     int            InitBlockInfo();
    00465
    00466     CPLErr         AdoptBlock( int, int, GDALRasterBlock * );
    00467     GDALRasterBlock *TryGetLockedBlockRef( int nXBlockOff, int nYBlockYOff );
    00468
    00469   public:
    00470                 GDALRasterBand();
    00471
    00472     virtual     ~GDALRasterBand();
    00473
    00474     int         GetXSize();
    00475     int         GetYSize();
    00476     int         GetBand();
    00477     GDALDataset*GetDataset();
    00478
    00479     GDALDataType GetRasterDataType( void );
    00480     void        GetBlockSize( int *, int * );
    00481     GDALAccess  GetAccess();
    00482
    00483     CPLErr      RasterIO( GDALRWFlag, int, int, int, int,
    00484                           void *, int, int, GDALDataType,
    00485                           int, int );
    00486     CPLErr      ReadBlock( int, int, void * );
    00487
    00488     CPLErr      WriteBlock( int, int, void * );
    00489
    00490     GDALRasterBlock *GetLockedBlockRef( int nXBlockOff, int nYBlockOff,
    00491                                         int bJustInitialize = FALSE );
    00492     CPLErr      FlushBlock( int = -1, int = -1 );
    00493
    00494     // New OpengIS CV_SampleDimension stuff.
    00495
    00496     virtual CPLErr FlushCache();
    00497     virtual char **GetCategoryNames();
    00498     virtual double GetNoDataValue( int *pbSuccess = NULL );
    00499     virtual double GetMinimum( int *pbSuccess = NULL );
    00500     virtual double GetMaximum(int *pbSuccess = NULL );
    00501     virtual double GetOffset( int *pbSuccess = NULL );
    00502     virtual double GetScale( int *pbSuccess = NULL );
    00503     virtual const char *GetUnitType();
    00504     virtual GDALColorInterp GetColorInterpretation();
    00505     virtual GDALColorTable *GetColorTable();
    00506     virtual CPLErr Fill(double dfRealValue, double dfImaginaryValue = 0);
    00507
    00508     virtual CPLErr SetCategoryNames( char ** );
    00509     virtual CPLErr SetNoDataValue( double );
    00510     virtual CPLErr SetColorTable( GDALColorTable * );
    00511     virtual CPLErr SetColorInterpretation( GDALColorInterp );
    00512     virtual CPLErr SetOffset( double );
    00513     virtual CPLErr SetScale( double );
    00514     virtual CPLErr SetUnitType( const char * );
    00515
    00516     virtual CPLErr GetStatistics( int bApproxOK, int bForce,
    00517                                   double *pdfMin, double *pdfMax,
    00518                                   double *pdfMean, double *padfStdDev );
    00519     virtual CPLErr SetStatistics( double dfMin, double dfMax,
    00520                                   double dfMean, double dfStdDev );
    00521
    00522     virtual int HasArbitraryOverviews();
    00523     virtual int GetOverviewCount();
    00524     virtual GDALRasterBand *GetOverview(int);
    00525     virtual CPLErr BuildOverviews( const char *, int, int *,
    00526                                    GDALProgressFunc, void * );
    00527
    00528     virtual CPLErr AdviseRead( int nXOff, int nYOff, int nXSize, int nYSize,
    00529                                int nBufXSize, int nBufYSize,
    00530                                GDALDataType eDT, char **papszOptions );
    00531
    00532     virtual CPLErr  GetHistogram( double dfMin, double dfMax,
    00533                           int nBuckets, int * panHistogram,
    00534                           int bIncludeOutOfRange, int bApproxOK,
    00535                           GDALProgressFunc, void *pProgressData );
    00536
    00537     virtual CPLErr GetDefaultHistogram( double *pdfMin, double *pdfMax,
    00538                                         int *pnBuckets, int ** ppanHistogram,
    00539                                         int bForce,
    00540                                         GDALProgressFunc, void *pProgressData);
    00541     virtual CPLErr SetDefaultHistogram( double dfMin, double dfMax,
    00542                                         int nBuckets, int *panHistogram );
    00543
    00544     virtual const GDALRasterAttributeTable *GetDefaultRAT();
    00545     virtual CPLErr SetDefaultRAT( const GDALRasterAttributeTable * );
    00546 };
    00547
    00548 /* ******************************************************************** */
    00549 /*                             GDALOpenInfo                             */
    00550 /*                                                                      */
    00551 /*      Structure of data about dataset for open functions.             */
    00552 /* ******************************************************************** */
    00553
    00554 class CPL_DLL GDALOpenInfo
    00555 {
    00556   public:
    00557
    00558                 GDALOpenInfo( const char * pszFile, GDALAccess eAccessIn );
    00559                 ~GDALOpenInfo( void );
    00560
    00561     char        *pszFilename;
    00562
    00563     GDALAccess  eAccess;
    00564
    00565     int         bStatOK;
    00566     int         bIsDirectory;
    00567
    00568     FILE        *fp;
    00569
    00570     int         nHeaderBytes;
    00571     GByte       *pabyHeader;
    00572
    00573 };
    00574
    00575 /* ******************************************************************** */
    00576 /*                              GDALDriver                              */
    00577 /* ******************************************************************** */
    00578
    00579
    00591 class CPL_DLL GDALDriver : public GDALMajorObject
    00592 {
    00593   public:
    00594                         GDALDriver();
    00595                         ~GDALDriver();
    00596
    00597 /* -------------------------------------------------------------------- */
    00598 /*      Public C++ methods.                                             */
    00599 /* -------------------------------------------------------------------- */
    00600     GDALDataset         *Create( const char * pszName,
    00601                                  int nXSize, int nYSize, int nBands,
    00602                                  GDALDataType eType, char ** papszOptions );
    00603
    00604     CPLErr              Delete( const char * pszName );
    00605
    00606     GDALDataset         *CreateCopy( const char *, GDALDataset *,
    00607                                      int, char **,
    00608                                      GDALProgressFunc pfnProgress,
    00609                                      void * pProgressData );
    00610
    00611 /* -------------------------------------------------------------------- */
    00612 /*      The following are semiprivate, not intended to be accessed      */
    00613 /*      by anyone but the formats instantiating and populating the      */
    00614 /*      drivers.                                                        */
    00615 /* -------------------------------------------------------------------- */
    00616     GDALDataset         *(*pfnOpen)( GDALOpenInfo * );
    00617
    00618     GDALDataset         *(*pfnCreate)( const char * pszName,
    00619                                        int nXSize, int nYSize, int nBands,
    00620                                        GDALDataType eType,
    00621                                        char ** papszOptions );
    00622
    00623     CPLErr              (*pfnDelete)( const char * pszName );
    00624
    00625     GDALDataset         *(*pfnCreateCopy)( const char *, GDALDataset *,
    00626                                            int, char **,
    00627                                            GDALProgressFunc pfnProgress,
    00628                                            void * pProgressData );
    00629
    00630     void                *pDriverData;
    00631
    00632     void                (*pfnUnloadDriver)(GDALDriver *);
    00633 };
    00634
    00635 /* ******************************************************************** */
    00636 /*                          GDALDriverManager                           */
    00637 /* ******************************************************************** */
    00638
    00646 class CPL_DLL GDALDriverManager : public GDALMajorObject
    00647 {
    00648     int         nDrivers;
    00649     GDALDriver  **papoDrivers;
    00650
    00651     char        *pszHome;
    00652
    00653  public:
    00654                 GDALDriverManager();
    00655                 ~GDALDriverManager();
    00656
    00657     int         GetDriverCount( void );
    00658     GDALDriver  *GetDriver( int );
    00659     GDALDriver  *GetDriverByName( const char * );
    00660
    00661     int         RegisterDriver( GDALDriver * );
    00662     void        MoveDriver( GDALDriver *, int );
    00663     void        DeregisterDriver( GDALDriver * );
    00664
    00665     void        AutoLoadDrivers();
    00666     void        AutoSkipDrivers();
    00667
    00668     const char *GetHome();
    00669     void        SetHome( const char * );
    00670 };
    00671
    00672 CPL_C_START
    00673 GDALDriverManager CPL_DLL * GetGDALDriverManager( void );
    00674 CPL_C_END
    00675
    00676 /* ==================================================================== */
    00677 /*      An assortment of overview related stuff.                        */
    00678 /* ==================================================================== */
    00679
    00680 CPL_C_START
    00681
    00682 CPLErr CPL_DLL
    00683 HFAAuxBuildOverviews( const char *pszOvrFilename, GDALDataset *poParentDS,
    00684                       GDALDataset **ppoDS,
    00685                       int nBands, int *panBandList,
    00686                       int nNewOverviews, int *panNewOverviewList,
    00687                       const char *pszResampling,
    00688                       GDALProgressFunc pfnProgress,
    00689                       void *pProgressData );
    00690 CPLErr CPL_DLL
    00691 GTIFFBuildOverviews( const char * pszFilename,
    00692                      int nBands, GDALRasterBand **papoBandList,
    00693                      int nOverviews, int * panOverviewList,
    00694                      const char * pszResampling,
    00695                      GDALProgressFunc pfnProgress, void * pProgressData );
    00696
    00697 CPLErr CPL_DLL
    00698 GDALDefaultBuildOverviews( GDALDataset *hSrcDS, const char * pszBasename,
    00699                            const char * pszResampling,
    00700                            int nOverviews, int * panOverviewList,
    00701                            int nBands, int * panBandList,
    00702                            GDALProgressFunc pfnProgress, void * pProgressData);
    00703
    00704
    00705 CPLErr CPL_DLL
    00706 GDALRegenerateOverviews( GDALRasterBand *, int, GDALRasterBand **,
    00707                          const char *, GDALProgressFunc, void * );
    00708
    00709 int CPL_DLL GDALOvLevelAdjust( int nOvLevel, int nXSize );
    00710
    00711 GDALDataset CPL_DLL *
    00712 GDALFindAssociatedAuxFile( const char *pszBasefile, GDALAccess eAccess );
    00713
    00714 CPL_C_END
    00715
    00716 #endif /* ndef GDAL_PRIV_H_INCLUDED */

Generated for GDAL by 1.4.5.