gdal_priv.h

00001 /******************************************************************************
00002  * $Id: gdal_priv.h,v 1.51 2005/02/17 22:16:12 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.51  2005/02/17 22:16:12  fwarmerdam
00033  * changed to use two level block cache
00034  *
00035  * Revision 1.50  2005/01/15 16:09:37  fwarmerdam
00036  * added SetOffset, SetScale methods
00037  *
00038  * Revision 1.49  2005/01/04 21:14:01  fwarmerdam
00039  * added GDAL_FORCE_CACHING config variable
00040  *
00041  * Revision 1.48  2004/12/02 20:32:03  fwarmerdam
00042  * added AdviseRead methods
00043  *
00044  * Revision 1.47  2004/04/06 19:22:25  dron
00045  * Removed GDALRasterBlock::IsCached(), added GDALRasterBand::IsBlockCached().
00046  *
00047  * Revision 1.46  2003/07/27 11:01:01  dron
00048  * GDALRasterBlock::IsCached() method added.
00049  *
00050  * Revision 1.45  2003/05/08 14:38:40  warmerda
00051  * added BlockBasedFlushCache
00052  *
00053  * Revision 1.44  2003/05/06 05:20:38  sperkins
00054  * cleaned up comments
00055  *
00056  * Revision 1.43  2003/05/06 05:13:36  sperkins
00057  * added Fill() and GDALFillRaster()
00058  *
00059  * Revision 1.42  2003/04/25 19:47:57  warmerda
00060  * added RasterIO on GDALDataset, added lock count on blocks
00061  *
00062  * Revision 1.41  2003/03/20 22:10:53  warmerda
00063  * added support for reporting cache thrashing
00064  *
00065  * Revision 1.40  2003/03/18 06:00:57  warmerda
00066  * made GDALRasterBand::FlushCache() virtual
00067  *
00068  * Revision 1.39  2003/01/28 16:07:30  warmerda
00069  * improved documentation
00070  *
00071  * Revision 1.38  2002/10/21 18:05:42  warmerda
00072  * added AutoSkipDrivers() method on driver manager
00073  *
00074  * Revision 1.37  2002/09/11 14:17:52  warmerda
00075  * make SetDescription() and GetDescription() virtual
00076  *
00077  * Revision 1.36  2002/09/04 06:52:05  warmerda
00078  * added unload driver support to GDALDriver
00079  *
00080  * Revision 1.35  2002/07/09 20:33:12  warmerda
00081  * expand tabs
00082  *
00083  * Revision 1.34  2002/06/19 18:19:59  warmerda
00084  * GDALOpenInfo: added bIsDirecory flag, removed VSIStatBuf
00085  *
00086  * Revision 1.33  2002/06/12 21:13:27  warmerda
00087  * use metadata based driver info
00088  *
00089  * Revision 1.32  2002/05/29 15:58:26  warmerda
00090  * removed GetDescription(), added SetColorInterpretation()
00091  *
00092  * Revision 1.31  2002/05/28 18:56:22  warmerda
00093  * added shared dataset concept
00094  *
00095  * Revision 1.30  2002/03/01 14:29:09  warmerda
00096  * added GetBand() method on GDALRasterBand
00097  *
00098  * Revision 1.29  2001/12/15 15:42:27  warmerda
00099  * *** empty log message ***
00100  *
00101  * Revision 1.28  2001/11/18 00:52:15  warmerda
00102  * removed GDALProjDef
00103  *
00104  * Revision 1.27  2001/11/16 21:36:01  warmerda
00105  * added the AddBand() method on GDALDataset
00106  *
00107  * Revision 1.26  2001/10/17 21:47:02  warmerda
00108  * added SetGCPs() on GDALDataset
00109  *
00110  * Revision 1.25  2001/10/02 13:15:16  warmerda
00111  * added CPL_DLL for GDALDefaultOverviews
00112  *
00113  * Revision 1.24  2001/06/20 16:08:54  warmerda
00114  * GDALDefaultOverviews now remembers ovr filename, and allows explicit setting
00115  *
00116  * Revision 1.23  2001/02/06 16:30:21  warmerda
00117  * Added gdal_frmts.h
00118  *
00119  * Revision 1.22  2000/10/06 15:26:08  warmerda
00120  * added SetNoDataValue, SetCategoryNames
00121  *
00122  * Revision 1.21  2000/07/20 13:38:26  warmerda
00123  * make GetGDALDriverManager public with CPL_DLL
00124  *
00125  * Revision 1.20  2000/04/30 23:22:16  warmerda
00126  * added CreateCopy support
00127  *
00128  * Revision 1.19  2000/04/21 21:55:01  warmerda
00129  * majorobject updates, and overview building
00130  *
00131  * Revision 1.18  2000/04/04 23:44:29  warmerda
00132  * added AutoLoadDrivers() to GDALDriverManager
00133  *
00134  * Revision 1.17  2000/03/31 13:41:24  warmerda
00135  * added gcps
00136  *
00137  * Revision 1.16  2000/03/24 00:09:05  warmerda
00138  * rewrote cache management
00139  *
00140  * Revision 1.15  2000/03/09 23:22:03  warmerda
00141  * added GetHistogram
00142  *
00143  * Revision 1.14  2000/03/06 02:20:35  warmerda
00144  * added colortables, overviews, etc
00145  *
00146  * Revision 1.12  2000/01/31 15:00:25  warmerda
00147  * added some documentation
00148  *
00149  * Revision 1.11  2000/01/31 14:24:36  warmerda
00150  * implemented dataset delete
00151  *
00152  * Revision 1.10  1999/11/11 21:59:07  warmerda
00153  * added GetDriver() for datasets
00154  *
00155  * Revision 1.9  1999/10/21 13:23:45  warmerda
00156  * Added a bit of driver related documentation.
00157  *
00158  * Revision 1.8  1999/10/21 12:04:11  warmerda
00159  * Reorganized header.
00160  *
00161  * Revision 1.7  1999/10/01 14:44:02  warmerda
00162  * added documentation
00163  *
00164  * Revision 1.6  1999/04/21 04:16:25  warmerda
00165  * experimental docs
00166  *
00167  * Revision 1.5  1999/01/11 15:36:18  warmerda
00168  * Added projections support, and a few other things.
00169  *
00170  * Revision 1.4  1998/12/31 18:54:25  warmerda
00171  * Implement initial GDALRasterBlock support, and block cache
00172  *
00173  * Revision 1.3  1998/12/06 22:17:09  warmerda
00174  * Fill out rasterio support.
00175  *
00176  * Revision 1.2  1998/12/03 18:34:06  warmerda
00177  * Update to use CPL
00178  *
00179  * Revision 1.1  1998/10/18 06:15:11  warmerda
00180  * Initial implementation.
00181  *
00182  */
00183 
00184 #ifndef GDAL_PRIV_H_INCLUDED
00185 #define GDAL_PRIV_H_INCLUDED
00186 
00187 /* -------------------------------------------------------------------- */
00188 /*      Predeclare various classes before pulling in gdal.h, the        */
00189 /*      public declarations.                                            */
00190 /* -------------------------------------------------------------------- */
00191 class GDALMajorObject;
00192 class GDALDataset;
00193 class GDALRasterBand;
00194 class GDALDriver;
00195 
00196 /* -------------------------------------------------------------------- */
00197 /*      Pull in the public declarations.  This gets the C apis, and     */
00198 /*      also various constants.  However, we will still get to          */
00199 /*      provide the real class definitions for the GDAL classes.        */
00200 /* -------------------------------------------------------------------- */
00201 
00202 #include "gdal.h"
00203 #include "gdal_frmts.h"
00204 #include "cpl_vsi.h"
00205 #include "cpl_conv.h"
00206 
00207 /* ******************************************************************** */
00208 /*                           GDALMajorObject                            */
00209 /*                                                                      */
00210 /*      Base class providing metadata, description and other            */
00211 /*      services shared by major objects.                               */
00212 /* ******************************************************************** */
00213 
00214 class CPL_DLL GDALMajorObject
00215 {
00216   protected:
00217     char             *pszDescription;
00218     char            **papszMetadata;
00219     
00220   public:
00221                         GDALMajorObject();
00222     virtual            ~GDALMajorObject();
00223                         
00224     virtual const char *GetDescription() const;
00225     virtual void        SetDescription( const char * );
00226 
00227     virtual char      **GetMetadata( const char * pszDomain = "" );
00228     virtual CPLErr      SetMetadata( char ** papszMetadata,
00229                                      const char * pszDomain = "" );
00230     virtual const char *GetMetadataItem( const char * pszName,
00231                                          const char * pszDomain = "" );
00232     virtual CPLErr      SetMetadataItem( const char * pszName,
00233                                          const char * pszValue,
00234                                          const char * pszDomain = "" );
00235 };
00236 
00237 /* ******************************************************************** */
00238 /*                         GDALDefaultOverviews                         */
00239 /* ******************************************************************** */
00240 class CPL_DLL GDALDefaultOverviews
00241 {
00242     GDALDataset *poDS;
00243     GDALDataset *poODS;
00244     
00245     char        *pszOvrFilename;
00246     
00247   public:
00248                GDALDefaultOverviews();
00249                ~GDALDefaultOverviews();
00250 
00251     void       Initialize( GDALDataset *poDS, const char *pszName = NULL, 
00252                            int bNameIsOVR = FALSE );
00253     int        IsInitialized() { return poDS != NULL; }
00254 
00255     int        GetOverviewCount(int);
00256     GDALRasterBand *GetOverview(int,int);
00257 
00258     CPLErr     BuildOverviews( const char * pszBasename,
00259                                const char * pszResampling, 
00260                                int nOverviews, int * panOverviewList,
00261                                int nBands, int * panBandList,
00262                                GDALProgressFunc pfnProgress,
00263                                void *pProgressData );
00264 };
00265 
00266 /* ******************************************************************** */
00267 /*                             GDALDataset                              */
00268 /* ******************************************************************** */
00269 
00270 class CPL_DLL GDALDataset : public GDALMajorObject
00271 {
00272     friend GDALDatasetH GDALOpen( const char *, GDALAccess);
00273     friend GDALDatasetH GDALOpenShared( const char *, GDALAccess);
00274     friend class GDALDriver;
00275 
00276   protected:
00277     GDALDriver  *poDriver;
00278     GDALAccess  eAccess;
00279     
00280     // Stored raster information.
00281     int         nRasterXSize;
00282     int         nRasterYSize;
00283     int         nBands;
00284     GDALRasterBand **papoBands;
00285 
00286     int         bForceCachedIO;
00287 
00288     int         nRefCount;
00289     int         bShared;
00290 
00291                 GDALDataset(void);
00292     void        RasterInitialize( int, int );
00293     void        SetBand( int, GDALRasterBand * );
00294 
00295     GDALDefaultOverviews oOvManager;
00296     
00297     virtual CPLErr IBuildOverviews( const char *, int, int *,
00298                                     int, int *, GDALProgressFunc, void * );
00299     
00300     virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int,
00301                               void *, int, int, GDALDataType,
00302                               int, int *, int, int, int );
00303 
00304     CPLErr BlockBasedRasterIO( GDALRWFlag, int, int, int, int,
00305                                void *, int, int, GDALDataType,
00306                                int, int *, int, int, int );
00307     void   BlockBasedFlushCache();
00308 
00309     friend class GDALRasterBand;
00310     
00311   public:
00312     virtual     ~GDALDataset();
00313 
00314     int         GetRasterXSize( void );
00315     int         GetRasterYSize( void );
00316     int         GetRasterCount( void );
00317     GDALRasterBand *GetRasterBand( int );
00318 
00319     virtual void FlushCache(void);
00320 
00321     virtual const char *GetProjectionRef(void);
00322     virtual CPLErr SetProjection( const char * );
00323 
00324     virtual CPLErr GetGeoTransform( double * );
00325     virtual CPLErr SetGeoTransform( double * );
00326 
00327     virtual CPLErr        AddBand( GDALDataType eType, 
00328                                    char **papszOptions=NULL );
00329 
00330     virtual void *GetInternalHandle( const char * );
00331     virtual GDALDriver *GetDriver(void);
00332 
00333     virtual int    GetGCPCount();
00334     virtual const char *GetGCPProjection();
00335     virtual const GDAL_GCP *GetGCPs();
00336     virtual CPLErr SetGCPs( int nGCPCount, const GDAL_GCP *pasGCPList,
00337                             const char *pszGCPProjection );
00338 
00339     virtual CPLErr AdviseRead( int nXOff, int nYOff, int nXSize, int nYSize,
00340                                int nBufXSize, int nBufYSize, 
00341                                GDALDataType eDT, 
00342                                int nBandCount, int *panBandList,
00343                                char **papszOptions );
00344 
00345     CPLErr      RasterIO( GDALRWFlag, int, int, int, int,
00346                           void *, int, int, GDALDataType,
00347                           int, int *, int, int, int );
00348 
00349     int           Reference();
00350     int           Dereference();
00351     GDALAccess    GetAccess() { return eAccess; }
00352 
00353     int           GetShared();
00354     void          MarkAsShared();
00355 
00356     static GDALDataset **GetOpenDatasets( int *pnDatasetCount );
00357 
00358     CPLErr BuildOverviews( const char *, int, int *,
00359                            int, int *, GDALProgressFunc, void * );
00360 };
00361 
00362 /* ******************************************************************** */
00363 /*                           GDALRasterBlock                            */
00364 /* ******************************************************************** */
00365 
00368 class CPL_DLL GDALRasterBlock
00369 {
00370     GDALDataType        eType;
00371     
00372     int                 nAge;
00373     int                 bDirty;
00374     int                 nLockCount;
00375 
00376     int                 nXOff;
00377     int                 nYOff;
00378        
00379     int                 nXSize;
00380     int                 nYSize;
00381     
00382     void                *pData;
00383 
00384     GDALRasterBand      *poBand;
00385     
00386     GDALRasterBlock     *poNext;
00387     GDALRasterBlock     *poPrevious;
00388 
00389   public:
00390                 GDALRasterBlock( GDALRasterBand *, int, int );
00391     virtual     ~GDALRasterBlock();
00392 
00393     CPLErr      Internalize( void );    /* make copy of data */
00394     void        Touch( void );          /* update age */
00395     void        MarkDirty( void );      /* data has been modified since read */
00396     void        MarkClean( void );
00397     void        AddLock( void ) { nLockCount++; }
00398     void        DropLock( void ) { nLockCount--; }
00399 
00400     CPLErr      Write();
00401 
00402     GDALDataType GetDataType() { return eType; }
00403     int         GetXOff() { return nXOff; }
00404     int         GetYOff() { return nYOff; }
00405     int         GetXSize() { return nXSize; }
00406     int         GetYSize() { return nYSize; }
00407     int         GetAge() { return nAge; }
00408     int         GetDirty() { return bDirty; }
00409     int         GetLockCount() { return nLockCount; }
00410 
00411     void        *GetDataRef( void ) { return pData; }
00412 
00413     GDALRasterBand *GetBand() { return poBand; }
00414 
00415     static int  FlushCacheBlock();
00416     static void Verify();
00417 };
00418 
00419 
00420 /* ******************************************************************** */
00421 /*                             GDALColorTable                           */
00422 /* ******************************************************************** */
00423 
00424 class CPL_DLL GDALColorTable
00425 {
00426     GDALPaletteInterp eInterp;
00427 
00428     int         nEntryCount;
00429     GDALColorEntry *paoEntries;
00430 
00431 public:
00432                 GDALColorTable( GDALPaletteInterp = GPI_RGB );
00433                 ~GDALColorTable();
00434 
00435     GDALColorTable *Clone() const;
00436 
00437     GDALPaletteInterp GetPaletteInterpretation() const;
00438 
00439     int           GetColorEntryCount() const;
00440     const GDALColorEntry *GetColorEntry( int ) const;
00441     int           GetColorEntryAsRGB( int, GDALColorEntry * ) const;
00442     void          SetColorEntry( int, const GDALColorEntry * );
00443 };
00444 
00445 /* ******************************************************************** */
00446 /*                            GDALRasterBand                            */
00447 /* ******************************************************************** */
00448 
00450 
00451 class CPL_DLL GDALRasterBand : public GDALMajorObject
00452 {
00453   protected:
00454     GDALDataset *poDS;
00455     int         nBand; /* 1 based */
00456 
00457     int         nRasterXSize;
00458     int         nRasterYSize;
00459     
00460     GDALDataType eDataType;
00461     GDALAccess  eAccess;
00462 
00463     /* stuff related to blocking, and raster cache */
00464     int         nBlockXSize;
00465     int         nBlockYSize;
00466     int         nBlocksPerRow;
00467     int         nBlocksPerColumn;
00468 
00469     int         bSubBlockingActive;
00470     int         nSubBlocksPerRow;
00471     int         nSubBlocksPerColumn;
00472     GDALRasterBlock **papoBlocks;
00473 
00474     int         nBlockReads;
00475     int         bForceCachedIO;
00476 
00477     friend class GDALDataset;
00478     friend class GDALRasterBlock;
00479 
00480   protected:
00481     virtual CPLErr IReadBlock( int, int, void * ) = 0;
00482     virtual CPLErr IWriteBlock( int, int, void * );
00483     virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int,
00484                               void *, int, int, GDALDataType,
00485                               int, int );
00486     CPLErr         OverviewRasterIO( GDALRWFlag, int, int, int, int,
00487                                      void *, int, int, GDALDataType,
00488                                      int, int );
00489 
00490     void           InitBlockInfo();
00491 
00492     CPLErr         AdoptBlock( int, int, GDALRasterBlock * );
00493     GDALRasterBlock *TryGetBlockRef( int nXBlockOff, int nYBlockYOff );
00494     int            IsBlockCached( int, int );
00495 
00496 
00497   public:
00498                 GDALRasterBand();
00499                 
00500     virtual     ~GDALRasterBand();
00501 
00502     int         GetXSize();
00503     int         GetYSize();
00504     int         GetBand();
00505     GDALDataset*GetDataset();
00506 
00507     GDALDataType GetRasterDataType( void );
00508     void        GetBlockSize( int *, int * );
00509     GDALAccess  GetAccess();
00510     
00511     CPLErr      RasterIO( GDALRWFlag, int, int, int, int,
00512                           void *, int, int, GDALDataType,
00513                           int, int );
00514     CPLErr      ReadBlock( int, int, void * );
00515 
00516     CPLErr      WriteBlock( int, int, void * );
00517 
00518     GDALRasterBlock *GetBlockRef( int nXBlockOff, int nYBlockOff, 
00519                                   int bJustInitialize = FALSE );
00520     CPLErr      FlushBlock( int = -1, int = -1 );
00521 
00522     // New OpengIS CV_SampleDimension stuff.
00523 
00524     virtual CPLErr FlushCache();
00525     virtual char **GetCategoryNames();
00526     virtual double GetNoDataValue( int *pbSuccess = NULL );
00527     virtual double GetMinimum( int *pbSuccess = NULL );
00528     virtual double GetMaximum(int *pbSuccess = NULL );
00529     virtual double GetOffset( int *pbSuccess = NULL );
00530     virtual double GetScale( int *pbSuccess = NULL );
00531     virtual const char *GetUnitType();
00532     virtual GDALColorInterp GetColorInterpretation();
00533     virtual GDALColorTable *GetColorTable();
00534     virtual CPLErr Fill(double dfRealValue, double dfImaginaryValue = 0);
00535 
00536     virtual CPLErr SetCategoryNames( char ** );
00537     virtual CPLErr SetNoDataValue( double );
00538     virtual CPLErr SetColorTable( GDALColorTable * ); 
00539     virtual CPLErr SetColorInterpretation( GDALColorInterp );
00540     virtual CPLErr SetOffset( double );
00541     virtual CPLErr SetScale( double );
00542 
00543     virtual int HasArbitraryOverviews();
00544     virtual int GetOverviewCount();
00545     virtual GDALRasterBand *GetOverview(int);
00546     virtual CPLErr BuildOverviews( const char *, int, int *,
00547                                    GDALProgressFunc, void * );
00548 
00549     virtual CPLErr AdviseRead( int nXOff, int nYOff, int nXSize, int nYSize,
00550                                int nBufXSize, int nBufYSize, 
00551                                GDALDataType eDT, char **papszOptions );
00552 
00553     CPLErr  GetHistogram( double dfMin, double dfMax,
00554                           int nBuckets, int * panHistogram,
00555                           int bIncludeOutOfRange, int bApproxOK,
00556                           GDALProgressFunc, void *pProgressData );
00557 };
00558 
00559 /* ******************************************************************** */
00560 /*                             GDALOpenInfo                             */
00561 /*                                                                      */
00562 /*      Structure of data about dataset for open functions.             */
00563 /* ******************************************************************** */
00564 
00565 class CPL_DLL GDALOpenInfo
00566 {
00567   public:
00568 
00569                 GDALOpenInfo( const char * pszFile, GDALAccess eAccessIn );
00570                 ~GDALOpenInfo( void );
00571     
00572     char        *pszFilename;
00573 
00574     GDALAccess  eAccess;
00575 
00576     int         bStatOK;
00577     int         bIsDirectory;
00578 
00579     FILE        *fp;
00580 
00581     int         nHeaderBytes;
00582     GByte       *pabyHeader;
00583 
00584 };
00585 
00586 /* ******************************************************************** */
00587 /*                              GDALDriver                              */
00588 /* ******************************************************************** */
00589 
00599 class CPL_DLL GDALDriver : public GDALMajorObject
00600 {
00601   public:
00602                         GDALDriver();
00603                         ~GDALDriver();
00604 
00605 /* -------------------------------------------------------------------- */
00606 /*      Public C++ methods.                                             */
00607 /* -------------------------------------------------------------------- */
00608     GDALDataset         *Create( const char * pszName,
00609                                  int nXSize, int nYSize, int nBands,
00610                                  GDALDataType eType, char ** papszOptions );
00611 
00612     CPLErr              Delete( const char * pszName );
00613 
00614     GDALDataset         *CreateCopy( const char *, GDALDataset *, 
00615                                      int, char **,
00616                                      GDALProgressFunc pfnProgress, 
00617                                      void * pProgressData );
00618     
00619 /* -------------------------------------------------------------------- */
00620 /*      The following are semiprivate, not intended to be accessed      */
00621 /*      by anyone but the formats instantiating and populating the      */
00622 /*      drivers.                                                        */
00623 /* -------------------------------------------------------------------- */
00624     GDALDataset         *(*pfnOpen)( GDALOpenInfo * );
00625 
00626     GDALDataset         *(*pfnCreate)( const char * pszName,
00627                                        int nXSize, int nYSize, int nBands,
00628                                        GDALDataType eType,
00629                                        char ** papszOptions );
00630 
00631     CPLErr              (*pfnDelete)( const char * pszName );
00632 
00633     GDALDataset         *(*pfnCreateCopy)( const char *, GDALDataset *, 
00634                                            int, char **,
00635                                            GDALProgressFunc pfnProgress, 
00636                                            void * pProgressData );
00637 
00638     void                *pDriverData;
00639 
00640     void                (*pfnUnloadDriver)(GDALDriver *);
00641 };
00642 
00643 /* ******************************************************************** */
00644 /*                          GDALDriverManager                           */
00645 /* ******************************************************************** */
00646 
00654 class CPL_DLL GDALDriverManager : public GDALMajorObject
00655 {
00656     int         nDrivers;
00657     GDALDriver  **papoDrivers;
00658 
00659     char        *pszHome;
00660     
00661  public:
00662                 GDALDriverManager();
00663                 ~GDALDriverManager();
00664                 
00665     int         GetDriverCount( void );
00666     GDALDriver  *GetDriver( int );
00667     GDALDriver  *GetDriverByName( const char * );
00668 
00669     int         RegisterDriver( GDALDriver * );
00670     void        MoveDriver( GDALDriver *, int );
00671     void        DeregisterDriver( GDALDriver * );
00672 
00673     void        AutoLoadDrivers();
00674     void        AutoSkipDrivers();
00675 
00676     const char *GetHome();
00677     void        SetHome( const char * );
00678 };
00679 
00680 CPL_C_START
00681 GDALDriverManager CPL_DLL * GetGDALDriverManager( void );
00682 CPL_C_END
00683 
00684 /* ==================================================================== */
00685 /*      An assortment of overview related stuff.                        */
00686 /* ==================================================================== */
00687 
00688 CPL_C_START
00689 
00690 CPLErr 
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
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
00706 GDALRegenerateOverviews( GDALRasterBand *, int, GDALRasterBand **,
00707                          const char *, GDALProgressFunc, void * );
00708 
00709 CPL_C_END
00710 
00711 #endif /* ndef GDAL_PRIV_H_INCLUDED */

Generated on Mon Jan 9 18:03:35 2006 for GDAL by  doxygen 1.4.6