GDAL

- Main Page
- Related Pages
- Classes
- Files
- Download
- Issue Tracker

- File List
- File Members

vrtdataset.h
1 /******************************************************************************
2 * $Id: vrtdataset.h 37723 2017-03-16 17:07:53Z 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 struct VerticalShiftGrid
244 {
245 CPLString osVGrids;
246 int bInverse;
247 double dfToMeterSrc;
248 double dfToMeterDest;
249 CPLStringList aosOptions;
250 };
251 std::vector<VerticalShiftGrid> m_aoVerticalShiftGrids;
252
253 friend class VRTWarpedRasterBand;
254
255 protected:
256 virtual int CloseDependentDatasets() CPL_OVERRIDE;
257
258 public:
259 VRTWarpedDataset( int nXSize, int nYSize );
260 virtual ~VRTWarpedDataset();
261
262 CPLErr Initialize( /* GDALWarpOptions */ void * );
263
264 virtual CPLErr IBuildOverviews( const char *, int, int *,
265 int, int *, GDALProgressFunc, void * ) CPL_OVERRIDE;
266
267 virtual CPLErr SetMetadataItem( const char *pszName, const char *pszValue,
268 const char *pszDomain = "" ) CPL_OVERRIDE;
269
270 virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
271 virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
272
273 virtual CPLErr AddBand( GDALDataType eType,
274 char **papszOptions=NULL ) CPL_OVERRIDE;
275
276 virtual char **GetFileList() CPL_OVERRIDE;
277
278 CPLErr ProcessBlock( int iBlockX, int iBlockY );
279
280 void GetBlockSize( int *, int * );
281
282 void SetApplyVerticalShiftGrid(const char* pszVGrids,
283 int bInverse,
284 double dfToMeterSrc,
285 double dfToMeterDest,
286 char** papszOptions );
287 };
288
289 /************************************************************************/
290 /* VRTPansharpenedDataset */
291 /************************************************************************/
292
293 class GDALPansharpenOperation;
294
295 typedef enum
296 {
297 GTAdjust_Union,
298 GTAdjust_Intersection,
299 GTAdjust_None,
300 GTAdjust_NoneWithoutWarning
301 } GTAdjustment;
302
303 class VRTPansharpenedDataset : public VRTDataset
304 {
305 friend class VRTPansharpenedRasterBand;
306
307 int m_nBlockXSize;
308 int m_nBlockYSize;
309 GDALPansharpenOperation* m_poPansharpener;
310 VRTPansharpenedDataset* m_poMainDataset;
311 std::vector<VRTPansharpenedDataset*> m_apoOverviewDatasets;
312 // Map from absolute to relative.
313 std::map<CPLString,CPLString> m_oMapToRelativeFilenames;
314
315 int m_bLoadingOtherBands;
316
317 GByte *m_pabyLastBufferBandRasterIO;
318 int m_nLastBandRasterIOXOff;
319 int m_nLastBandRasterIOYOff;
320 int m_nLastBandRasterIOXSize;
321 int m_nLastBandRasterIOYSize;
322 GDALDataType m_eLastBandRasterIODataType;
323
324 GTAdjustment m_eGTAdjustment;
325 int m_bNoDataDisabled;
326
327 std::vector<GDALDataset*> m_apoDatasetsToClose;
328
329 protected:
330 virtual int CloseDependentDatasets() CPL_OVERRIDE;
331
332 public:
333 VRTPansharpenedDataset( int nXSize, int nYSize );
334 virtual ~VRTPansharpenedDataset();
335
336 virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
337 virtual CPLXMLNode * SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
338
339 CPLErr XMLInit( CPLXMLNode *psTree, const char *pszVRTPath,
340 GDALRasterBandH hPanchroBandIn,
341 int nInputSpectralBandsIn,
342 GDALRasterBandH* pahInputSpectralBandsIn );
343
344 virtual CPLErr AddBand( GDALDataType eType,
345 char **papszOptions=NULL ) CPL_OVERRIDE;
346
347 virtual char **GetFileList() CPL_OVERRIDE;
348
349 virtual CPLErr IRasterIO( GDALRWFlag eRWFlag,
350 int nXOff, int nYOff, int nXSize, int nYSize,
351 void * pData, int nBufXSize, int nBufYSize,
352 GDALDataType eBufType,
353 int nBandCount, int *panBandMap,
354 GSpacing nPixelSpace, GSpacing nLineSpace,
355 GSpacing nBandSpace,
356 GDALRasterIOExtraArg* psExtraArg) CPL_OVERRIDE;
357
358 void GetBlockSize( int *, int * );
359
360 GDALPansharpenOperation* GetPansharpener() { return m_poPansharpener; }
361 };
362
363 /************************************************************************/
364 /* VRTRasterBand */
365 /* */
366 /* Provides support for all the various kinds of metadata but */
367 /* no raster access. That is handled by derived classes. */
368 /************************************************************************/
369
370 class CPL_DLL VRTRasterBand : public GDALRasterBand
371 {
372 protected:
373 int m_bIsMaskBand;
374
375 int m_bNoDataValueSet;
376 // If set to true, will not report the existence of nodata.
377 int m_bHideNoDataValue;
378 double m_dfNoDataValue;
379
380 GDALColorTable *m_poColorTable;
381
382 GDALColorInterp m_eColorInterp;
383
384 char *m_pszUnitType;
385 char **m_papszCategoryNames;
386
387 double m_dfOffset;
388 double m_dfScale;
389
390 CPLXMLNode *m_psSavedHistograms;
391
392 void Initialize( int nXSize, int nYSize );
393
394 std::vector<VRTOverviewInfo> m_apoOverviews;
395
396 VRTRasterBand *m_poMaskBand;
397
398 public:
399
400 VRTRasterBand();
401 virtual ~VRTRasterBand();
402
403 virtual CPLErr XMLInit( CPLXMLNode *, const char * );
404 virtual CPLXMLNode * SerializeToXML( const char *pszVRTPath );
405
406 virtual CPLErr SetNoDataValue( double ) CPL_OVERRIDE;
407 virtual double GetNoDataValue( int *pbSuccess = NULL ) CPL_OVERRIDE;
408 virtual CPLErr DeleteNoDataValue() CPL_OVERRIDE;
409
410 virtual CPLErr SetColorTable( GDALColorTable * ) CPL_OVERRIDE;
411 virtual GDALColorTable *GetColorTable() CPL_OVERRIDE;
412
413 virtual CPLErr SetColorInterpretation( GDALColorInterp ) CPL_OVERRIDE;
414 virtual GDALColorInterp GetColorInterpretation() CPL_OVERRIDE;
415
416 virtual const char *GetUnitType() CPL_OVERRIDE;
417 CPLErr SetUnitType( const char * ) CPL_OVERRIDE;
418
419 virtual char **GetCategoryNames() CPL_OVERRIDE;
420 virtual CPLErr SetCategoryNames( char ** ) CPL_OVERRIDE;
421
422 virtual CPLErr SetMetadata( char **papszMD, const char *pszDomain = "" ) CPL_OVERRIDE;
423 virtual CPLErr SetMetadataItem( const char *pszName, const char *pszValue,
424 const char *pszDomain = "" ) CPL_OVERRIDE;
425
426 virtual double GetOffset( int *pbSuccess = NULL ) CPL_OVERRIDE;
427 CPLErr SetOffset( double ) CPL_OVERRIDE;
428 virtual double GetScale( int *pbSuccess = NULL ) CPL_OVERRIDE;
429 CPLErr SetScale( double ) CPL_OVERRIDE;
430
431 virtual int GetOverviewCount() CPL_OVERRIDE;
432 virtual GDALRasterBand *GetOverview(int) CPL_OVERRIDE;
433
434 virtual CPLErr GetHistogram( double dfMin, double dfMax,
435 int nBuckets, GUIntBig * panHistogram,
436 int bIncludeOutOfRange, int bApproxOK,
437 GDALProgressFunc, void *pProgressData ) CPL_OVERRIDE;
438
439 virtual CPLErr GetDefaultHistogram( double *pdfMin, double *pdfMax,
440 int *pnBuckets, GUIntBig ** ppanHistogram,
441 int bForce,
442 GDALProgressFunc, void *pProgressData) CPL_OVERRIDE;
443
444 virtual CPLErr SetDefaultHistogram( double dfMin, double dfMax,
445 int nBuckets, GUIntBig *panHistogram ) CPL_OVERRIDE;
446
447 CPLErr CopyCommonInfoFrom( GDALRasterBand * );
448
449 virtual void GetFileList(char*** ppapszFileList, int *pnSize,
450 int *pnMaxSize, CPLHashSet* hSetFiles);
451
452 virtual void SetDescription( const char * ) CPL_OVERRIDE;
453
454 virtual GDALRasterBand *GetMaskBand() CPL_OVERRIDE;
455 virtual int GetMaskFlags() CPL_OVERRIDE;
456
457 virtual CPLErr CreateMaskBand( int nFlags ) CPL_OVERRIDE;
458
459 void SetMaskBand(VRTRasterBand* poMaskBand);
460
461 void SetIsMaskBand();
462
463 CPLErr UnsetNoDataValue();
464
465 virtual int CloseDependentDatasets();
466
467 virtual int IsSourcedRasterBand() { return FALSE; }
468 virtual int IsPansharpenRasterBand() { return FALSE; }
469 };
470
471 /************************************************************************/
472 /* VRTSourcedRasterBand */
473 /************************************************************************/
474
475 class VRTSimpleSource;
476
477 class CPL_DLL VRTSourcedRasterBand : public VRTRasterBand
478 {
479 private:
480 int m_nRecursionCounter;
481 CPLString m_osLastLocationInfo;
482 char **m_papszSourceList;
483
484 bool CanUseSourcesMinMaxImplementations();
485 void CheckSource( VRTSimpleSource *poSS );
486
487 public:
488 int nSources;
489 VRTSource **papoSources;
490 int bSkipBufferInitialization;
491
492 VRTSourcedRasterBand( GDALDataset *poDS, int nBand );
493 VRTSourcedRasterBand( GDALDataType eType,
494 int nXSize, int nYSize );
495 VRTSourcedRasterBand( GDALDataset *poDS, int nBand,
496 GDALDataType eType,
497 int nXSize, int nYSize );
498 virtual ~VRTSourcedRasterBand();
499
500 virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int,
501 void *, int, int, GDALDataType,
502 GSpacing nPixelSpace, GSpacing nLineSpace,
503 GDALRasterIOExtraArg* psExtraArg) CPL_OVERRIDE;
504
505 virtual int IGetDataCoverageStatus( int nXOff, int nYOff,
506 int nXSize, int nYSize,
507 int nMaskFlagStop,
508 double* pdfDataPct) CPL_OVERRIDE;
509
510 virtual char **GetMetadataDomainList() CPL_OVERRIDE;
511 virtual const char *GetMetadataItem( const char * pszName,
512 const char * pszDomain = "" ) CPL_OVERRIDE;
513 virtual char **GetMetadata( const char * pszDomain = "" ) CPL_OVERRIDE;
514 virtual CPLErr SetMetadata( char ** papszMetadata,
515 const char * pszDomain = "" ) CPL_OVERRIDE;
516 virtual CPLErr SetMetadataItem( const char * pszName,
517 const char * pszValue,
518 const char * pszDomain = "" ) CPL_OVERRIDE;
519
520 virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
521 virtual CPLXMLNode * SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
522
523 virtual double GetMinimum( int *pbSuccess = NULL ) CPL_OVERRIDE;
524 virtual double GetMaximum(int *pbSuccess = NULL ) CPL_OVERRIDE;
525 virtual CPLErr ComputeRasterMinMax( int bApproxOK, double* adfMinMax ) CPL_OVERRIDE;
526 virtual CPLErr ComputeStatistics( int bApproxOK,
527 double *pdfMin, double *pdfMax,
528 double *pdfMean, double *pdfStdDev,
529 GDALProgressFunc pfnProgress,
530 void *pProgressData ) CPL_OVERRIDE;
531 virtual CPLErr GetHistogram( double dfMin, double dfMax,
532 int nBuckets, GUIntBig * panHistogram,
533 int bIncludeOutOfRange, int bApproxOK,
534 GDALProgressFunc pfnProgress,
535 void *pProgressData ) CPL_OVERRIDE;
536
537 CPLErr AddSource( VRTSource * );
538 CPLErr AddSimpleSource( GDALRasterBand *poSrcBand,
539 double dfSrcXOff=-1, double dfSrcYOff=-1,
540 double dfSrcXSize=-1, double dfSrcYSize=-1,
541 double dfDstXOff=-1, double dfDstYOff=-1,
542 double dfDstXSize=-1, double dfDstYSize=-1,
543 const char *pszResampling = "near",
544 double dfNoDataValue = VRT_NODATA_UNSET);
545 CPLErr AddComplexSource( GDALRasterBand *poSrcBand,
546 double dfSrcXOff=-1, double dfSrcYOff=-1,
547 double dfSrcXSize=-1, double dfSrcYSize=-1,
548 double dfDstXOff=-1, double dfDstYOff=-1,
549 double dfDstXSize=-1, double dfDstYSize=-1,
550 double dfScaleOff=0.0,
551 double dfScaleRatio=1.0,
552 double dfNoDataValue = VRT_NODATA_UNSET,
553 int nColorTableComponent = 0);
554
555 CPLErr AddMaskBandSource( GDALRasterBand *poSrcBand,
556 double dfSrcXOff=-1, double dfSrcYOff=-1,
557 double dfSrcXSize=-1,
558 double dfSrcYSize=-1,
559 double dfDstXOff=-1, double dfDstYOff=-1,
560 double dfDstXSize=-1,
561 double dfDstYSize=-1 );
562
563 CPLErr AddFuncSource( VRTImageReadFunc pfnReadFunc, void *hCBData,
564 double dfNoDataValue = VRT_NODATA_UNSET );
565
566 void ConfigureSource(VRTSimpleSource *poSimpleSource,
567 GDALRasterBand *poSrcBand,
568 int bAddAsMaskBand,
569 double dfSrcXOff, double dfSrcYOff,
570 double dfSrcXSize, double dfSrcYSize,
571 double dfDstXOff, double dfDstYOff,
572 double dfDstXSize, double dfDstYSize );
573
574 virtual CPLErr IReadBlock( int, int, void * ) CPL_OVERRIDE;
575
576 virtual void GetFileList(char*** ppapszFileList, int *pnSize,
577 int *pnMaxSize, CPLHashSet* hSetFiles) CPL_OVERRIDE;
578
579 virtual int CloseDependentDatasets() CPL_OVERRIDE;
580
581 virtual int IsSourcedRasterBand() CPL_OVERRIDE { return TRUE; }
582 };
583
584 /************************************************************************/
585 /* VRTWarpedRasterBand */
586 /************************************************************************/
587
588 class CPL_DLL VRTWarpedRasterBand : public VRTRasterBand
589 {
590 public:
591 VRTWarpedRasterBand( GDALDataset *poDS, int nBand,
592 GDALDataType eType = GDT_Unknown );
593 virtual ~VRTWarpedRasterBand();
594
595 virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
596 virtual CPLXMLNode * SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
597
598 virtual CPLErr IReadBlock( int, int, void * ) CPL_OVERRIDE;
599 virtual CPLErr IWriteBlock( int, int, void * ) CPL_OVERRIDE;
600
601 virtual int GetOverviewCount() CPL_OVERRIDE;
602 virtual GDALRasterBand *GetOverview(int) CPL_OVERRIDE;
603 };
604 /************************************************************************/
605 /* VRTPansharpenedRasterBand */
606 /************************************************************************/
607
608 class VRTPansharpenedRasterBand : public VRTRasterBand
609 {
610 int m_nIndexAsPansharpenedBand;
611
612 public:
613 VRTPansharpenedRasterBand(
614 GDALDataset *poDS, int nBand,
615 GDALDataType eDataType = GDT_Unknown );
616 virtual ~VRTPansharpenedRasterBand();
617
618 virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
619 virtual CPLXMLNode * SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
620
621 virtual CPLErr IReadBlock( int, int, void * ) CPL_OVERRIDE;
622
623 virtual CPLErr IRasterIO( GDALRWFlag eRWFlag,
624 int nXOff, int nYOff, int nXSize, int nYSize,
625 void * pData, int nBufXSize, int nBufYSize,
626 GDALDataType eBufType,
627 GSpacing nPixelSpace, GSpacing nLineSpace,
628 GDALRasterIOExtraArg* psExtraArg) CPL_OVERRIDE;
629
630 virtual int GetOverviewCount() CPL_OVERRIDE;
631 virtual GDALRasterBand *GetOverview(int) CPL_OVERRIDE;
632
633 virtual int IsPansharpenRasterBand() CPL_OVERRIDE { return TRUE; }
634
635 void SetIndexAsPansharpenedBand( int nIdx )
636 { m_nIndexAsPansharpenedBand = nIdx; }
637 int GetIndexAsPansharpenedBand() const
638 { return m_nIndexAsPansharpenedBand; }
639 };
640
641 /************************************************************************/
642 /* VRTDerivedRasterBand */
643 /************************************************************************/
644
645 class VRTDerivedRasterBandPrivateData;
646
647 class CPL_DLL VRTDerivedRasterBand : public VRTSourcedRasterBand
648 {
649 VRTDerivedRasterBandPrivateData* m_poPrivate;
650 bool InitializePython();
651
652 public:
653 char *pszFuncName;
654 GDALDataType eSourceTransferType;
655
656 VRTDerivedRasterBand( GDALDataset *poDS, int nBand );
657 VRTDerivedRasterBand( GDALDataset *poDS, int nBand,
658 GDALDataType eType, int nXSize, int nYSize );
659 virtual ~VRTDerivedRasterBand();
660
661 virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int,
662 void *, int, int, GDALDataType,
663 GSpacing nPixelSpace, GSpacing nLineSpace,
664 GDALRasterIOExtraArg* psExtraArg ) CPL_OVERRIDE;
665
666 virtual int IGetDataCoverageStatus( int nXOff, int nYOff,
667 int nXSize, int nYSize,
668 int nMaskFlagStop,
669 double* pdfDataPct) CPL_OVERRIDE;
670
671 static CPLErr AddPixelFunction( const char *pszFuncName,
672 GDALDerivedPixelFunc pfnPixelFunc );
673 static GDALDerivedPixelFunc GetPixelFunction( const char *pszFuncName );
674
675 void SetPixelFunctionName( const char *pszFuncName );
676 void SetSourceTransferType( GDALDataType eDataType );
677
678 virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
679 virtual CPLXMLNode * SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
680
681 virtual double GetMinimum( int *pbSuccess = NULL ) CPL_OVERRIDE;
682 virtual double GetMaximum(int *pbSuccess = NULL ) CPL_OVERRIDE;
683 virtual CPLErr ComputeRasterMinMax( int bApproxOK, double* adfMinMax ) CPL_OVERRIDE;
684 virtual CPLErr ComputeStatistics( int bApproxOK,
685 double *pdfMin, double *pdfMax,
686 double *pdfMean, double *pdfStdDev,
687 GDALProgressFunc pfnProgress,
688 void *pProgressData ) CPL_OVERRIDE;
689 virtual CPLErr GetHistogram( double dfMin, double dfMax,
690 int nBuckets, GUIntBig * panHistogram,
691 int bIncludeOutOfRange, int bApproxOK,
692 GDALProgressFunc pfnProgress,
693 void *pProgressData ) CPL_OVERRIDE;
694
695 static void Cleanup();
696 };
697
698 /************************************************************************/
699 /* VRTRawRasterBand */
700 /************************************************************************/
701
702 class RawRasterBand;
703
704 class CPL_DLL VRTRawRasterBand : public VRTRasterBand
705 {
706 RawRasterBand *m_poRawRaster;
707
708 char *m_pszSourceFilename;
709 int m_bRelativeToVRT;
710
711 public:
712 VRTRawRasterBand( GDALDataset *poDS, int nBand,
713 GDALDataType eType = GDT_Unknown );
714 virtual ~VRTRawRasterBand();
715
716 virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
717 virtual CPLXMLNode * SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
718
719 virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int,
720 void *, int, int, GDALDataType,
721 GSpacing nPixelSpace, GSpacing nLineSpace,
722 GDALRasterIOExtraArg* psExtraArg ) CPL_OVERRIDE;
723
724 virtual CPLErr IReadBlock( int, int, void * ) CPL_OVERRIDE;
725 virtual CPLErr IWriteBlock( int, int, void * ) CPL_OVERRIDE;
726
727 CPLErr SetRawLink( const char *pszFilename,
728 const char *pszVRTPath,
729 int bRelativeToVRT,
730 vsi_l_offset nImageOffset,
731 int nPixelOffset, int nLineOffset,
732 const char *pszByteOrder );
733
734 void ClearRawLink();
735
736 virtual void GetFileList( char*** ppapszFileList, int *pnSize,
737 int *pnMaxSize, CPLHashSet* hSetFiles ) CPL_OVERRIDE;
738 };
739
740 /************************************************************************/
741 /* VRTDriver */
742 /************************************************************************/
743
744 class VRTDriver : public GDALDriver
745 {
746 public:
747 VRTDriver();
748 virtual ~VRTDriver();
749
750 char **papszSourceParsers;
751
752 virtual char **GetMetadataDomainList() CPL_OVERRIDE;
753 virtual char **GetMetadata( const char * pszDomain = "" ) CPL_OVERRIDE;
754 virtual CPLErr SetMetadata( char ** papszMetadata,
755 const char * pszDomain = "" ) CPL_OVERRIDE;
756
757 VRTSource *ParseSource( CPLXMLNode *psSrc, const char *pszVRTPath );
758 void AddSourceParser( const char *pszElementName,
759 VRTSourceParser pfnParser );
760 };
761
762 /************************************************************************/
763 /* VRTSimpleSource */
764 /************************************************************************/
765
766 class CPL_DLL VRTSimpleSource : public VRTSource
767 {
768 protected:
769 friend class VRTSourcedRasterBand;
770
771 GDALRasterBand *m_poRasterBand;
772
773 // When poRasterBand is a mask band, poMaskBandMainBand is the band
774 // from which the mask band is taken.
775 GDALRasterBand *m_poMaskBandMainBand;
776
777 double m_dfSrcXOff;
778 double m_dfSrcYOff;
779 double m_dfSrcXSize;
780 double m_dfSrcYSize;
781
782 double m_dfDstXOff;
783 double m_dfDstYOff;
784 double m_dfDstXSize;
785 double m_dfDstYSize;
786
787 int m_bNoDataSet;
788 double m_dfNoDataValue;
789 CPLString m_osResampling;
790
791 int m_nMaxValue;
792
793 int m_bRelativeToVRTOri;
794 CPLString m_osSourceFileNameOri;
795
796 int NeedMaxValAdjustment() const;
797
798 public:
799 VRTSimpleSource();
800 VRTSimpleSource( const VRTSimpleSource* poSrcSource,
801 double dfXDstRatio, double dfYDstRatio );
802 virtual ~VRTSimpleSource();
803
804 virtual CPLErr XMLInit( CPLXMLNode *psTree, const char * ) CPL_OVERRIDE;
805 virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
806
807 void SetSrcBand( GDALRasterBand * );
808 void SetSrcMaskBand( GDALRasterBand * );
809 void SetSrcWindow( double, double, double, double );
810 void SetDstWindow( double, double, double, double );
811 void SetNoDataValue( double dfNoDataValue );
812 const CPLString& GetResampling() const { return m_osResampling; }
813 void SetResampling( const char* pszResampling );
814
815 int GetSrcDstWindow( int, int, int, int, int, int,
816 double *pdfReqXOff, double *pdfReqYOff,
817 double *pdfReqXSize, double *pdfReqYSize,
818 int *, int *, int *, int *,
819 int *, int *, int *, int * );
820
821 virtual CPLErr RasterIO( int nXOff, int nYOff, int nXSize, int nYSize,
822 void *pData, int nBufXSize, int nBufYSize,
823 GDALDataType eBufType,
824 GSpacing nPixelSpace, GSpacing nLineSpace,
825 GDALRasterIOExtraArg* psExtraArg ) CPL_OVERRIDE;
826
827 virtual double GetMinimum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
828 virtual double GetMaximum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
829 virtual CPLErr ComputeRasterMinMax( int nXSize, int nYSize, int bApproxOK,
830 double* adfMinMax ) CPL_OVERRIDE;
831 virtual CPLErr ComputeStatistics( int nXSize, int nYSize,
832 int bApproxOK,
833 double *pdfMin, double *pdfMax,
834 double *pdfMean, double *pdfStdDev,
835 GDALProgressFunc pfnProgress,
836 void *pProgressData ) CPL_OVERRIDE;
837 virtual CPLErr GetHistogram( int nXSize, int nYSize,
838 double dfMin, double dfMax,
839 int nBuckets, GUIntBig * panHistogram,
840 int bIncludeOutOfRange, int bApproxOK,
841 GDALProgressFunc pfnProgress,
842 void *pProgressData ) CPL_OVERRIDE;
843
844 void DstToSrc( double dfX, double dfY,
845 double &dfXOut, double &dfYOut );
846 void SrcToDst( double dfX, double dfY,
847 double &dfXOut, double &dfYOut );
848
849 virtual void GetFileList( char*** ppapszFileList, int *pnSize,
850 int *pnMaxSize, CPLHashSet* hSetFiles ) CPL_OVERRIDE;
851
852 virtual int IsSimpleSource() CPL_OVERRIDE { return TRUE; }
853 virtual const char* GetType() { return "SimpleSource"; }
854
855 GDALRasterBand* GetBand();
856 int IsSameExceptBandNumber( VRTSimpleSource* poOtherSource );
857 CPLErr DatasetRasterIO(
858 int nXOff, int nYOff, int nXSize, int nYSize,
859 void * pData, int nBufXSize, int nBufYSize,
860 GDALDataType eBufType,
861 int nBandCount, int *panBandMap,
862 GSpacing nPixelSpace, GSpacing nLineSpace,
863 GSpacing nBandSpace,
864 GDALRasterIOExtraArg* psExtraArg );
865
866 void UnsetPreservedRelativeFilenames();
867
868 void SetMaxValue( int nVal ) { m_nMaxValue = nVal; }
869 };
870
871 /************************************************************************/
872 /* VRTAveragedSource */
873 /************************************************************************/
874
875 class VRTAveragedSource : public VRTSimpleSource
876 {
877 public:
878 VRTAveragedSource();
879 virtual CPLErr RasterIO( int nXOff, int nYOff, int nXSize, int nYSize,
880 void *pData, int nBufXSize, int nBufYSize,
881 GDALDataType eBufType,
882 GSpacing nPixelSpace, GSpacing nLineSpace,
883 GDALRasterIOExtraArg* psExtraArg ) CPL_OVERRIDE;
884
885 virtual double GetMinimum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
886 virtual double GetMaximum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
887 virtual CPLErr ComputeRasterMinMax( int nXSize, int nYSize, int bApproxOK,
888 double* adfMinMax ) CPL_OVERRIDE;
889 virtual CPLErr ComputeStatistics( int nXSize, int nYSize,
890 int bApproxOK,
891 double *pdfMin, double *pdfMax,
892 double *pdfMean, double *pdfStdDev,
893 GDALProgressFunc pfnProgress,
894 void *pProgressData ) CPL_OVERRIDE;
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,
900 void *pProgressData ) CPL_OVERRIDE;
901
902 virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
903 virtual const char* GetType() CPL_OVERRIDE { return "AveragedSource"; }
904 };
905
906 /************************************************************************/
907 /* VRTComplexSource */
908 /************************************************************************/
909
910 typedef enum
911 {
912 VRT_SCALING_NONE,
913 VRT_SCALING_LINEAR,
914 VRT_SCALING_EXPONENTIAL,
915 } VRTComplexSourceScaling;
916
917 class CPL_DLL VRTComplexSource : public VRTSimpleSource
918 {
919 protected:
920 VRTComplexSourceScaling m_eScalingType;
921 double m_dfScaleOff; // For linear scaling.
922 double m_dfScaleRatio; // For linear scaling.
923
924 // For non-linear scaling with a power function.
925 int m_bSrcMinMaxDefined;
926 double m_dfSrcMin;
927 double m_dfSrcMax;
928 double m_dfDstMin;
929 double m_dfDstMax;
930 double m_dfExponent;
931
932 int m_nColorTableComponent;
933
934 template <class WorkingDT>
935 CPLErr RasterIOInternal( int nReqXOff, int nReqYOff,
936 int nReqXSize, int nReqYSize,
937 void *pData, int nOutXSize, int nOutYSize,
938 GDALDataType eBufType,
939 GSpacing nPixelSpace, GSpacing nLineSpace,
940 GDALRasterIOExtraArg* psExtraArg,
941 GDALDataType eWrkDataType );
942
943 public:
944 VRTComplexSource();
945 VRTComplexSource(const VRTComplexSource* poSrcSource,
946 double dfXDstRatio, double dfYDstRatio);
947 virtual ~VRTComplexSource();
948
949 virtual CPLErr RasterIO( int nXOff, int nYOff, int nXSize, int nYSize,
950 void *pData, int nBufXSize, int nBufYSize,
951 GDALDataType eBufType,
952 GSpacing nPixelSpace, GSpacing nLineSpace,
953 GDALRasterIOExtraArg* psExtraArg ) CPL_OVERRIDE;
954
955 virtual double GetMinimum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
956 virtual double GetMaximum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
957 virtual CPLErr ComputeRasterMinMax( int nXSize, int nYSize, int bApproxOK,
958 double* adfMinMax ) CPL_OVERRIDE;
959 virtual CPLErr ComputeStatistics( int nXSize, int nYSize,
960 int bApproxOK,
961 double *pdfMin, double *pdfMax,
962 double *pdfMean, double *pdfStdDev,
963 GDALProgressFunc pfnProgress,
964 void *pProgressData ) CPL_OVERRIDE;
965 virtual CPLErr GetHistogram( int nXSize, int nYSize,
966 double dfMin, double dfMax,
967 int nBuckets, GUIntBig * panHistogram,
968 int bIncludeOutOfRange, int bApproxOK,
969 GDALProgressFunc pfnProgress,
970 void *pProgressData ) CPL_OVERRIDE;
971
972 virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
973 virtual CPLErr XMLInit( CPLXMLNode *, const char * ) CPL_OVERRIDE;
974 virtual const char* GetType() CPL_OVERRIDE { return "ComplexSource"; }
975
976 double LookupValue( double dfInput );
977
978 void SetLinearScaling( double dfOffset, double dfScale );
979 void SetPowerScaling( double dfExponent,
980 double dfSrcMin,
981 double dfSrcMax,
982 double dfDstMin,
983 double dfDstMax );
984 void SetColorTableComponent( int nComponent );
985
986 double *m_padfLUTInputs;
987 double *m_padfLUTOutputs;
988 int m_nLUTItemCount;
989 };
990
991 /************************************************************************/
992 /* VRTFilteredSource */
993 /************************************************************************/
994
995 class VRTFilteredSource : public VRTComplexSource
996 {
997 private:
998 int IsTypeSupported( GDALDataType eType );
999
1000 protected:
1001 int m_nSupportedTypesCount;
1002 GDALDataType m_aeSupportedTypes[20];
1003
1004 int m_nExtraEdgePixels;
1005
1006 public:
1007 VRTFilteredSource();
1008 virtual ~VRTFilteredSource();
1009
1010 void SetExtraEdgePixels( int );
1011 void SetFilteringDataTypesSupported( int, GDALDataType * );
1012
1013 virtual CPLErr FilterData( int nXSize, int nYSize, GDALDataType eType,
1014 GByte *pabySrcData, GByte *pabyDstData ) = 0;
1015
1016 virtual CPLErr RasterIO( int nXOff, int nYOff, int nXSize, int nYSize,
1017 void *pData, int nBufXSize, int nBufYSize,
1018 GDALDataType eBufType,
1019 GSpacing nPixelSpace, GSpacing nLineSpace,
1020 GDALRasterIOExtraArg* psExtraArg ) CPL_OVERRIDE;
1021 };
1022
1023 /************************************************************************/
1024 /* VRTKernelFilteredSource */
1025 /************************************************************************/
1026
1027 class VRTKernelFilteredSource : public VRTFilteredSource
1028 {
1029 protected:
1030 int m_nKernelSize;
1031
1032 double *m_padfKernelCoefs;
1033
1034 int m_bNormalized;
1035
1036 public:
1037 VRTKernelFilteredSource();
1038 virtual ~VRTKernelFilteredSource();
1039
1040 virtual CPLErr XMLInit( CPLXMLNode *psTree, const char * ) CPL_OVERRIDE;
1041 virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
1042
1043 virtual CPLErr FilterData( int nXSize, int nYSize, GDALDataType eType,
1044 GByte *pabySrcData, GByte *pabyDstData ) CPL_OVERRIDE;
1045
1046 CPLErr SetKernel( int nKernelSize, double *padfCoefs );
1047 void SetNormalized( int );
1048 };
1049
1050 /************************************************************************/
1051 /* VRTAverageFilteredSource */
1052 /************************************************************************/
1053
1054 class VRTAverageFilteredSource : public VRTKernelFilteredSource
1055 {
1056 public:
1057 explicit VRTAverageFilteredSource( int nKernelSize );
1058 virtual ~VRTAverageFilteredSource();
1059
1060 virtual CPLErr XMLInit( CPLXMLNode *psTree, const char * ) CPL_OVERRIDE;
1061 virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
1062 };
1063
1064 /************************************************************************/
1065 /* VRTFuncSource */
1066 /************************************************************************/
1067 class VRTFuncSource : public VRTSource
1068 {
1069 public:
1070 VRTFuncSource();
1071 virtual ~VRTFuncSource();
1072
1073 virtual CPLErr XMLInit( CPLXMLNode *, const char *) CPL_OVERRIDE { return CE_Failure; }
1074 virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath ) CPL_OVERRIDE;
1075
1076 virtual CPLErr RasterIO( int nXOff, int nYOff, int nXSize, int nYSize,
1077 void *pData, int nBufXSize, int nBufYSize,
1078 GDALDataType eBufType,
1079 GSpacing nPixelSpace, GSpacing nLineSpace,
1080 GDALRasterIOExtraArg* psExtraArg ) CPL_OVERRIDE;
1081
1082 virtual double GetMinimum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
1083 virtual double GetMaximum( int nXSize, int nYSize, int *pbSuccess ) CPL_OVERRIDE;
1084 virtual CPLErr ComputeRasterMinMax( int nXSize, int nYSize, int bApproxOK,
1085 double* adfMinMax ) CPL_OVERRIDE;
1086 virtual CPLErr ComputeStatistics( int nXSize, int nYSize,
1087 int bApproxOK,
1088 double *pdfMin, double *pdfMax,
1089 double *pdfMean, double *pdfStdDev,
1090 GDALProgressFunc pfnProgress,
1091 void *pProgressData ) CPL_OVERRIDE;
1092 virtual CPLErr GetHistogram( int nXSize, int nYSize,
1093 double dfMin, double dfMax,
1094 int nBuckets, GUIntBig * panHistogram,
1095 int bIncludeOutOfRange, int bApproxOK,
1096 GDALProgressFunc pfnProgress,
1097 void *pProgressData ) CPL_OVERRIDE;
1098
1099 VRTImageReadFunc pfnReadFunc;
1100 void *pCBData;
1101 GDALDataType eType;
1102
1103 float fNoDataValue;
1104 };
1105
1106 #endif /* #ifndef DOXYGEN_SKIP */
1107
1108 #endif /* ndef VIRTUALDATASET_H_INCLUDED */
GDALDataType
GDALDataType
Definition: gdal.h:57
CPLXMLNode
Document node structure.
Definition: cpl_minixml.h:66
GDALDataset::FlushCache
virtual void FlushCache(void)
Flush all write cached data to disk.
Definition: gdaldataset.cpp:430
VRTImageReadFunc
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
gdal_priv.h
C++ GDAL entry points.
CPL_OVERRIDE
#define CPL_OVERRIDE
To be used in public headers only.
Definition: cpl_port.h:1055
GDALDataset::GetProjectionRef
virtual const char * GetProjectionRef(void)
Fetch the projection definition string for this dataset.
Definition: gdaldataset.cpp:857
GDALRWFlag
GDALRWFlag
Definition: gdal.h:105
GByte
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:207
GDALRasterBandH
void * GDALRasterBandH
Opaque type used for the C bindings of the C++ GDALRasterBand class.
Definition: gdal.h:244
GDALPansharpenOperation
Pansharpening operation class.
Definition: gdalpansharpen.h:188
CPLString
Convenient string class based on std::string.
Definition: cpl_string.h:338
cpl_hash_set.h
Hash set implementation.
GDT_Unknown
Definition: gdal.h:58
GDALDerivedPixelFunc
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
VRT_NODATA_UNSET
#define VRT_NODATA_UNSET
Special value to indicate that nodata is not set.
Definition: gdal_vrt.h:45
GSpacing
GIntBig GSpacing
Type to express pixel, line or band spacing.
Definition: gdal.h:259
GDALDataset::Dereference
int Dereference()
Subtract one from dataset reference count.
Definition: gdaldataset.cpp:1163
GDALOpenInfo
Class for dataset open functions.
Definition: gdal_priv.h:246
CPLStringList
String list class designed around our use of C "char**" string lists.
Definition: cpl_string.h:449
GDALRasterIOExtraArg
Structure to pass extra arguments to RasterIO() method.
Definition: gdal.h:133
GDALWarpOperation
High level image warping class.
Definition: gdalwarper.h:417
GDALDataset::CloseDependentDatasets
virtual int CloseDependentDatasets()
Drop references to any other datasets referenced by this dataset.
Definition: gdaldataset.cpp:3413
GDALDataset::CreateMaskBand
virtual CPLErr CreateMaskBand(int nFlagsIn)
Adds a mask band to the dataset.
Definition: gdaldataset.cpp:2474
GUIntBig
unsigned long long GUIntBig
Large unsigned integer type (generally 64-bit unsigned integer type).
Definition: cpl_port.h:253
GDALClose
void GDALClose(GDALDatasetH)
Close GDAL dataset.
Definition: gdaldataset.cpp:3040
GDALMajorObject
Object with metadata.
Definition: gdal_priv.h:125
GDALRasterBand::GetDataset
GDALDataset * GetDataset()
Fetch the owning dataset handle.
Definition: gdalrasterband.cpp:2834
vsi_l_offset
GUIntBig vsi_l_offset
Type for a file offset.
Definition: cpl_vsi.h:138
GDALRasterBand
A single raster band (or channel).
Definition: gdal_priv.h:829
GDALAccess
GDALAccess
Definition: gdal.h:99
GDALDataset
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:322
GDALColorInterp
GDALColorInterp
Definition: gdal.h:176
GDALRasterBand::SetNoDataValue
virtual CPLErr SetNoDataValue(double dfNoData)
Set the no data value for this band.
Definition: gdalrasterband.cpp:1677
gdal_vrt.h
Public (C callable) entry points for virtual GDAL dataset objects.
CPLHashSet
struct _CPLHashSet CPLHashSet
Opaque type for a hash set.
Definition: cpl_hash_set.h:52
GDALDataset::GetShared
int GetShared() const
Returns shared flag.
Definition: gdaldataset.cpp:1237
GA_ReadOnly
Definition: gdal.h:100
GDALDriver
Format specific driver.
Definition: gdal_priv.h:1160
GDALColorTable
A color table / palette.
Definition: gdal_priv.h:749
GDAL_GCP
Ground Control Point.
Definition: gdal.h:514
CPLErr
CPLErr
Error category.
Definition: cpl_error.h:52

Generated for GDAL by 1.8.9.1.