GDAL

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

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

Generated for GDAL by 1.8.8.