GDAL
vrtdataset.h
1 /******************************************************************************
2  * $Id: vrtdataset.h 37069 2017-01-07 14:14:14Z rouault $
3  *
4  * Project: Virtual GDAL Datasets
5  * Purpose: Declaration of virtual gdal dataset classes.
6  * Author: Frank Warmerdam, warmerdam@pobox.com
7  *
8  ******************************************************************************
9  * Copyright (c) 2001, Frank Warmerdam <warmerdam@pobox.com>
10  * Copyright (c) 2007-2013, Even Rouault <even dot rouault at mines-paris dot org>
11  *
12  * Permission is hereby granted, free of charge, to any person obtaining a
13  * copy of this software and associated documentation files (the "Software"),
14  * to deal in the Software without restriction, including without limitation
15  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16  * and/or sell copies of the Software, and to permit persons to whom the
17  * Software is furnished to do so, subject to the following conditions:
18  *
19  * The above copyright notice and this permission notice shall be included
20  * in all copies or substantial portions of the Software.
21  *
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28  * DEALINGS IN THE SOFTWARE.
29  ****************************************************************************/
30 
31 #ifndef VIRTUALDATASET_H_INCLUDED
32 #define VIRTUALDATASET_H_INCLUDED
33 
34 #ifndef DOXYGEN_SKIP
35 
36 #include "cpl_hash_set.h"
37 #include "gdal_pam.h"
38 #include "gdal_priv.h"
39 #include "gdal_vrt.h"
40 
41 #include <map>
42 #include <vector>
43 
44 int VRTApplyMetadata( CPLXMLNode *, GDALMajorObject * );
45 CPLXMLNode *VRTSerializeMetadata( GDALMajorObject * );
46 CPLErr GDALRegisterDefaultPixelFunc();
47 
48 #if 0
49 int VRTWarpedOverviewTransform( void *pTransformArg, int bDstToSrc,
50  int nPointCount,
51  double *padfX, double *padfY, double *padfZ,
52  int *panSuccess );
53 void* VRTDeserializeWarpedOverviewTransformer( CPLXMLNode *psTree );
54 #endif
55 
56 /************************************************************************/
57 /* VRTOverviewInfo() */
58 /************************************************************************/
59 class VRTOverviewInfo
60 {
61 public:
62  CPLString osFilename;
63  int nBand;
64  GDALRasterBand *poBand;
65  int bTriedToOpen;
66 
67  VRTOverviewInfo() : nBand(0), poBand(NULL), bTriedToOpen(FALSE) {}
68  ~VRTOverviewInfo() {
69  if( poBand == NULL )
70  /* do nothing */;
71  else if( poBand->GetDataset()->GetShared() )
72  GDALClose( /* (GDALDatasetH) */ poBand->GetDataset() );
73  else
74  poBand->GetDataset()->Dereference();
75  }
76 };
77 
78 /************************************************************************/
79 /* VRTSource */
80 /************************************************************************/
81 
82 class CPL_DLL VRTSource
83 {
84 public:
85  virtual ~VRTSource();
86 
87  virtual CPLErr RasterIO( int nXOff, int nYOff, int nXSize, int nYSize,
88  void *pData, int nBufXSize, int nBufYSize,
89  GDALDataType eBufType,
90  GSpacing nPixelSpace, GSpacing nLineSpace,
91  GDALRasterIOExtraArg* psExtraArg ) = 0;
92 
93  virtual double GetMinimum( int nXSize, int nYSize, int *pbSuccess ) = 0;
94  virtual double GetMaximum( int nXSize, int nYSize, int *pbSuccess ) = 0;
95  virtual CPLErr ComputeRasterMinMax( int nXSize, int nYSize, int bApproxOK,
96  double* adfMinMax ) = 0;
97  virtual CPLErr ComputeStatistics( int nXSize, int nYSize,
98  int bApproxOK,
99  double *pdfMin, double *pdfMax,
100  double *pdfMean, double *pdfStdDev,
101  GDALProgressFunc pfnProgress,
102  void *pProgressData ) = 0;
103  virtual CPLErr GetHistogram( int nXSize, int nYSize,
104  double dfMin, double dfMax,
105  int nBuckets, GUIntBig * panHistogram,
106  int bIncludeOutOfRange, int bApproxOK,
107  GDALProgressFunc pfnProgress,
108  void *pProgressData ) = 0;
109 
110  virtual CPLErr XMLInit( CPLXMLNode *psTree, const char * ) = 0;
111  virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath ) = 0;
112 
113  virtual void GetFileList(char*** ppapszFileList, int *pnSize,
114  int *pnMaxSize, CPLHashSet* hSetFiles);
115 
116  virtual int IsSimpleSource() { return FALSE; }
117 };
118 
119 typedef VRTSource *(*VRTSourceParser)(CPLXMLNode *, const char *);
120 
121 VRTSource *VRTParseCoreSources( CPLXMLNode *psTree, const char * );
122 VRTSource *VRTParseFilterSources( CPLXMLNode *psTree, const char * );
123 
124 /************************************************************************/
125 /* VRTDataset */
126 /************************************************************************/
127 
128 class VRTRasterBand;
129 
130 class CPL_DLL VRTDataset : public GDALDataset
131 {
132  friend class VRTRasterBand;
133 
134  char *m_pszProjection;
135 
136  int m_bGeoTransformSet;
137  double m_adfGeoTransform[6];
138 
139  int m_nGCPCount;
140  GDAL_GCP *m_pasGCPList;
141  char *m_pszGCPProjection;
142 
143  int m_bNeedsFlush;
144  int m_bWritable;
145 
146  char *m_pszVRTPath;
147 
148  VRTRasterBand *m_poMaskBand;
149 
150  int m_bCompatibleForDatasetIO;
151  int CheckCompatibleForDatasetIO();
152  std::vector<GDALDataset*> m_apoOverviews;
153  std::vector<GDALDataset*> m_apoOverviewsBak;
154  char **m_papszXMLVRTMetadata;
155 
156  protected:
157  virtual int CloseDependentDatasets() CPL_OVERRIDE;
158 
159  public:
160  VRTDataset(int nXSize, int nYSize);
161  virtual ~VRTDataset();
162 
163  void SetNeedsFlush() { m_bNeedsFlush = TRUE; }
164  virtual void FlushCache() CPL_OVERRIDE;
165 
166  void SetWritable(int bWritableIn) { m_bWritable = bWritableIn; }
167 
168  virtual CPLErr CreateMaskBand( int nFlags ) CPL_OVERRIDE;
169  void SetMaskBand(VRTRasterBand* poMaskBand);
170 
171  virtual const char *GetProjectionRef() CPL_OVERRIDE;
172  virtual CPLErr SetProjection( const char * ) CPL_OVERRIDE;
173  virtual CPLErr GetGeoTransform( double * ) CPL_OVERRIDE;
174  virtual CPLErr SetGeoTransform( double * ) CPL_OVERRIDE;
175 
176  virtual CPLErr SetMetadata( char **papszMD, const char *pszDomain = "" ) CPL_OVERRIDE;
177  virtual CPLErr SetMetadataItem( const char *pszName, const char *pszValue,
178  const char *pszDomain = "" ) CPL_OVERRIDE;
179 
180  virtual char** GetMetadata( const char *pszDomain = "" ) CPL_OVERRIDE;
181 
182  virtual int GetGCPCount() CPL_OVERRIDE;
183  virtual const char *GetGCPProjection() CPL_OVERRIDE;
184  virtual const GDAL_GCP *GetGCPs() CPL_OVERRIDE;
185  virtual CPLErr SetGCPs( int nGCPCount, const GDAL_GCP *pasGCPList,
186  const char *pszGCPProjection ) CPL_OVERRIDE;
187 
188  virtual CPLErr AddBand( GDALDataType eType,
189  char **papszOptions=NULL ) CPL_OVERRIDE;
190 
191  virtual char **GetFileList() CPL_OVERRIDE;
192 
193  virtual CPLErr IRasterIO( GDALRWFlag eRWFlag,
194  int nXOff, int nYOff, int nXSize, int nYSize,
195  void * pData, int nBufXSize, int nBufYSize,
196  GDALDataType eBufType,
197  int nBandCount, int *panBandMap,
198  GSpacing nPixelSpace, GSpacing nLineSpace,
199  GSpacing nBandSpace,
200  GDALRasterIOExtraArg* psExtraArg) CPL_OVERRIDE;
201 
202  virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath);
203  virtual CPLErr XMLInit( CPLXMLNode *, const char * );
204 
205  virtual CPLErr IBuildOverviews( const char *, int, int *,
206  int, int *, GDALProgressFunc, void * ) CPL_OVERRIDE;
207 
208  /* Used by PDF driver for example */
209  GDALDataset* GetSingleSimpleSource();
210  void BuildVirtualOverviews();
211 
212  void UnsetPreservedRelativeFilenames();
213 
214  static int Identify( GDALOpenInfo * );
215  static GDALDataset *Open( GDALOpenInfo * );
216  static GDALDataset *OpenXML( const char *, const char * = NULL,
217  GDALAccess eAccess = GA_ReadOnly );
218  static GDALDataset *Create( const char * pszName,
219  int nXSize, int nYSize, int nBands,
220  GDALDataType eType, char ** papszOptions );
221  static CPLErr Delete( const char * pszFilename );
222 };
223 
224 /************************************************************************/
225 /* VRTWarpedDataset */
226 /************************************************************************/
227 
228 class GDALWarpOperation;
229 class VRTWarpedRasterBand;
230 
231 class CPL_DLL VRTWarpedDataset : public VRTDataset
232 {
233  int m_nBlockXSize;
234  int m_nBlockYSize;
235  GDALWarpOperation *m_poWarper;
236 
237  int m_nOverviewCount;
238  VRTWarpedDataset **m_papoOverviews;
239  int m_nSrcOvrLevel;
240 
241  void CreateImplicitOverviews();
242 
243  friend class VRTWarpedRasterBand;
244 
245  protected:
246  virtual int CloseDependentDatasets() CPL_OVERRIDE;
247 
248 public:
249  VRTWarpedDataset( int nXSize, int nYSize );
250  virtual ~VRTWarpedDataset();
251 
252  CPLErr Initialize( /* GDALWarpOptions */ void * );
253 
254  virtual CPLErr IBuildOverviews( const char *, int, int *,
255  int, int *, GDALProgressFunc, void * ) CPL_OVERRIDE;
256 
257  virtual CPLErr SetMetadataItem( const char *pszName, const char *pszValue,
258  const char *pszDomain = "" ) CPL_OVERRIDE;
259 
260  virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
261  virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
262 
263  virtual CPLErr AddBand( GDALDataType eType,
264  char **papszOptions=NULL ) CPL_OVERRIDE;
265 
266  virtual char **GetFileList() CPL_OVERRIDE;
267 
268  CPLErr ProcessBlock( int iBlockX, int iBlockY );
269 
270  void GetBlockSize( int *, int * );
271 };
272 
273 /************************************************************************/
274 /* VRTPansharpenedDataset */
275 /************************************************************************/
276 
278 
279 typedef enum
280 {
281  GTAdjust_Union,
282  GTAdjust_Intersection,
283  GTAdjust_None,
284  GTAdjust_NoneWithoutWarning
285 } GTAdjustment;
286 
287 class VRTPansharpenedDataset : public VRTDataset
288 {
289  friend class VRTPansharpenedRasterBand;
290 
291  int m_nBlockXSize;
292  int m_nBlockYSize;
293  GDALPansharpenOperation* m_poPansharpener;
294  VRTPansharpenedDataset* m_poMainDataset;
295  std::vector<VRTPansharpenedDataset*> m_apoOverviewDatasets;
296  // Map from absolute to relative.
297  std::map<CPLString,CPLString> m_oMapToRelativeFilenames;
298 
299  int m_bLoadingOtherBands;
300 
301  GByte *m_pabyLastBufferBandRasterIO;
302  int m_nLastBandRasterIOXOff;
303  int m_nLastBandRasterIOYOff;
304  int m_nLastBandRasterIOXSize;
305  int m_nLastBandRasterIOYSize;
306  GDALDataType m_eLastBandRasterIODataType;
307 
308  GTAdjustment m_eGTAdjustment;
309  int m_bNoDataDisabled;
310 
311  std::vector<GDALDataset*> m_apoDatasetsToClose;
312 
313  protected:
314  virtual int CloseDependentDatasets() CPL_OVERRIDE;
315 
316 public:
317  VRTPansharpenedDataset( int nXSize, int nYSize );
318  virtual ~VRTPansharpenedDataset();
319 
320  virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
321  virtual CPLXMLNode * SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
322 
323  CPLErr XMLInit( CPLXMLNode *psTree, const char *pszVRTPath,
324  GDALRasterBandH hPanchroBandIn,
325  int nInputSpectralBandsIn,
326  GDALRasterBandH* pahInputSpectralBandsIn );
327 
328  virtual CPLErr AddBand( GDALDataType eType,
329  char **papszOptions=NULL ) CPL_OVERRIDE;
330 
331  virtual char **GetFileList() CPL_OVERRIDE;
332 
333  virtual CPLErr IRasterIO( GDALRWFlag eRWFlag,
334  int nXOff, int nYOff, int nXSize, int nYSize,
335  void * pData, int nBufXSize, int nBufYSize,
336  GDALDataType eBufType,
337  int nBandCount, int *panBandMap,
338  GSpacing nPixelSpace, GSpacing nLineSpace,
339  GSpacing nBandSpace,
340  GDALRasterIOExtraArg* psExtraArg) CPL_OVERRIDE;
341 
342  void GetBlockSize( int *, int * );
343 
344  GDALPansharpenOperation* GetPansharpener() { return m_poPansharpener; }
345 };
346 
347 /************************************************************************/
348 /* VRTRasterBand */
349 /* */
350 /* Provides support for all the various kinds of metadata but */
351 /* no raster access. That is handled by derived classes. */
352 /************************************************************************/
353 
354 class CPL_DLL VRTRasterBand : public GDALRasterBand
355 {
356  protected:
357  int m_bIsMaskBand;
358 
359  int m_bNoDataValueSet;
360  // If set to true, will not report the existence of nodata.
361  int m_bHideNoDataValue;
362  double m_dfNoDataValue;
363 
364  GDALColorTable *m_poColorTable;
365 
366  GDALColorInterp m_eColorInterp;
367 
368  char *m_pszUnitType;
369  char **m_papszCategoryNames;
370 
371  double m_dfOffset;
372  double m_dfScale;
373 
374  CPLXMLNode *m_psSavedHistograms;
375 
376  void Initialize( int nXSize, int nYSize );
377 
378  std::vector<VRTOverviewInfo> m_apoOverviews;
379 
380  VRTRasterBand *m_poMaskBand;
381 
382  public:
383 
384  VRTRasterBand();
385  virtual ~VRTRasterBand();
386 
387  virtual CPLErr XMLInit( CPLXMLNode *, const char * );
388  virtual CPLXMLNode * SerializeToXML( const char *pszVRTPath );
389 
390  virtual CPLErr SetNoDataValue( double ) CPL_OVERRIDE;
391  virtual double GetNoDataValue( int *pbSuccess = NULL ) CPL_OVERRIDE;
392  virtual CPLErr DeleteNoDataValue() CPL_OVERRIDE;
393 
394  virtual CPLErr SetColorTable( GDALColorTable * ) CPL_OVERRIDE;
395  virtual GDALColorTable *GetColorTable() CPL_OVERRIDE;
396 
397  virtual CPLErr SetColorInterpretation( GDALColorInterp ) CPL_OVERRIDE;
398  virtual GDALColorInterp GetColorInterpretation() CPL_OVERRIDE;
399 
400  virtual const char *GetUnitType() CPL_OVERRIDE;
401  CPLErr SetUnitType( const char * ) CPL_OVERRIDE;
402 
403  virtual char **GetCategoryNames() CPL_OVERRIDE;
404  virtual CPLErr SetCategoryNames( char ** ) CPL_OVERRIDE;
405 
406  virtual CPLErr SetMetadata( char **papszMD, const char *pszDomain = "" ) CPL_OVERRIDE;
407  virtual CPLErr SetMetadataItem( const char *pszName, const char *pszValue,
408  const char *pszDomain = "" ) CPL_OVERRIDE;
409 
410  virtual double GetOffset( int *pbSuccess = NULL ) CPL_OVERRIDE;
411  CPLErr SetOffset( double ) CPL_OVERRIDE;
412  virtual double GetScale( int *pbSuccess = NULL ) CPL_OVERRIDE;
413  CPLErr SetScale( double ) CPL_OVERRIDE;
414 
415  virtual int GetOverviewCount() CPL_OVERRIDE;
416  virtual GDALRasterBand *GetOverview(int) CPL_OVERRIDE;
417 
418  virtual CPLErr GetHistogram( double dfMin, double dfMax,
419  int nBuckets, GUIntBig * panHistogram,
420  int bIncludeOutOfRange, int bApproxOK,
421  GDALProgressFunc, void *pProgressData ) CPL_OVERRIDE;
422 
423  virtual CPLErr GetDefaultHistogram( double *pdfMin, double *pdfMax,
424  int *pnBuckets, GUIntBig ** ppanHistogram,
425  int bForce,
426  GDALProgressFunc, void *pProgressData) CPL_OVERRIDE;
427 
428  virtual CPLErr SetDefaultHistogram( double dfMin, double dfMax,
429  int nBuckets, GUIntBig *panHistogram ) CPL_OVERRIDE;
430 
431  CPLErr CopyCommonInfoFrom( GDALRasterBand * );
432 
433  virtual void GetFileList(char*** ppapszFileList, int *pnSize,
434  int *pnMaxSize, CPLHashSet* hSetFiles);
435 
436  virtual void SetDescription( const char * ) CPL_OVERRIDE;
437 
438  virtual GDALRasterBand *GetMaskBand() CPL_OVERRIDE;
439  virtual int GetMaskFlags() CPL_OVERRIDE;
440 
441  virtual CPLErr CreateMaskBand( int nFlags ) CPL_OVERRIDE;
442 
443  void SetMaskBand(VRTRasterBand* poMaskBand);
444 
445  void SetIsMaskBand();
446 
447  CPLErr UnsetNoDataValue();
448 
449  virtual int CloseDependentDatasets();
450 
451  virtual int IsSourcedRasterBand() { return FALSE; }
452  virtual int IsPansharpenRasterBand() { return FALSE; }
453 };
454 
455 /************************************************************************/
456 /* VRTSourcedRasterBand */
457 /************************************************************************/
458 
459 class VRTSimpleSource;
460 
461 class CPL_DLL VRTSourcedRasterBand : public VRTRasterBand
462 {
463  private:
464  int m_nRecursionCounter;
465  CPLString m_osLastLocationInfo;
466  char **m_papszSourceList;
467 
468  bool CanUseSourcesMinMaxImplementations();
469  void CheckSource( VRTSimpleSource *poSS );
470 
471  public:
472  int nSources;
473  VRTSource **papoSources;
474  int bSkipBufferInitialization;
475 
476  VRTSourcedRasterBand( GDALDataset *poDS, int nBand );
477  VRTSourcedRasterBand( GDALDataType eType,
478  int nXSize, int nYSize );
479  VRTSourcedRasterBand( GDALDataset *poDS, int nBand,
480  GDALDataType eType,
481  int nXSize, int nYSize );
482  virtual ~VRTSourcedRasterBand();
483 
484  virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int,
485  void *, int, int, GDALDataType,
486  GSpacing nPixelSpace, GSpacing nLineSpace,
487  GDALRasterIOExtraArg* psExtraArg) CPL_OVERRIDE;
488 
489  virtual int IGetDataCoverageStatus( int nXOff, int nYOff,
490  int nXSize, int nYSize,
491  int nMaskFlagStop,
492  double* pdfDataPct) CPL_OVERRIDE;
493 
494  virtual char **GetMetadataDomainList() CPL_OVERRIDE;
495  virtual const char *GetMetadataItem( const char * pszName,
496  const char * pszDomain = "" ) CPL_OVERRIDE;
497  virtual char **GetMetadata( const char * pszDomain = "" ) CPL_OVERRIDE;
498  virtual CPLErr SetMetadata( char ** papszMetadata,
499  const char * pszDomain = "" ) CPL_OVERRIDE;
500  virtual CPLErr SetMetadataItem( const char * pszName,
501  const char * pszValue,
502  const char * pszDomain = "" ) CPL_OVERRIDE;
503 
504  virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
505  virtual CPLXMLNode * SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
506 
507  virtual double GetMinimum( int *pbSuccess = NULL ) CPL_OVERRIDE;
508  virtual double GetMaximum(int *pbSuccess = NULL ) CPL_OVERRIDE;
509  virtual CPLErr ComputeRasterMinMax( int bApproxOK, double* adfMinMax ) CPL_OVERRIDE;
510  virtual CPLErr ComputeStatistics( int bApproxOK,
511  double *pdfMin, double *pdfMax,
512  double *pdfMean, double *pdfStdDev,
513  GDALProgressFunc pfnProgress,
514  void *pProgressData ) CPL_OVERRIDE;
515  virtual CPLErr GetHistogram( double dfMin, double dfMax,
516  int nBuckets, GUIntBig * panHistogram,
517  int bIncludeOutOfRange, int bApproxOK,
518  GDALProgressFunc pfnProgress,
519  void *pProgressData ) CPL_OVERRIDE;
520 
521  CPLErr AddSource( VRTSource * );
522  CPLErr AddSimpleSource( GDALRasterBand *poSrcBand,
523  double dfSrcXOff=-1, double dfSrcYOff=-1,
524  double dfSrcXSize=-1, double dfSrcYSize=-1,
525  double dfDstXOff=-1, double dfDstYOff=-1,
526  double dfDstXSize=-1, double dfDstYSize=-1,
527  const char *pszResampling = "near",
528  double dfNoDataValue = VRT_NODATA_UNSET);
529  CPLErr AddComplexSource( GDALRasterBand *poSrcBand,
530  double dfSrcXOff=-1, double dfSrcYOff=-1,
531  double dfSrcXSize=-1, double dfSrcYSize=-1,
532  double dfDstXOff=-1, double dfDstYOff=-1,
533  double dfDstXSize=-1, double dfDstYSize=-1,
534  double dfScaleOff=0.0,
535  double dfScaleRatio=1.0,
536  double dfNoDataValue = VRT_NODATA_UNSET,
537  int nColorTableComponent = 0);
538 
539  CPLErr AddMaskBandSource( GDALRasterBand *poSrcBand,
540  double dfSrcXOff=-1, double dfSrcYOff=-1,
541  double dfSrcXSize=-1,
542  double dfSrcYSize=-1,
543  double dfDstXOff=-1, double dfDstYOff=-1,
544  double dfDstXSize=-1,
545  double dfDstYSize=-1 );
546 
547  CPLErr AddFuncSource( VRTImageReadFunc pfnReadFunc, void *hCBData,
548  double dfNoDataValue = VRT_NODATA_UNSET );
549 
550  void ConfigureSource(VRTSimpleSource *poSimpleSource,
551  GDALRasterBand *poSrcBand,
552  int bAddAsMaskBand,
553  double dfSrcXOff, double dfSrcYOff,
554  double dfSrcXSize, double dfSrcYSize,
555  double dfDstXOff, double dfDstYOff,
556  double dfDstXSize, double dfDstYSize );
557 
558  virtual CPLErr IReadBlock( int, int, void * ) CPL_OVERRIDE;
559 
560  virtual void GetFileList(char*** ppapszFileList, int *pnSize,
561  int *pnMaxSize, CPLHashSet* hSetFiles) CPL_OVERRIDE;
562 
563  virtual int CloseDependentDatasets() CPL_OVERRIDE;
564 
565  virtual int IsSourcedRasterBand() CPL_OVERRIDE { return TRUE; }
566 };
567 
568 /************************************************************************/
569 /* VRTWarpedRasterBand */
570 /************************************************************************/
571 
572 class CPL_DLL VRTWarpedRasterBand : public VRTRasterBand
573 {
574  public:
575  VRTWarpedRasterBand( GDALDataset *poDS, int nBand,
576  GDALDataType eType = GDT_Unknown );
577  virtual ~VRTWarpedRasterBand();
578 
579  virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
580  virtual CPLXMLNode * SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
581 
582  virtual CPLErr IReadBlock( int, int, void * ) CPL_OVERRIDE;
583  virtual CPLErr IWriteBlock( int, int, void * ) CPL_OVERRIDE;
584 
585  virtual int GetOverviewCount() CPL_OVERRIDE;
586  virtual GDALRasterBand *GetOverview(int) CPL_OVERRIDE;
587 };
588 /************************************************************************/
589 /* VRTPansharpenedRasterBand */
590 /************************************************************************/
591 
592 class VRTPansharpenedRasterBand : public VRTRasterBand
593 {
594  int m_nIndexAsPansharpenedBand;
595 
596  public:
597  VRTPansharpenedRasterBand(
598  GDALDataset *poDS, int nBand,
599  GDALDataType eDataType = GDT_Unknown );
600  virtual ~VRTPansharpenedRasterBand();
601 
602  virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
603  virtual CPLXMLNode * SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
604 
605  virtual CPLErr IReadBlock( int, int, void * ) CPL_OVERRIDE;
606 
607  virtual CPLErr IRasterIO( GDALRWFlag eRWFlag,
608  int nXOff, int nYOff, int nXSize, int nYSize,
609  void * pData, int nBufXSize, int nBufYSize,
610  GDALDataType eBufType,
611  GSpacing nPixelSpace, GSpacing nLineSpace,
612  GDALRasterIOExtraArg* psExtraArg) CPL_OVERRIDE;
613 
614  virtual int GetOverviewCount() CPL_OVERRIDE;
615  virtual GDALRasterBand *GetOverview(int) CPL_OVERRIDE;
616 
617  virtual int IsPansharpenRasterBand() CPL_OVERRIDE { return TRUE; }
618 
619  void SetIndexAsPansharpenedBand( int nIdx )
620  { m_nIndexAsPansharpenedBand = nIdx; }
621  int GetIndexAsPansharpenedBand() const
622  { return m_nIndexAsPansharpenedBand; }
623 };
624 
625 /************************************************************************/
626 /* VRTDerivedRasterBand */
627 /************************************************************************/
628 
629 class VRTDerivedRasterBandPrivateData;
630 
631 class CPL_DLL VRTDerivedRasterBand : public VRTSourcedRasterBand
632 {
633  VRTDerivedRasterBandPrivateData* m_poPrivate;
634  bool InitializePython();
635 
636  public:
637  char *pszFuncName;
638  GDALDataType eSourceTransferType;
639 
640  VRTDerivedRasterBand( GDALDataset *poDS, int nBand );
641  VRTDerivedRasterBand( GDALDataset *poDS, int nBand,
642  GDALDataType eType, int nXSize, int nYSize );
643  virtual ~VRTDerivedRasterBand();
644 
645  virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int,
646  void *, int, int, GDALDataType,
647  GSpacing nPixelSpace, GSpacing nLineSpace,
648  GDALRasterIOExtraArg* psExtraArg ) CPL_OVERRIDE;
649 
650  virtual int IGetDataCoverageStatus( int nXOff, int nYOff,
651  int nXSize, int nYSize,
652  int nMaskFlagStop,
653  double* pdfDataPct) CPL_OVERRIDE;
654 
655  static CPLErr AddPixelFunction( const char *pszFuncName,
656  GDALDerivedPixelFunc pfnPixelFunc );
657  static GDALDerivedPixelFunc GetPixelFunction( const char *pszFuncName );
658 
659  void SetPixelFunctionName( const char *pszFuncName );
660  void SetSourceTransferType( GDALDataType eDataType );
661 
662  virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
663  virtual CPLXMLNode * SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
664 
665  virtual double GetMinimum( int *pbSuccess = NULL ) CPL_OVERRIDE;
666  virtual double GetMaximum(int *pbSuccess = NULL ) CPL_OVERRIDE;
667  virtual CPLErr ComputeRasterMinMax( int bApproxOK, double* adfMinMax ) CPL_OVERRIDE;
668  virtual CPLErr ComputeStatistics( int bApproxOK,
669  double *pdfMin, double *pdfMax,
670  double *pdfMean, double *pdfStdDev,
671  GDALProgressFunc pfnProgress,
672  void *pProgressData ) CPL_OVERRIDE;
673  virtual CPLErr GetHistogram( double dfMin, double dfMax,
674  int nBuckets, GUIntBig * panHistogram,
675  int bIncludeOutOfRange, int bApproxOK,
676  GDALProgressFunc pfnProgress,
677  void *pProgressData ) CPL_OVERRIDE;
678 
679  static void Cleanup();
680 };
681 
682 /************************************************************************/
683 /* VRTRawRasterBand */
684 /************************************************************************/
685 
686 class RawRasterBand;
687 
688 class CPL_DLL VRTRawRasterBand : public VRTRasterBand
689 {
690  RawRasterBand *m_poRawRaster;
691 
692  char *m_pszSourceFilename;
693  int m_bRelativeToVRT;
694 
695  public:
696  VRTRawRasterBand( GDALDataset *poDS, int nBand,
697  GDALDataType eType = GDT_Unknown );
698  virtual ~VRTRawRasterBand();
699 
700  virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
701  virtual CPLXMLNode * SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
702 
703  virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int,
704  void *, int, int, GDALDataType,
705  GSpacing nPixelSpace, GSpacing nLineSpace,
706  GDALRasterIOExtraArg* psExtraArg ) CPL_OVERRIDE;
707 
708  virtual CPLErr IReadBlock( int, int, void * ) CPL_OVERRIDE;
709  virtual CPLErr IWriteBlock( int, int, void * ) CPL_OVERRIDE;
710 
711  CPLErr SetRawLink( const char *pszFilename,
712  const char *pszVRTPath,
713  int bRelativeToVRT,
714  vsi_l_offset nImageOffset,
715  int nPixelOffset, int nLineOffset,
716  const char *pszByteOrder );
717 
718  void ClearRawLink();
719 
720  virtual void GetFileList( char*** ppapszFileList, int *pnSize,
721  int *pnMaxSize, CPLHashSet* hSetFiles ) CPL_OVERRIDE;
722 };
723 
724 /************************************************************************/
725 /* VRTDriver */
726 /************************************************************************/
727 
728 class VRTDriver : public GDALDriver
729 {
730  public:
731  VRTDriver();
732  virtual ~VRTDriver();
733 
734  char **papszSourceParsers;
735 
736  virtual char **GetMetadataDomainList() CPL_OVERRIDE;
737  virtual char **GetMetadata( const char * pszDomain = "" ) CPL_OVERRIDE;
738  virtual CPLErr SetMetadata( char ** papszMetadata,
739  const char * pszDomain = "" ) CPL_OVERRIDE;
740 
741  VRTSource *ParseSource( CPLXMLNode *psSrc, const char *pszVRTPath );
742  void AddSourceParser( const char *pszElementName,
743  VRTSourceParser pfnParser );
744 };
745 
746 /************************************************************************/
747 /* VRTSimpleSource */
748 /************************************************************************/
749 
750 class CPL_DLL VRTSimpleSource : public VRTSource
751 {
752 protected:
753  friend class VRTSourcedRasterBand;
754 
755  GDALRasterBand *m_poRasterBand;
756 
757  // When poRasterBand is a mask band, poMaskBandMainBand is the band
758  // from which the mask band is taken.
759  GDALRasterBand *m_poMaskBandMainBand;
760 
761  double m_dfSrcXOff;
762  double m_dfSrcYOff;
763  double m_dfSrcXSize;
764  double m_dfSrcYSize;
765 
766  double m_dfDstXOff;
767  double m_dfDstYOff;
768  double m_dfDstXSize;
769  double m_dfDstYSize;
770 
771  int m_bNoDataSet;
772  double m_dfNoDataValue;
773  CPLString m_osResampling;
774 
775  int m_nMaxValue;
776 
777  int m_bRelativeToVRTOri;
778  CPLString m_osSourceFileNameOri;
779 
780  int NeedMaxValAdjustment() const;
781 
782 public:
783  VRTSimpleSource();
784  VRTSimpleSource( const VRTSimpleSource* poSrcSource,
785  double dfXDstRatio, double dfYDstRatio );
786  virtual ~VRTSimpleSource();
787 
788  virtual CPLErr XMLInit( CPLXMLNode *psTree, const char * ) CPL_OVERRIDE;
789  virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
790 
791  void SetSrcBand( GDALRasterBand * );
792  void SetSrcMaskBand( GDALRasterBand * );
793  void SetSrcWindow( double, double, double, double );
794  void SetDstWindow( double, double, double, double );
795  void SetNoDataValue( double dfNoDataValue );
796  const CPLString& GetResampling() const { return m_osResampling; }
797  void SetResampling( const char* pszResampling );
798 
799  int GetSrcDstWindow( int, int, int, int, int, int,
800  double *pdfReqXOff, double *pdfReqYOff,
801  double *pdfReqXSize, double *pdfReqYSize,
802  int *, int *, int *, int *,
803  int *, int *, int *, int * );
804 
805  virtual CPLErr RasterIO( int nXOff, int nYOff, int nXSize, int nYSize,
806  void *pData, int nBufXSize, int nBufYSize,
807  GDALDataType eBufType,
808  GSpacing nPixelSpace, GSpacing nLineSpace,
809  GDALRasterIOExtraArg* psExtraArg ) CPL_OVERRIDE;
810 
811  virtual double GetMinimum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
812  virtual double GetMaximum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
813  virtual CPLErr ComputeRasterMinMax( int nXSize, int nYSize, int bApproxOK,
814  double* adfMinMax ) CPL_OVERRIDE;
815  virtual CPLErr ComputeStatistics( int nXSize, int nYSize,
816  int bApproxOK,
817  double *pdfMin, double *pdfMax,
818  double *pdfMean, double *pdfStdDev,
819  GDALProgressFunc pfnProgress,
820  void *pProgressData ) CPL_OVERRIDE;
821  virtual CPLErr GetHistogram( int nXSize, int nYSize,
822  double dfMin, double dfMax,
823  int nBuckets, GUIntBig * panHistogram,
824  int bIncludeOutOfRange, int bApproxOK,
825  GDALProgressFunc pfnProgress,
826  void *pProgressData ) CPL_OVERRIDE;
827 
828  void DstToSrc( double dfX, double dfY,
829  double &dfXOut, double &dfYOut );
830  void SrcToDst( double dfX, double dfY,
831  double &dfXOut, double &dfYOut );
832 
833  virtual void GetFileList( char*** ppapszFileList, int *pnSize,
834  int *pnMaxSize, CPLHashSet* hSetFiles ) CPL_OVERRIDE;
835 
836  virtual int IsSimpleSource() CPL_OVERRIDE { return TRUE; }
837  virtual const char* GetType() { return "SimpleSource"; }
838 
839  GDALRasterBand* GetBand();
840  int IsSameExceptBandNumber( VRTSimpleSource* poOtherSource );
841  CPLErr DatasetRasterIO(
842  int nXOff, int nYOff, int nXSize, int nYSize,
843  void * pData, int nBufXSize, int nBufYSize,
844  GDALDataType eBufType,
845  int nBandCount, int *panBandMap,
846  GSpacing nPixelSpace, GSpacing nLineSpace,
847  GSpacing nBandSpace,
848  GDALRasterIOExtraArg* psExtraArg );
849 
850  void UnsetPreservedRelativeFilenames();
851 
852  void SetMaxValue( int nVal ) { m_nMaxValue = nVal; }
853 };
854 
855 /************************************************************************/
856 /* VRTAveragedSource */
857 /************************************************************************/
858 
859 class VRTAveragedSource : public VRTSimpleSource
860 {
861 public:
862  VRTAveragedSource();
863  virtual CPLErr RasterIO( int nXOff, int nYOff, int nXSize, int nYSize,
864  void *pData, int nBufXSize, int nBufYSize,
865  GDALDataType eBufType,
866  GSpacing nPixelSpace, GSpacing nLineSpace,
867  GDALRasterIOExtraArg* psExtraArg ) CPL_OVERRIDE;
868 
869  virtual double GetMinimum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
870  virtual double GetMaximum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
871  virtual CPLErr ComputeRasterMinMax( int nXSize, int nYSize, int bApproxOK,
872  double* adfMinMax ) CPL_OVERRIDE;
873  virtual CPLErr ComputeStatistics( int nXSize, int nYSize,
874  int bApproxOK,
875  double *pdfMin, double *pdfMax,
876  double *pdfMean, double *pdfStdDev,
877  GDALProgressFunc pfnProgress,
878  void *pProgressData ) CPL_OVERRIDE;
879  virtual CPLErr GetHistogram( int nXSize, int nYSize,
880  double dfMin, double dfMax,
881  int nBuckets, GUIntBig * panHistogram,
882  int bIncludeOutOfRange, int bApproxOK,
883  GDALProgressFunc pfnProgress,
884  void *pProgressData ) CPL_OVERRIDE;
885 
886  virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
887  virtual const char* GetType() CPL_OVERRIDE { return "AveragedSource"; }
888 };
889 
890 /************************************************************************/
891 /* VRTComplexSource */
892 /************************************************************************/
893 
894 typedef enum
895 {
896  VRT_SCALING_NONE,
897  VRT_SCALING_LINEAR,
898  VRT_SCALING_EXPONENTIAL,
899 } VRTComplexSourceScaling;
900 
901 class CPL_DLL VRTComplexSource : public VRTSimpleSource
902 {
903 protected:
904  VRTComplexSourceScaling m_eScalingType;
905  double m_dfScaleOff; // For linear scaling.
906  double m_dfScaleRatio; // For linear scaling.
907 
908  // For non-linear scaling with a power function.
909  int m_bSrcMinMaxDefined;
910  double m_dfSrcMin;
911  double m_dfSrcMax;
912  double m_dfDstMin;
913  double m_dfDstMax;
914  double m_dfExponent;
915 
916  int m_nColorTableComponent;
917 
918  template <class WorkingDT>
919  CPLErr RasterIOInternal( int nReqXOff, int nReqYOff,
920  int nReqXSize, int nReqYSize,
921  void *pData, int nOutXSize, int nOutYSize,
922  GDALDataType eBufType,
923  GSpacing nPixelSpace, GSpacing nLineSpace,
924  GDALRasterIOExtraArg* psExtraArg,
925  GDALDataType eWrkDataType );
926 
927 public:
928  VRTComplexSource();
929  VRTComplexSource(const VRTComplexSource* poSrcSource,
930  double dfXDstRatio, double dfYDstRatio);
931  virtual ~VRTComplexSource();
932 
933  virtual CPLErr RasterIO( int nXOff, int nYOff, int nXSize, int nYSize,
934  void *pData, int nBufXSize, int nBufYSize,
935  GDALDataType eBufType,
936  GSpacing nPixelSpace, GSpacing nLineSpace,
937  GDALRasterIOExtraArg* psExtraArg ) CPL_OVERRIDE;
938 
939  virtual double GetMinimum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
940  virtual double GetMaximum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
941  virtual CPLErr ComputeRasterMinMax( int nXSize, int nYSize, int bApproxOK,
942  double* adfMinMax ) CPL_OVERRIDE;
943  virtual CPLErr ComputeStatistics( int nXSize, int nYSize,
944  int bApproxOK,
945  double *pdfMin, double *pdfMax,
946  double *pdfMean, double *pdfStdDev,
947  GDALProgressFunc pfnProgress,
948  void *pProgressData ) CPL_OVERRIDE;
949  virtual CPLErr GetHistogram( int nXSize, int nYSize,
950  double dfMin, double dfMax,
951  int nBuckets, GUIntBig * panHistogram,
952  int bIncludeOutOfRange, int bApproxOK,
953  GDALProgressFunc pfnProgress,
954  void *pProgressData ) CPL_OVERRIDE;
955 
956  virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
957  virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
958  virtual const char* GetType() CPL_OVERRIDE { return "ComplexSource"; }
959 
960  double LookupValue( double dfInput );
961 
962  void SetLinearScaling( double dfOffset, double dfScale );
963  void SetPowerScaling( double dfExponent,
964  double dfSrcMin,
965  double dfSrcMax,
966  double dfDstMin,
967  double dfDstMax );
968  void SetColorTableComponent( int nComponent );
969 
970  double *m_padfLUTInputs;
971  double *m_padfLUTOutputs;
972  int m_nLUTItemCount;
973 };
974 
975 /************************************************************************/
976 /* VRTFilteredSource */
977 /************************************************************************/
978 
979 class VRTFilteredSource : public VRTComplexSource
980 {
981 private:
982  int IsTypeSupported( GDALDataType eType );
983 
984 protected:
985  int m_nSupportedTypesCount;
986  GDALDataType m_aeSupportedTypes[20];
987 
988  int m_nExtraEdgePixels;
989 
990 public:
991  VRTFilteredSource();
992  virtual ~VRTFilteredSource();
993 
994  void SetExtraEdgePixels( int );
995  void SetFilteringDataTypesSupported( int, GDALDataType * );
996 
997  virtual CPLErr FilterData( int nXSize, int nYSize, GDALDataType eType,
998  GByte *pabySrcData, GByte *pabyDstData ) = 0;
999 
1000  virtual CPLErr RasterIO( int nXOff, int nYOff, int nXSize, int nYSize,
1001  void *pData, int nBufXSize, int nBufYSize,
1002  GDALDataType eBufType,
1003  GSpacing nPixelSpace, GSpacing nLineSpace,
1004  GDALRasterIOExtraArg* psExtraArg ) CPL_OVERRIDE;
1005 };
1006 
1007 /************************************************************************/
1008 /* VRTKernelFilteredSource */
1009 /************************************************************************/
1010 
1011 class VRTKernelFilteredSource : public VRTFilteredSource
1012 {
1013 protected:
1014  int m_nKernelSize;
1015 
1016  double *m_padfKernelCoefs;
1017 
1018  int m_bNormalized;
1019 
1020 public:
1021  VRTKernelFilteredSource();
1022  virtual ~VRTKernelFilteredSource();
1023 
1024  virtual CPLErr XMLInit( CPLXMLNode *psTree, const char * ) CPL_OVERRIDE;
1025  virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
1026 
1027  virtual CPLErr FilterData( int nXSize, int nYSize, GDALDataType eType,
1028  GByte *pabySrcData, GByte *pabyDstData ) CPL_OVERRIDE;
1029 
1030  CPLErr SetKernel( int nKernelSize, double *padfCoefs );
1031  void SetNormalized( int );
1032 };
1033 
1034 /************************************************************************/
1035 /* VRTAverageFilteredSource */
1036 /************************************************************************/
1037 
1038 class VRTAverageFilteredSource : public VRTKernelFilteredSource
1039 {
1040 public:
1041  explicit VRTAverageFilteredSource( int nKernelSize );
1042  virtual ~VRTAverageFilteredSource();
1043 
1044  virtual CPLErr XMLInit( CPLXMLNode *psTree, const char * ) CPL_OVERRIDE;
1045  virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
1046 };
1047 
1048 /************************************************************************/
1049 /* VRTFuncSource */
1050 /************************************************************************/
1051 class VRTFuncSource : public VRTSource
1052 {
1053 public:
1054  VRTFuncSource();
1055  virtual ~VRTFuncSource();
1056 
1057  virtual CPLErr XMLInit( CPLXMLNode *, const char *) CPL_OVERRIDE { return CE_Failure; }
1058  virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
1059 
1060  virtual CPLErr RasterIO( int nXOff, int nYOff, int nXSize, int nYSize,
1061  void *pData, int nBufXSize, int nBufYSize,
1062  GDALDataType eBufType,
1063  GSpacing nPixelSpace, GSpacing nLineSpace,
1064  GDALRasterIOExtraArg* psExtraArg ) CPL_OVERRIDE;
1065 
1066  virtual double GetMinimum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
1067  virtual double GetMaximum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
1068  virtual CPLErr ComputeRasterMinMax( int nXSize, int nYSize, int bApproxOK,
1069  double* adfMinMax ) CPL_OVERRIDE;
1070  virtual CPLErr ComputeStatistics( int nXSize, int nYSize,
1071  int bApproxOK,
1072  double *pdfMin, double *pdfMax,
1073  double *pdfMean, double *pdfStdDev,
1074  GDALProgressFunc pfnProgress,
1075  void *pProgressData ) CPL_OVERRIDE;
1076  virtual CPLErr GetHistogram( int nXSize, int nYSize,
1077  double dfMin, double dfMax,
1078  int nBuckets, GUIntBig * panHistogram,
1079  int bIncludeOutOfRange, int bApproxOK,
1080  GDALProgressFunc pfnProgress,
1081  void *pProgressData ) CPL_OVERRIDE;
1082 
1083  VRTImageReadFunc pfnReadFunc;
1084  void *pCBData;
1085  GDALDataType eType;
1086 
1087  float fNoDataValue;
1088 };
1089 
1090 #endif /* #ifndef DOXYGEN_SKIP */
1091 
1092 #endif /* ndef VIRTUALDATASET_H_INCLUDED */
CPLErr(* VRTImageReadFunc)(void *hCBData, int nXOff, int nYOff, int nXSize, int nYSize, void *pData)
Type for a function that returns the pixel data in a provided window.
Definition: gdal_vrt.h:51
GDALDataType
Definition: gdal.h:57
Document node structure.
Definition: cpl_minixml.h:66
virtual void FlushCache(void)
Flush all write cached data to disk.
Definition: gdaldataset.cpp:430
C++ GDAL entry points.
#define CPL_OVERRIDE
To be used in public headers only.
Definition: cpl_port.h:1048
virtual const char * GetProjectionRef(void)
Fetch the projection definition string for this dataset.
Definition: gdaldataset.cpp:857
GDALRWFlag
Definition: gdal.h:105
CPLErr(* GDALDerivedPixelFunc)(void **papoSources, int nSources, void *pData, int nBufXSize, int nBufYSize, GDALDataType eSrcType, GDALDataType eBufType, int nPixelSpace, int nLineSpace)
Type of functions to pass to GDALAddDerivedBandPixelFunc.
Definition: gdal.h:720
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:207
void * GDALRasterBandH
Opaque type used for the C bindings of the C++ GDALRasterBand class.
Definition: gdal.h:244
Pansharpening operation class.
Definition: gdalpansharpen.h:188
Convenient string class based on std::string.
Definition: cpl_string.h:355
Hash set implementation.
Definition: gdal.h:58
#define VRT_NODATA_UNSET
Special value to indicate that nodata is not set.
Definition: gdal_vrt.h:45
GIntBig GSpacing
Type to express pixel, line or band spacing.
Definition: gdal.h:259
int Dereference()
Subtract one from dataset reference count.
Definition: gdaldataset.cpp:1163
Class for dataset open functions.
Definition: gdal_priv.h:246
Structure to pass extra arguments to RasterIO() method.
Definition: gdal.h:133
High level image warping class.
Definition: gdalwarper.h:417
virtual int CloseDependentDatasets()
Drop references to any other datasets referenced by this dataset.
Definition: gdaldataset.cpp:3373
virtual CPLErr CreateMaskBand(int nFlagsIn)
Adds a mask band to the dataset.
Definition: gdaldataset.cpp:2430
unsigned long long GUIntBig
Large unsigned integer type (generally 64-bit unsigned integer type).
Definition: cpl_port.h:253
void GDALClose(GDALDatasetH)
Close GDAL dataset.
Definition: gdaldataset.cpp:3000
Object with metadata.
Definition: gdal_priv.h:125
GDALDataset * GetDataset()
Fetch the owning dataset handle.
Definition: gdalrasterband.cpp:2834
GUIntBig vsi_l_offset
Type for a file offset.
Definition: cpl_vsi.h:138
A single raster band (or channel).
Definition: gdal_priv.h:827
GDALAccess
Definition: gdal.h:99
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:322
GDALColorInterp
Definition: gdal.h:176
virtual CPLErr SetNoDataValue(double dfNoData)
Set the no data value for this band.
Definition: gdalrasterband.cpp:1677
Public (C callable) entry points for virtual GDAL dataset objects.
struct _CPLHashSet CPLHashSet
Opaque type for a hash set.
Definition: cpl_hash_set.h:52
int GetShared() const
Returns shared flag.
Definition: gdaldataset.cpp:1193
Definition: gdal.h:100
Format specific driver.
Definition: gdal_priv.h:1158
A color table / palette.
Definition: gdal_priv.h:747
Ground Control Point.
Definition: gdal.h:515
CPLErr
Error category.
Definition: cpl_error.h:52

Generated for GDAL by doxygen 1.8.8.