GDAL
gdal_priv.h
1 /******************************************************************************
2  * $Id: gdal_priv.h 31109 2015-10-23 19:53:08Z rouault $
3  *
4  * Name: gdal_priv.h
5  * Project: GDAL Core
6  * Purpose: GDAL Core C++/Private declarations.
7  * Author: Frank Warmerdam, warmerdam@pobox.com
8  *
9  ******************************************************************************
10  * Copyright (c) 1998, Frank Warmerdam
11  * Copyright (c) 2007-2014, Even Rouault <even dot rouault at mines-paris dot org>
12  *
13  * Permission is hereby granted, free of charge, to any person obtaining a
14  * copy of this software and associated documentation files (the "Software"),
15  * to deal in the Software without restriction, including without limitation
16  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17  * and/or sell copies of the Software, and to permit persons to whom the
18  * Software is furnished to do so, subject to the following conditions:
19  *
20  * The above copyright notice and this permission notice shall be included
21  * in all copies or substantial portions of the Software.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29  * DEALINGS IN THE SOFTWARE.
30  ****************************************************************************/
31 
32 #ifndef GDAL_PRIV_H_INCLUDED
33 #define GDAL_PRIV_H_INCLUDED
34 
35 /* -------------------------------------------------------------------- */
36 /* Predeclare various classes before pulling in gdal.h, the */
37 /* public declarations. */
38 /* -------------------------------------------------------------------- */
39 class GDALMajorObject;
40 class GDALDataset;
41 class GDALRasterBand;
42 class GDALDriver;
44 class GDALProxyDataset;
46 class GDALAsyncReader;
47 
48 /* -------------------------------------------------------------------- */
49 /* Pull in the public declarations. This gets the C apis, and */
50 /* also various constants. However, we will still get to */
51 /* provide the real class definitions for the GDAL classes. */
52 /* -------------------------------------------------------------------- */
53 
54 #include "gdal.h"
55 #include "gdal_frmts.h"
56 #include "cpl_vsi.h"
57 #include "cpl_conv.h"
58 #include "cpl_string.h"
59 #include "cpl_minixml.h"
60 #include "cpl_multiproc.h"
61 #include <vector>
62 #include <map>
63 #include "ogr_core.h"
64 
65 #define GMO_VALID 0x0001
66 #define GMO_IGNORE_UNIMPLEMENTED 0x0002
67 #define GMO_SUPPORT_MD 0x0004
68 #define GMO_SUPPORT_MDMD 0x0008
69 #define GMO_MD_DIRTY 0x0010
70 #define GMO_PAM_CLASS 0x0020
71 
72 /************************************************************************/
73 /* GDALMultiDomainMetadata */
74 /************************************************************************/
75 
77 {
78 private:
79  char **papszDomainList;
80  CPLStringList **papoMetadataLists;
81 
82 public:
85 
86  int XMLInit( CPLXMLNode *psMetadata, int bMerge );
87  CPLXMLNode *Serialize();
88 
89  char **GetDomainList() { return papszDomainList; }
90 
91  char **GetMetadata( const char * pszDomain = "" );
92  CPLErr SetMetadata( char ** papszMetadata,
93  const char * pszDomain = "" );
94  const char *GetMetadataItem( const char * pszName,
95  const char * pszDomain = "" );
96  CPLErr SetMetadataItem( const char * pszName,
97  const char * pszValue,
98  const char * pszDomain = "" );
99 
100  void Clear();
101 };
102 
103 /* ******************************************************************** */
104 /* GDALMajorObject */
105 /* */
106 /* Base class providing metadata, description and other */
107 /* services shared by major objects. */
108 /* ******************************************************************** */
109 
111 
112 class CPL_DLL GDALMajorObject
113 {
114  protected:
115  int nFlags; // GMO_* flags.
116  CPLString sDescription;
118 
119  char **BuildMetadataDomainList(char** papszList, int bCheckNonEmpty, ...) CPL_NULL_TERMINATED;
120 
121  public:
122  GDALMajorObject();
123  virtual ~GDALMajorObject();
124 
125  int GetMOFlags();
126  void SetMOFlags(int nFlagsIn);
127 
128  virtual const char *GetDescription() const;
129  virtual void SetDescription( const char * );
130 
131  virtual char **GetMetadataDomainList();
132 
133  virtual char **GetMetadata( const char * pszDomain = "" );
134  virtual CPLErr SetMetadata( char ** papszMetadata,
135  const char * pszDomain = "" );
136  virtual const char *GetMetadataItem( const char * pszName,
137  const char * pszDomain = "" );
138  virtual CPLErr SetMetadataItem( const char * pszName,
139  const char * pszValue,
140  const char * pszDomain = "" );
141 };
142 
143 /* ******************************************************************** */
144 /* GDALDefaultOverviews */
145 /* ******************************************************************** */
146 class CPL_DLL GDALDefaultOverviews
147 {
148  friend class GDALDataset;
149 
150  GDALDataset *poDS;
151  GDALDataset *poODS;
152 
153  CPLString osOvrFilename;
154 
155  int bOvrIsAux;
156 
157  int bCheckedForMask;
158  int bOwnMaskDS;
159  GDALDataset *poMaskDS;
160 
161  // for "overview datasets" we record base level info so we can
162  // find our way back to get overview masks.
163  GDALDataset *poBaseDS;
164 
165  // Stuff for deferred initialize/overviewscans...
166  bool bCheckedForOverviews;
167  void OverviewScan();
168  char *pszInitName;
169  int bInitNameIsOVR;
170  char **papszInitSiblingFiles;
171 
172  public:
175 
176  void Initialize( GDALDataset *poDSIn, const char *pszName = NULL,
177  char **papszSiblingFiles = NULL,
178  int bNameIsOVR = FALSE );
179 
180  int IsInitialized();
181 
183 
184  // Overview Related
185 
186  int GetOverviewCount(int);
187  GDALRasterBand *GetOverview(int,int);
188 
189  CPLErr BuildOverviews( const char * pszBasename,
190  const char * pszResampling,
191  int nOverviews, int * panOverviewList,
192  int nBands, int * panBandList,
193  GDALProgressFunc pfnProgress,
194  void *pProgressData );
195 
196  CPLErr BuildOverviewsSubDataset( const char * pszPhysicalFile,
197  const char * pszResampling,
198  int nOverviews, int * panOverviewList,
199  int nBands, int * panBandList,
200  GDALProgressFunc pfnProgress,
201  void *pProgressData );
202 
203  CPLErr CleanOverviews();
204 
205  // Mask Related
206 
207  CPLErr CreateMaskBand( int nFlags, int nBand = -1 );
208  GDALRasterBand *GetMaskBand( int nBand );
209  int GetMaskFlags( int nBand );
210 
211  int HaveMaskFile( char **papszSiblings = NULL,
212  const char *pszBasename = NULL );
213 
214  char** GetSiblingFiles() { return papszInitSiblingFiles; }
215 };
216 
217 /* ******************************************************************** */
218 /* GDALOpenInfo */
219 /* */
220 /* Structure of data about dataset for open functions. */
221 /* ******************************************************************** */
222 
223 class CPL_DLL GDALOpenInfo
224 {
225  int bHasGotSiblingFiles;
226  char **papszSiblingFiles;
227  int nHeaderBytesTried;
228 
229  public:
230  GDALOpenInfo( const char * pszFile, int nOpenFlagsIn,
231  char **papszSiblingFiles = NULL );
232  ~GDALOpenInfo( void );
233 
234  char *pszFilename;
235  char** papszOpenOptions;
236 
237  GDALAccess eAccess;
238  int nOpenFlags;
239 
240  int bStatOK;
241  int bIsDirectory;
242 
243  VSILFILE *fpL;
244 
245  int nHeaderBytes;
246  GByte *pabyHeader;
247 
248  int TryToIngest(int nBytes);
249  char **GetSiblingFiles();
250 };
251 
252 /* ******************************************************************** */
253 /* GDALDataset */
254 /* ******************************************************************** */
255 
256 class OGRLayer;
257 class OGRGeometry;
258 class OGRSpatialReference;
259 class OGRStyleTable;
260 class swq_select;
262 typedef struct GDALSQLParseInfo GDALSQLParseInfo;
263 
264 #ifdef DETECT_OLD_IRASTERIO
265 typedef void signature_changed;
266 #endif
267 
268 #ifdef GDAL_COMPILATION
269 #define OPTIONAL_OUTSIDE_GDAL(val)
270 #else
271 #define OPTIONAL_OUTSIDE_GDAL(val) = val
272 #endif
273 
275 
276 class CPL_DLL GDALDataset : public GDALMajorObject
277 {
278  friend GDALDatasetH CPL_STDCALL GDALOpenEx( const char* pszFilename,
279  unsigned int nOpenFlags,
280  const char* const* papszAllowedDrivers,
281  const char* const* papszOpenOptions,
282  const char* const* papszSiblingFiles );
283  friend void CPL_STDCALL GDALClose( GDALDatasetH hDS );
284 
285  friend class GDALDriver;
286  friend class GDALDefaultOverviews;
287  friend class GDALProxyDataset;
288  friend class GDALDriverManager;
289 
290  void AddToDatasetOpenList();
291 
292  protected:
293  GDALDriver *poDriver;
294  GDALAccess eAccess;
295 
296  // Stored raster information.
297  int nRasterXSize;
298  int nRasterYSize;
299  int nBands;
300  GDALRasterBand **papoBands;
301 
302  int bForceCachedIO;
303 
304  int nRefCount;
305  int bShared;
306  GByte bIsInternal;
307  GByte bSuppressOnClose;
308  GByte bReserved1;
309  GByte bReserved2;
310 
311  GDALDataset(void);
312 
313  void RasterInitialize( int, int );
314  void SetBand( int, GDALRasterBand * );
315 
316  GDALDefaultOverviews oOvManager;
317 
318  virtual CPLErr IBuildOverviews( const char *, int, int *,
319  int, int *, GDALProgressFunc, void * );
320 
321 #ifdef DETECT_OLD_IRASTERIO
322  virtual signature_changed IRasterIO( GDALRWFlag, int, int, int, int,
323  void *, int, int, GDALDataType,
324  int, int *, int, int, int ) {};
325 #endif
326 
327  virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int,
328  void *, int, int, GDALDataType,
329  int, int *, GSpacing, GSpacing, GSpacing,
330  GDALRasterIOExtraArg* psExtraArg );
331 
332  CPLErr BlockBasedRasterIO( GDALRWFlag, int, int, int, int,
333  void *, int, int, GDALDataType,
334  int, int *, GSpacing, GSpacing, GSpacing,
335  GDALRasterIOExtraArg* psExtraArg );
336  void BlockBasedFlushCache();
337 
338  CPLErr ValidateRasterIOOrAdviseReadParameters(
339  const char* pszCallingFunc,
340  int* pbStopProcessingOnCENone,
341  int nXOff, int nYOff, int nXSize, int nYSize,
342  int nBufXSize, int nBufYSize,
343  int nBandCount, int *panBandMap);
344 
345  virtual int CloseDependentDatasets();
346 
347  int ValidateLayerCreationOptions( const char* const* papszLCO );
348 
349  char **papszOpenOptions;
350 
351  friend class GDALRasterBand;
352 
353  int EnterReadWrite(GDALRWFlag eRWFlag);
354  void LeaveReadWrite();
355 
356  void TemporarilyDropReadWriteLock();
357  void ReacquireReadWriteLock();
358 
359  public:
360  virtual ~GDALDataset();
361 
362  int GetRasterXSize( void );
363  int GetRasterYSize( void );
364  int GetRasterCount( void );
365  GDALRasterBand *GetRasterBand( int );
366 
367  virtual void FlushCache(void);
368 
369  virtual const char *GetProjectionRef(void);
370  virtual CPLErr SetProjection( const char * );
371 
372  virtual CPLErr GetGeoTransform( double * );
373  virtual CPLErr SetGeoTransform( double * );
374 
375  virtual CPLErr AddBand( GDALDataType eType,
376  char **papszOptions=NULL );
377 
378  virtual void *GetInternalHandle( const char * );
379  virtual GDALDriver *GetDriver(void);
380  virtual char **GetFileList(void);
381 
382  virtual const char* GetDriverName();
383 
384  virtual int GetGCPCount();
385  virtual const char *GetGCPProjection();
386  virtual const GDAL_GCP *GetGCPs();
387  virtual CPLErr SetGCPs( int nGCPCount, const GDAL_GCP *pasGCPList,
388  const char *pszGCPProjection );
389 
390  virtual CPLErr AdviseRead( int nXOff, int nYOff, int nXSize, int nYSize,
391  int nBufXSize, int nBufYSize,
392  GDALDataType eDT,
393  int nBandCount, int *panBandList,
394  char **papszOptions );
395 
396  virtual CPLErr CreateMaskBand( int nFlagsIn );
397 
398  virtual GDALAsyncReader*
399  BeginAsyncReader(int nXOff, int nYOff, int nXSize, int nYSize,
400  void *pBuf, int nBufXSize, int nBufYSize,
401  GDALDataType eBufType,
402  int nBandCount, int* panBandMap,
403  int nPixelSpace, int nLineSpace, int nBandSpace,
404  char **papszOptions);
405  virtual void EndAsyncReader(GDALAsyncReader *);
406 
407  CPLErr RasterIO( GDALRWFlag, int, int, int, int,
408  void *, int, int, GDALDataType,
409  int, int *, GSpacing, GSpacing, GSpacing,
410  GDALRasterIOExtraArg* psExtraArg
411 #ifndef DOXYGEN_SKIP
412  OPTIONAL_OUTSIDE_GDAL(NULL)
413 #endif
414  );
415 
416  int Reference();
417  int Dereference();
418  GDALAccess GetAccess() { return eAccess; }
419 
420  int GetShared();
421  void MarkAsShared();
422 
423  void MarkSuppressOnClose() { bSuppressOnClose = TRUE; }
424 
425  char **GetOpenOptions() { return papszOpenOptions; }
426 
427  static GDALDataset **GetOpenDatasets( int *pnDatasetCount );
428 
429  CPLErr BuildOverviews( const char *, int, int *,
430  int, int *, GDALProgressFunc, void * );
431 
432  void ReportError(CPLErr eErrClass, int err_no, const char *fmt, ...) CPL_PRINT_FUNC_FORMAT (4, 5);
433 
434 private:
435  void *m_hPrivateData;
436 
437  OGRLayer* BuildLayerFromSelectInfo(swq_select* psSelectInfo,
438  OGRGeometry *poSpatialFilter,
439  const char *pszDialect,
440  swq_select_parse_options* poSelectParseOptions);
441 
442  public:
443 
444  virtual int GetLayerCount();
445  virtual OGRLayer *GetLayer(int);
446  virtual OGRLayer *GetLayerByName(const char *);
447  virtual OGRErr DeleteLayer(int);
448 
449  virtual int TestCapability( const char * );
450 
451  virtual OGRLayer *CreateLayer( const char *pszName,
452  OGRSpatialReference *poSpatialRef = NULL,
454  char ** papszOptions = NULL );
455  virtual OGRLayer *CopyLayer( OGRLayer *poSrcLayer,
456  const char *pszNewName,
457  char **papszOptions = NULL );
458 
459  virtual OGRStyleTable *GetStyleTable();
460  virtual void SetStyleTableDirectly( OGRStyleTable *poStyleTable );
461 
462  virtual void SetStyleTable(OGRStyleTable *poStyleTable);
463 
464  virtual OGRLayer * ExecuteSQL( const char *pszStatement,
465  OGRGeometry *poSpatialFilter,
466  const char *pszDialect );
467  virtual void ReleaseResultSet( OGRLayer * poResultsSet );
468 
469  int GetRefCount() const;
470  int GetSummaryRefCount() const;
471  OGRErr Release();
472 
473  virtual OGRErr StartTransaction(int bForce=FALSE);
474  virtual OGRErr CommitTransaction();
475  virtual OGRErr RollbackTransaction();
476 
477  static int IsGenericSQLDialect(const char* pszDialect);
478 
479  // Semi-public methods. Only to be used by in-tree drivers.
480  GDALSQLParseInfo* BuildParseInfo(swq_select* psSelectInfo,
481  swq_select_parse_options* poSelectParseOptions);
482  void DestroyParseInfo(GDALSQLParseInfo* psParseInfo );
483  OGRLayer * ExecuteSQL( const char *pszStatement,
484  OGRGeometry *poSpatialFilter,
485  const char *pszDialect,
486  swq_select_parse_options* poSelectParseOptions);
487 
488  protected:
489 
490  virtual OGRLayer *ICreateLayer( const char *pszName,
491  OGRSpatialReference *poSpatialRef = NULL,
493  char ** papszOptions = NULL );
494 
495  OGRErr ProcessSQLCreateIndex( const char * );
496  OGRErr ProcessSQLDropIndex( const char * );
497  OGRErr ProcessSQLDropTable( const char * );
498  OGRErr ProcessSQLAlterTableAddColumn( const char * );
499  OGRErr ProcessSQLAlterTableDropColumn( const char * );
500  OGRErr ProcessSQLAlterTableAlterColumn( const char * );
501  OGRErr ProcessSQLAlterTableRenameColumn( const char * );
502 
503  OGRStyleTable *m_poStyleTable;
504 };
505 
506 /* ******************************************************************** */
507 /* GDALRasterBlock */
508 /* ******************************************************************** */
509 
511 
512 class CPL_DLL GDALRasterBlock
513 {
514  GDALDataType eType;
515 
516  int bDirty;
517  int nLockCount;
518 
519  int nXOff;
520  int nYOff;
521 
522  int nXSize;
523  int nYSize;
524 
525  void *pData;
526 
527  GDALRasterBand *poBand;
528 
529  GDALRasterBlock *poNext;
530  GDALRasterBlock *poPrevious;
531 
532  int bMustDetach;
533 
534  void Touch_unlocked( void );
535  void Detach_unlocked( void );
536 
537  public:
538  GDALRasterBlock( GDALRasterBand *, int, int );
539  virtual ~GDALRasterBlock();
540 
541  CPLErr Internalize( void );
542  void Touch( void );
543  void MarkDirty( void );
544  void MarkClean( void );
545  void AddLock( void ) { nLockCount++; }
546  void DropLock( void ) { nLockCount--; }
547  void Detach();
548 
549  CPLErr Write();
550 
551  GDALDataType GetDataType() { return eType; }
552  int GetXOff() { return nXOff; }
553  int GetYOff() { return nYOff; }
554  int GetXSize() { return nXSize; }
555  int GetYSize() { return nYSize; }
556  int GetDirty() { return bDirty; }
557  int GetLockCount() { return nLockCount; }
558 
559  void *GetDataRef( void ) { return pData; }
560  int GetBlockSize() { return nXSize * nYSize * (GDALGetDataTypeSize(eType) / 8); }
561 
564  GDALRasterBand *GetBand() { return poBand; }
565 
566  static void FlushDirtyBlocks();
567  static int FlushCacheBlock(int bDirtyBlocksOnly = FALSE);
568  static void Verify();
569 
570  static int SafeLockBlock( GDALRasterBlock ** );
571 
572  /* Should only be called by GDALDestroyDriverManager() */
573  static void DestroyRBMutex();
574 };
575 
576 /* ******************************************************************** */
577 /* GDALColorTable */
578 /* ******************************************************************** */
579 
582 class CPL_DLL GDALColorTable
583 {
584  GDALPaletteInterp eInterp;
585 
586  std::vector<GDALColorEntry> aoEntries;
587 
588 public:
590  ~GDALColorTable();
591 
592  GDALColorTable *Clone() const;
593  int IsSame(const GDALColorTable* poOtherCT) const;
594 
595  GDALPaletteInterp GetPaletteInterpretation() const;
596 
597  int GetColorEntryCount() const;
598  const GDALColorEntry *GetColorEntry( int ) const;
599  int GetColorEntryAsRGB( int, GDALColorEntry * ) const;
600  void SetColorEntry( int, const GDALColorEntry * );
601  int CreateColorRamp( int, const GDALColorEntry * ,
602  int, const GDALColorEntry * );
603 };
604 
605 /* ******************************************************************** */
606 /* GDALRasterBand */
607 /* ******************************************************************** */
608 
610 
611 class CPL_DLL GDALRasterBand : public GDALMajorObject
612 {
613  private:
614  CPLErr eFlushBlockErr;
615 
616  void SetFlushBlockErr( CPLErr eErr );
617 
618  friend class GDALRasterBlock;
619  CPLErr UnreferenceBlock( int nXBlockOff, int nYBlockOff );
620 
621  protected:
622  GDALDataset *poDS;
623  int nBand; /* 1 based */
624 
625  int nRasterXSize;
626  int nRasterYSize;
627 
628  GDALDataType eDataType;
629  GDALAccess eAccess;
630 
631  /* stuff related to blocking, and raster cache */
632  int nBlockXSize;
633  int nBlockYSize;
634  int nBlocksPerRow;
635  int nBlocksPerColumn;
636 
637  int bSubBlockingActive;
638  int nSubBlocksPerRow;
639  int nSubBlocksPerColumn;
640  GDALRasterBlock **papoBlocks;
641 
642  int nBlockReads;
643  int bForceCachedIO;
644 
645  GDALRasterBand *poMask;
646  bool bOwnMask;
647  int nMaskFlags;
648 
649  void InvalidateMaskBand();
650 
651  friend class GDALDataset;
652  friend class GDALProxyRasterBand;
653  friend class GDALDefaultOverviews;
654 
655  CPLErr RasterIOResampled( GDALRWFlag, int, int, int, int,
656  void *, int, int, GDALDataType,
657  GSpacing, GSpacing, GDALRasterIOExtraArg* psExtraArg );
658 
659  int EnterReadWrite(GDALRWFlag eRWFlag);
660  void LeaveReadWrite();
661 
662  protected:
663  virtual CPLErr IReadBlock( int, int, void * ) = 0;
664  virtual CPLErr IWriteBlock( int, int, void * );
665 
666 #ifdef DETECT_OLD_IRASTERIO
667  virtual signature_changed IRasterIO( GDALRWFlag, int, int, int, int,
668  void *, int, int, GDALDataType,
669  int, int ) {};
670 #endif
671 
672  virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int,
673  void *, int, int, GDALDataType,
674  GSpacing, GSpacing, GDALRasterIOExtraArg* psExtraArg );
675  CPLErr OverviewRasterIO( GDALRWFlag, int, int, int, int,
676  void *, int, int, GDALDataType,
677  GSpacing, GSpacing, GDALRasterIOExtraArg* psExtraArg );
678 
679  int InitBlockInfo();
680 
681  CPLErr AdoptBlock( int, int, GDALRasterBlock * );
682  GDALRasterBlock *TryGetLockedBlockRef( int nXBlockOff, int nYBlockYOff );
683 
684  public:
685  GDALRasterBand();
686 
687  virtual ~GDALRasterBand();
688 
689  int GetXSize();
690  int GetYSize();
691  int GetBand();
692  GDALDataset*GetDataset();
693 
694  GDALDataType GetRasterDataType( void );
695  void GetBlockSize( int *, int * );
696  GDALAccess GetAccess();
697 
698  CPLErr RasterIO( GDALRWFlag, int, int, int, int,
699  void *, int, int, GDALDataType,
701 #ifndef DOXYGEN_SKIP
702  OPTIONAL_OUTSIDE_GDAL(NULL)
703 #endif
704  );
705  CPLErr ReadBlock( int, int, void * );
706 
707  CPLErr WriteBlock( int, int, void * );
708 
709  GDALRasterBlock *GetLockedBlockRef( int nXBlockOff, int nYBlockOff,
710  int bJustInitialize = FALSE );
711  CPLErr FlushBlock( int = -1, int = -1, int bWriteDirtyBlock = TRUE );
712 
713  unsigned char* GetIndexColorTranslationTo(/* const */ GDALRasterBand* poReferenceBand,
714  unsigned char* pTranslationTable = NULL,
715  int* pApproximateMatching = NULL);
716 
717  // New OpengIS CV_SampleDimension stuff.
718 
719  virtual CPLErr FlushCache();
720  virtual char **GetCategoryNames();
721  virtual double GetNoDataValue( int *pbSuccess = NULL );
722  virtual double GetMinimum( int *pbSuccess = NULL );
723  virtual double GetMaximum(int *pbSuccess = NULL );
724  virtual double GetOffset( int *pbSuccess = NULL );
725  virtual double GetScale( int *pbSuccess = NULL );
726  virtual const char *GetUnitType();
727  virtual GDALColorInterp GetColorInterpretation();
728  virtual GDALColorTable *GetColorTable();
729  virtual CPLErr Fill(double dfRealValue, double dfImaginaryValue = 0);
730 
731  virtual CPLErr SetCategoryNames( char ** );
732  virtual CPLErr SetNoDataValue( double );
733  virtual CPLErr SetColorTable( GDALColorTable * );
734  virtual CPLErr SetColorInterpretation( GDALColorInterp );
735  virtual CPLErr SetOffset( double );
736  virtual CPLErr SetScale( double );
737  virtual CPLErr SetUnitType( const char * );
738 
739  virtual CPLErr GetStatistics( int bApproxOK, int bForce,
740  double *pdfMin, double *pdfMax,
741  double *pdfMean, double *padfStdDev );
742  virtual CPLErr ComputeStatistics( int bApproxOK,
743  double *pdfMin, double *pdfMax,
744  double *pdfMean, double *pdfStdDev,
745  GDALProgressFunc, void *pProgressData );
746  virtual CPLErr SetStatistics( double dfMin, double dfMax,
747  double dfMean, double dfStdDev );
748  virtual CPLErr ComputeRasterMinMax( int, double* );
749 
750  virtual int HasArbitraryOverviews();
751  virtual int GetOverviewCount();
752  virtual GDALRasterBand *GetOverview(int);
753  virtual GDALRasterBand *GetRasterSampleOverview( GUIntBig );
754  virtual CPLErr BuildOverviews( const char *, int, int *,
755  GDALProgressFunc, void * );
756 
757  virtual CPLErr AdviseRead( int nXOff, int nYOff, int nXSize, int nYSize,
758  int nBufXSize, int nBufYSize,
759  GDALDataType eDT, char **papszOptions );
760 
761  virtual CPLErr GetHistogram( double dfMin, double dfMax,
762  int nBuckets, GUIntBig * panHistogram,
763  int bIncludeOutOfRange, int bApproxOK,
764  GDALProgressFunc, void *pProgressData );
765 
766  virtual CPLErr GetDefaultHistogram( double *pdfMin, double *pdfMax,
767  int *pnBuckets, GUIntBig ** ppanHistogram,
768  int bForce,
769  GDALProgressFunc, void *pProgressData);
770  virtual CPLErr SetDefaultHistogram( double dfMin, double dfMax,
771  int nBuckets, GUIntBig *panHistogram );
772 
773  virtual GDALRasterAttributeTable *GetDefaultRAT();
774  virtual CPLErr SetDefaultRAT( const GDALRasterAttributeTable * );
775 
776  virtual GDALRasterBand *GetMaskBand();
777  virtual int GetMaskFlags();
778  virtual CPLErr CreateMaskBand( int nFlagsIn );
779 
780  virtual CPLVirtualMem *GetVirtualMemAuto( GDALRWFlag eRWFlag,
781  int *pnPixelSpace,
782  GIntBig *pnLineSpace,
783  char **papszOptions );
784 
785  void ReportError(CPLErr eErrClass, int err_no, const char *fmt, ...) CPL_PRINT_FUNC_FORMAT (4, 5);
786 };
787 
788 /* ******************************************************************** */
789 /* GDALAllValidMaskBand */
790 /* ******************************************************************** */
791 
792 class CPL_DLL GDALAllValidMaskBand : public GDALRasterBand
793 {
794  protected:
795  virtual CPLErr IReadBlock( int, int, void * );
796 
797  public:
799  virtual ~GDALAllValidMaskBand();
800 
801  virtual GDALRasterBand *GetMaskBand();
802  virtual int GetMaskFlags();
803 };
804 
805 /* ******************************************************************** */
806 /* GDALNoDataMaskBand */
807 /* ******************************************************************** */
808 
809 class CPL_DLL GDALNoDataMaskBand : public GDALRasterBand
810 {
811  double dfNoDataValue;
812  GDALRasterBand *poParent;
813 
814  protected:
815  virtual CPLErr IReadBlock( int, int, void * );
816  virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int,
817  void *, int, int, GDALDataType,
818  GSpacing, GSpacing, GDALRasterIOExtraArg* psExtraArg );
819 
820  public:
822  virtual ~GDALNoDataMaskBand();
823 };
824 
825 /* ******************************************************************** */
826 /* GDALNoDataValuesMaskBand */
827 /* ******************************************************************** */
828 
830 {
831  double *padfNodataValues;
832 
833  protected:
834  virtual CPLErr IReadBlock( int, int, void * );
835 
836  public:
838  virtual ~GDALNoDataValuesMaskBand();
839 };
840 
841 /* ******************************************************************** */
842 /* GDALRescaledAlphaBand */
843 /* ******************************************************************** */
844 
846 {
847  GDALRasterBand *poParent;
848  void *pTemp;
849 
850  protected:
851  virtual CPLErr IReadBlock( int, int, void * );
852  virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int,
853  void *, int, int, GDALDataType,
854  GSpacing, GSpacing, GDALRasterIOExtraArg* psExtraArg );
855 
856  public:
858  virtual ~GDALRescaledAlphaBand();
859 };
860 
861 /* ******************************************************************** */
862 /* GDALDriver */
863 /* ******************************************************************** */
864 
865 
877 class CPL_DLL GDALDriver : public GDALMajorObject
878 {
879  public:
880  GDALDriver();
881  ~GDALDriver();
882 
883  virtual CPLErr SetMetadataItem( const char * pszName,
884  const char * pszValue,
885  const char * pszDomain = "" );
886 
887 /* -------------------------------------------------------------------- */
888 /* Public C++ methods. */
889 /* -------------------------------------------------------------------- */
890  GDALDataset *Create( const char * pszName,
891  int nXSize, int nYSize, int nBands,
892  GDALDataType eType, char ** papszOptions ) CPL_WARN_UNUSED_RESULT;
893 
894  CPLErr Delete( const char * pszName );
895  CPLErr Rename( const char * pszNewName,
896  const char * pszOldName );
897  CPLErr CopyFiles( const char * pszNewName,
898  const char * pszOldName );
899 
900  GDALDataset *CreateCopy( const char *, GDALDataset *,
901  int, char **,
902  GDALProgressFunc pfnProgress,
903  void * pProgressData ) CPL_WARN_UNUSED_RESULT;
904 
905 /* -------------------------------------------------------------------- */
906 /* The following are semiprivate, not intended to be accessed */
907 /* by anyone but the formats instantiating and populating the */
908 /* drivers. */
909 /* -------------------------------------------------------------------- */
910  GDALDataset *(*pfnOpen)( GDALOpenInfo * );
911 
912  GDALDataset *(*pfnCreate)( const char * pszName,
913  int nXSize, int nYSize, int nBands,
914  GDALDataType eType,
915  char ** papszOptions );
916 
917  CPLErr (*pfnDelete)( const char * pszName );
918 
919  GDALDataset *(*pfnCreateCopy)( const char *, GDALDataset *,
920  int, char **,
921  GDALProgressFunc pfnProgress,
922  void * pProgressData );
923 
924  void *pDriverData;
925 
926  void (*pfnUnloadDriver)(GDALDriver *);
927 
928  /* Return 1 if the passed file is certainly recognized by the driver */
929  /* Return 0 if the passed file is certainly NOT recognized by the driver */
930  /* Return -1 if the passed file may be or may not be recognized by the driver,
931  and that a potentially costly test must be done with pfnOpen */
932  int (*pfnIdentify)( GDALOpenInfo * );
933 
934  CPLErr (*pfnRename)( const char * pszNewName,
935  const char * pszOldName );
936  CPLErr (*pfnCopyFiles)( const char * pszNewName,
937  const char * pszOldName );
938 
939  /* For legacy OGR drivers */
940  GDALDataset *(*pfnOpenWithDriverArg)( GDALDriver*, GDALOpenInfo * );
941  GDALDataset *(*pfnCreateVectorOnly)( GDALDriver*,
942  const char * pszName,
943  char ** papszOptions );
944  CPLErr (*pfnDeleteDataSource)( GDALDriver*,
945  const char * pszName );
946 
947 /* -------------------------------------------------------------------- */
948 /* Helper methods. */
949 /* -------------------------------------------------------------------- */
950  GDALDataset *DefaultCreateCopy( const char *, GDALDataset *,
951  int, char **,
952  GDALProgressFunc pfnProgress,
953  void * pProgressData ) CPL_WARN_UNUSED_RESULT;
954  static CPLErr DefaultCopyMasks( GDALDataset *poSrcDS,
955  GDALDataset *poDstDS,
956  int bStrict );
957  static CPLErr QuietDelete( const char * pszName );
958 
959  CPLErr DefaultRename( const char * pszNewName,
960  const char * pszOldName );
961  CPLErr DefaultCopyFiles( const char * pszNewName,
962  const char * pszOldName );
963 };
964 
965 /* ******************************************************************** */
966 /* GDALDriverManager */
967 /* ******************************************************************** */
968 
976 class CPL_DLL GDALDriverManager : public GDALMajorObject
977 {
978  int nDrivers;
979  GDALDriver **papoDrivers;
980  std::map<CPLString, GDALDriver*> oMapNameToDrivers;
981 
982  GDALDriver *GetDriver_unlocked( int iDriver )
983  { return (iDriver >= 0 && iDriver < nDrivers) ? papoDrivers[iDriver] : NULL; }
984 
985  GDALDriver *GetDriverByName_unlocked( const char * pszName )
986  { return oMapNameToDrivers[CPLString(pszName).toupper()]; }
987 
988  public:
991 
992  int GetDriverCount( void );
993  GDALDriver *GetDriver( int );
994  GDALDriver *GetDriverByName( const char * );
995 
996  int RegisterDriver( GDALDriver * );
997  void DeregisterDriver( GDALDriver * );
998 
999  void AutoLoadDrivers();
1000  void AutoSkipDrivers();
1001 };
1002 
1003 CPL_C_START
1004 GDALDriverManager CPL_DLL * GetGDALDriverManager( void );
1005 CPL_C_END
1006 
1007 /* ******************************************************************** */
1008 /* GDALAsyncReader */
1009 /* ******************************************************************** */
1010 
1016 class CPL_DLL GDALAsyncReader
1017 {
1018  protected:
1019  GDALDataset* poDS;
1020  int nXOff;
1021  int nYOff;
1022  int nXSize;
1023  int nYSize;
1024  void * pBuf;
1025  int nBufXSize;
1026  int nBufYSize;
1027  GDALDataType eBufType;
1028  int nBandCount;
1029  int* panBandMap;
1030  int nPixelSpace;
1031  int nLineSpace;
1032  int nBandSpace;
1033 
1034  public:
1035  GDALAsyncReader();
1036  virtual ~GDALAsyncReader();
1037 
1038  GDALDataset* GetGDALDataset() {return poDS;}
1039  int GetXOffset() {return nXOff;}
1040  int GetYOffset() {return nYOff;}
1041  int GetXSize() {return nXSize;}
1042  int GetYSize() {return nYSize;}
1043  void * GetBuffer() {return pBuf;}
1044  int GetBufferXSize() {return nBufXSize;}
1045  int GetBufferYSize() {return nBufYSize;}
1046  GDALDataType GetBufferType() {return eBufType;}
1047  int GetBandCount() {return nBandCount;}
1048  int* GetBandMap() {return panBandMap;}
1049  int GetPixelSpace() {return nPixelSpace;}
1050  int GetLineSpace() {return nLineSpace;}
1051  int GetBandSpace() {return nBandSpace;}
1052 
1053  virtual GDALAsyncStatusType
1054  GetNextUpdatedRegion(double dfTimeout,
1055  int* pnBufXOff, int* pnBufYOff,
1056  int* pnBufXSize, int* pnBufYSize) = 0;
1057  virtual int LockBuffer( double dfTimeout = -1.0 );
1058  virtual void UnlockBuffer();
1059 };
1060 
1061 /* ==================================================================== */
1062 /* An assortment of overview related stuff. */
1063 /* ==================================================================== */
1064 
1065 /* Not a public symbol for the moment */
1066 CPLErr
1067 GDALRegenerateOverviewsMultiBand(int nBands, GDALRasterBand** papoSrcBands,
1068  int nOverviews,
1069  GDALRasterBand*** papapoOverviewBands,
1070  const char * pszResampling,
1071  GDALProgressFunc pfnProgress, void * pProgressData );
1072 
1073 typedef CPLErr (*GDALResampleFunction)
1074  ( double dfXRatioDstToSrc,
1075  double dfYRatioDstToSrc,
1076  double dfSrcXDelta,
1077  double dfSrcYDelta,
1078  GDALDataType eWrkDataType,
1079  void * pChunk,
1080  GByte * pabyChunkNodataMask,
1081  int nChunkXOff, int nChunkXSize,
1082  int nChunkYOff, int nChunkYSize,
1083  int nDstXOff, int nDstXOff2,
1084  int nDstYOff, int nDstYOff2,
1085  GDALRasterBand * poOverview,
1086  const char * pszResampling,
1087  int bHasNoData, float fNoDataValue,
1088  GDALColorTable* poColorTable,
1089  GDALDataType eSrcDataType);
1090 
1091 GDALResampleFunction GDALGetResampleFunction(const char* pszResampling,
1092  int* pnRadius);
1093 GDALDataType GDALGetOvrWorkDataType(const char* pszResampling,
1094  GDALDataType eSrcDataType);
1095 
1096 CPL_C_START
1097 
1098 #ifndef WIN32CE
1099 
1100 CPLErr CPL_DLL
1101 HFAAuxBuildOverviews( const char *pszOvrFilename, GDALDataset *poParentDS,
1102  GDALDataset **ppoDS,
1103  int nBands, int *panBandList,
1104  int nNewOverviews, int *panNewOverviewList,
1105  const char *pszResampling,
1106  GDALProgressFunc pfnProgress,
1107  void *pProgressData );
1108 
1109 #endif /* WIN32CE */
1110 
1111 CPLErr CPL_DLL
1112 GTIFFBuildOverviews( const char * pszFilename,
1113  int nBands, GDALRasterBand **papoBandList,
1114  int nOverviews, int * panOverviewList,
1115  const char * pszResampling,
1116  GDALProgressFunc pfnProgress, void * pProgressData );
1117 
1118 CPLErr CPL_DLL
1119 GDALDefaultBuildOverviews( GDALDataset *hSrcDS, const char * pszBasename,
1120  const char * pszResampling,
1121  int nOverviews, int * panOverviewList,
1122  int nBands, int * panBandList,
1123  GDALProgressFunc pfnProgress, void * pProgressData);
1124 
1125 int CPL_DLL GDALBandGetBestOverviewLevel(GDALRasterBand* poBand,
1126  int &nXOff, int &nYOff,
1127  int &nXSize, int &nYSize,
1128  int nBufXSize, int nBufYSize) CPL_WARN_DEPRECATED("Use GDALBandGetBestOverviewLevel2 instead");
1129 int CPL_DLL GDALBandGetBestOverviewLevel2(GDALRasterBand* poBand,
1130  int &nXOff, int &nYOff,
1131  int &nXSize, int &nYSize,
1132  int nBufXSize, int nBufYSize,
1133  GDALRasterIOExtraArg* psExtraArg);
1134 
1135 int CPL_DLL GDALOvLevelAdjust( int nOvLevel, int nXSize ) CPL_WARN_DEPRECATED("Use GDALOvLevelAdjust2 instead");
1136 int CPL_DLL GDALOvLevelAdjust2( int nOvLevel, int nXSize, int nYSize );
1137 int CPL_DLL GDALComputeOvFactor( int nOvrXSize, int nRasterXSize,
1138  int nOvrYSize, int nRasterYSize );
1139 
1140 GDALDataset CPL_DLL *
1141 GDALFindAssociatedAuxFile( const char *pszBasefile, GDALAccess eAccess,
1142  GDALDataset *poDependentDS );
1143 
1144 /* ==================================================================== */
1145 /* Misc functions. */
1146 /* ==================================================================== */
1147 
1148 CPLErr CPL_DLL GDALParseGMLCoverage( CPLXMLNode *psTree,
1149  int *pnXSize, int *pnYSize,
1150  double *padfGeoTransform,
1151  char **ppszProjection );
1152 
1153 /* ==================================================================== */
1154 /* Infrastructure to check that dataset characteristics are valid */
1155 /* ==================================================================== */
1156 
1157 int CPL_DLL GDALCheckDatasetDimensions( int nXSize, int nYSize );
1158 int CPL_DLL GDALCheckBandCount( int nBands, int bIsZeroAllowed );
1159 
1160 
1161 // Test if 2 floating point values match. Useful when comparing values
1162 // stored as a string at some point. See #3573, #4183, #4506
1163 #define ARE_REAL_EQUAL(dfVal1, dfVal2) \
1164  (dfVal1 == dfVal2 || fabs(dfVal1 - dfVal2) < 1e-10 || (dfVal2 != 0 && fabs(1 - dfVal1 / dfVal2) < 1e-10 ))
1165 
1166 /* Internal use only */
1167 
1168 /* CPL_DLL exported, but only for in-tree drivers that can be built as plugins */
1169 int CPL_DLL GDALReadWorldFile2( const char *pszBaseFilename, const char *pszExtension,
1170  double *padfGeoTransform, char** papszSiblingFiles,
1171  char** ppszWorldFileNameOut);
1172 int GDALReadTabFile2( const char * pszBaseFilename,
1173  double *padfGeoTransform, char **ppszWKT,
1174  int *pnGCPCount, GDAL_GCP **ppasGCPs,
1175  char** papszSiblingFiles, char** ppszTabFileNameOut );
1176 
1177 void CPL_DLL GDALCopyRasterIOExtraArg(GDALRasterIOExtraArg* psDestArg,
1178  GDALRasterIOExtraArg* psSrcArg);
1179 
1180 CPL_C_END
1181 
1182 void GDALNullifyOpenDatasetsList();
1183 CPLMutex** GDALGetphDMMutex();
1184 CPLMutex** GDALGetphDLMutex();
1185 void GDALNullifyProxyPoolSingleton();
1186 GDALDriver* GDALGetAPIPROXYDriver();
1187 void GDALSetResponsiblePIDForCurrentThread(GIntBig responsiblePID);
1188 GIntBig GDALGetResponsiblePIDForCurrentThread();
1189 
1190 CPLString GDALFindAssociatedFile( const char *pszBasename, const char *pszExt,
1191  char **papszSiblingFiles, int nFlags );
1192 
1193 CPLErr EXIFExtractMetadata(char**& papszMetadata,
1194  void *fpL, int nOffset,
1195  int bSwabflag, int nTIFFHEADER,
1196  int& nExifOffset, int& nInterOffset, int& nGPSOffset);
1197 
1198 int GDALValidateOpenOptions( GDALDriverH hDriver,
1199  const char* const* papszOptionOptions);
1200 int GDALValidateOptions( const char* pszOptionList,
1201  const char* const* papszOptionsToValidate,
1202  const char* pszErrorMessageOptionType,
1203  const char* pszErrorMessageContainerName);
1204 
1205 GDALRIOResampleAlg GDALRasterIOGetResampleAlg(const char* pszResampling);
1206 
1207 void GDALRasterIOExtraArgSetResampleAlg(GDALRasterIOExtraArg* psExtraArg,
1208  int nXSize, int nYSize,
1209  int nBufXSize, int nBufYSize);
1210 
1211 /* CPL_DLL exported, but only for gdalwarp */
1212 GDALDataset CPL_DLL* GDALCreateOverviewDataset(GDALDataset* poDS, int nOvrLevel,
1213  int bThisLevelOnly, int bOwnDS);
1214 
1215 #define DIV_ROUND_UP(a, b) ( ((a) % (b)) == 0 ? ((a) / (b)) : (((a) / (b)) + 1) )
1216 
1217 // Number of data samples that will be used to compute approximate statistics
1218 // (minimum value, maximum value, etc.)
1219 #define GDALSTAT_APPROX_NUMSAMPLES 2500
1220 
1221 CPL_C_START
1222 /* Caution: for technical reason this declaration is duplicated in gdal_crs.c */
1223 /* so any signature change should be reflected there too */
1224 void GDALSerializeGCPListToXML( CPLXMLNode* psParentNode,
1225  GDAL_GCP* pasGCPList,
1226  int nGCPCount,
1227  const char* pszGCPProjection );
1228 void GDALDeserializeGCPListFromXML( CPLXMLNode* psGCPList,
1229  GDAL_GCP** ppasGCPList,
1230  int* pnGCPCount,
1231  char** ppszGCPProjection );
1232 CPL_C_END
1233 
1234 void GDALSerializeOpenOptionsToXML( CPLXMLNode* psParentNode, char** papszOpenOptions);
1235 char** GDALDeserializeOpenOptionsFromXML( CPLXMLNode* psParentNode );
1236 
1237 int GDALCanFileAcceptSidecarFile(const char* pszFilename);
1238 
1239 #endif /* ndef GDAL_PRIV_H_INCLUDED */
The GDALRasterAttributeTable (or RAT) class is used to encapsulate a table used to provide attribute ...
Definition: gdal_rat.h:46
GDALDatasetH GDALOpenEx(const char *pszFilename, unsigned int nOpenFlags, const char *const *papszAllowedDrivers, const char *const *papszOpenOptions, const char *const *papszSiblingFiles) CPL_WARN_UNUSED_RESULT
Open a raster or vector file as a GDALDataset.
Definition: gdaldataset.cpp:2454
virtual CPLErr AdviseRead(int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eDT, char **papszOptions)
Advise driver of upcoming read requests.
Definition: gdalrasterband.cpp:3590
GDALDataType
Definition: gdal.h:57
Definition: gdal_priv.h:829
Definition: swq.h:331
Document node structure.
Definition: cpl_minixml.h:65
Standard C Covers.
virtual GDALRasterBand * GetMaskBand()
Return the mask band associated with the band.
Definition: gdalrasterband.cpp:4819
Definitions for CPL mini XML Parser/Serializer.
Definition: gdal.h:199
Definition: gdal_proxy.h:100
int GDALGetDataTypeSize(GDALDataType)
Get data type size in bits.
Definition: gdal_misc.cpp:217
GDALRIOResampleAlg
RasterIO() resampling method.
Definition: gdal.h:110
GDALRWFlag
Definition: gdal.h:101
void * GDALDatasetH
Opaque type used for the C bindings of the C++ GDALDataset class.
Definition: gdal.h:227
Definition: gdal_priv.h:809
Color tuple.
Definition: gdal.h:871
A single raster block in the block cache.
Definition: gdal_priv.h:512
virtual int GetMaskFlags()
Return the status flags of the mask band associated with the band.
Definition: gdalrasterband.cpp:5019
Convenient string class based on std::string.
Definition: cpl_string.h:236
virtual CPLErr BuildOverviews(const char *, int, int *, GDALProgressFunc, void *)
Build raster overview(s)
Definition: gdalrasterband.cpp:2372
unknown type, non-standard
Definition: ogr_core.h:311
struct CPLVirtualMem CPLVirtualMem
Opaque type that represents a virtual memory mapping.
Definition: cpl_virtualmem.h:60
CPLErr BuildOverviews(const char *, int, int *, int, int *, GDALProgressFunc, void *)
Build raster overview(s)
Definition: gdaldataset.cpp:1402
Various convenience functions for working with strings and string lists.
Definition: gdal_priv.h:146
virtual CPLErr FlushCache()
Flush raster data cache.
Definition: gdalrasterband.cpp:913
GIntBig GSpacing
Type to express pixel, line or band spacing.
Definition: gdal.h:245
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:309
Public (C callable) GDAL entry points.
GDALAsyncStatusType
status of the asynchronous stream
Definition: gdal.h:82
CPLErr RasterIO(GDALRWFlag, int, int, int, int, void *, int, int, GDALDataType, GSpacing, GSpacing, GDALRasterIOExtraArg *psExtraArg)
Read/write a region of image data for this band.
Definition: gdalrasterband.cpp:176
Definition: gdal_proxy.h:44
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:104
GDALRasterBand * GetBand()
Accessor to source GDALRasterBand object.
Definition: gdal_priv.h:564
Definition: gdal_priv.h:223
Definition: gdal_priv.h:792
String list class designed around our use of C "char**" string lists.
Definition: cpl_string.h:310
Definition: swq.h:313
Structure to pass extra arguments to RasterIO() method.
Definition: gdal.h:129
GDALPaletteInterp
Definition: gdal.h:196
Core portability services for cross-platform OGR code.
virtual int CloseDependentDatasets()
Drop references to any other datasets referenced by this dataset.
Definition: gdaldataset.cpp:3078
virtual CPLErr CreateMaskBand(int nFlagsIn)
Adds a mask band to the dataset.
Definition: gdaldataset.cpp:2269
Various convenience functions for CPL.
void ReportError(CPLErr eErrClass, int err_no, const char *fmt,...) CPL_PRINT_FUNC_FORMAT(4
Emits an error related to a raster band.
Definition: gdalrasterband.cpp:5309
This class respresents a OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:129
void * GDALDriverH
Opaque type used for the C bindings of the C++ GDALDriver class.
Definition: gdal.h:233
void GDALClose(GDALDatasetH)
Close GDAL dataset.
Definition: gdaldataset.cpp:2771
Object with metadata.
Definition: gdal_priv.h:112
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:66
A single raster band (or channel).
Definition: gdal_priv.h:611
GDALAccess
Definition: gdal.h:95
Definition: gdal_priv.h:76
virtual CPLErr CreateMaskBand(int nFlagsIn)
Adds a mask band to the current band.
Definition: gdalrasterband.cpp:5092
This class represents a style table.
Definition: ogr_featurestyle.h:81
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:276
GDALAccess GetAccess()
Find out if we have update permission for this band.
Definition: gdalrasterband.cpp:1545
Class for managing the registration of file format drivers.
Definition: gdal_priv.h:976
Definition: gdal_priv.h:845
CPLString & toupper(void)
Convert to upper case in place.
Definition: cplstring.cpp:297
GDALColorInterp
Definition: gdal.h:170
virtual CPLErr SetMetadataItem(const char *pszName, const char *pszValue, const char *pszDomain="")
Set single metadata item.
Definition: gdalmajorobject.cpp:374
Format specific driver.
Definition: gdal_priv.h:877
Definition: gdal_priv.h:582
Ground Control Point.
Definition: gdal.h:442
Class used as a session object for asynchronous requests.
Definition: gdal_priv.h:1016

Generated for GDAL by doxygen 1.8.8.