31 #ifndef VIRTUALDATASET_H_INCLUDED 32 #define VIRTUALDATASET_H_INCLUDED 34 #include "cpl_hash_set.h" 36 #include "gdal_priv.h" 42 int VRTApplyMetadata( CPLXMLNode *, GDALMajorObject * );
43 CPLXMLNode *VRTSerializeMetadata( GDALMajorObject * );
46 int VRTWarpedOverviewTransform(
void *pTransformArg,
int bDstToSrc,
48 double *padfX,
double *padfY,
double *padfZ,
50 void* VRTDeserializeWarpedOverviewTransformer( CPLXMLNode *psTree );
61 GDALRasterBand *poBand;
68 else if( poBand->GetDataset()->GetShared() )
69 GDALClose( (GDALDatasetH) poBand->GetDataset() );
71 poBand->GetDataset()->Dereference();
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;
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,
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;
105 virtual CPLErr XMLInit( CPLXMLNode *psTree,
const char * ) = 0;
106 virtual CPLXMLNode *SerializeToXML(
const char *pszVRTPath ) = 0;
108 virtual void GetFileList(
char*** ppapszFileList,
int *pnSize,
109 int *pnMaxSize, CPLHashSet* hSetFiles);
111 virtual int IsSimpleSource() {
return FALSE; }
114 typedef VRTSource *(*VRTSourceParser)(CPLXMLNode *,
const char *);
116 VRTSource *VRTParseCoreSources( CPLXMLNode *psTree,
const char * );
117 VRTSource *VRTParseFilterSources( CPLXMLNode *psTree,
const char * );
129 char *m_pszProjection;
131 int m_bGeoTransformSet;
132 double m_adfGeoTransform[6];
135 GDAL_GCP *m_pasGCPList;
136 char *m_pszGCPProjection;
145 int m_bCompatibleForDatasetIO;
146 int CheckCompatibleForDatasetIO();
147 std::vector<GDALDataset*> m_apoOverviews;
148 std::vector<GDALDataset*> m_apoOverviewsBak;
151 virtual int CloseDependentDatasets();
157 void SetNeedsFlush() { m_bNeedsFlush = TRUE; }
158 virtual void FlushCache();
160 void SetWritable(
int bWritableIn) { m_bWritable = bWritableIn; }
162 virtual CPLErr CreateMaskBand(
int nFlags );
165 virtual const char *GetProjectionRef(
void);
166 virtual CPLErr SetProjection(
const char * );
167 virtual CPLErr GetGeoTransform(
double * );
168 virtual CPLErr SetGeoTransform(
double * );
170 virtual CPLErr SetMetadata(
char **papszMD,
const char *pszDomain =
"" );
171 virtual CPLErr SetMetadataItem(
const char *pszName,
const char *pszValue,
172 const char *pszDomain =
"" );
174 virtual char** GetMetadata(
const char *pszDomain =
"" );
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 );
182 virtual CPLErr AddBand( GDALDataType eType,
183 char **papszOptions=NULL );
185 virtual char **GetFileList();
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,
194 GDALRasterIOExtraArg* psExtraArg);
196 virtual CPLXMLNode *SerializeToXML(
const char *pszVRTPath);
197 virtual CPLErr XMLInit( CPLXMLNode *,
const char * );
199 virtual CPLErr IBuildOverviews(
const char *,
int,
int *,
200 int,
int *, GDALProgressFunc,
void * );
203 GDALDataset* GetSingleSimpleSource();
204 void BuildVirtualOverviews();
206 void UnsetPreservedRelativeFilenames();
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 );
221 class GDALWarpOperation;
228 GDALWarpOperation *m_poWarper;
230 int m_nOverviewCount;
234 void CreateImplicitOverviews();
239 virtual int CloseDependentDatasets();
245 CPLErr Initialize(
void * );
247 virtual CPLErr IBuildOverviews(
const char *,
int,
int *,
248 int,
int *, GDALProgressFunc,
void * );
250 virtual CPLErr SetMetadataItem(
const char *pszName,
const char *pszValue,
251 const char *pszDomain =
"" );
253 virtual CPLXMLNode *SerializeToXML(
const char *pszVRTPath );
254 virtual CPLErr XMLInit( CPLXMLNode *,
const char * );
256 virtual CPLErr AddBand( GDALDataType eType,
257 char **papszOptions=NULL );
259 virtual char **GetFileList();
261 CPLErr ProcessBlock(
int iBlockX,
int iBlockY );
263 void GetBlockSize(
int *,
int * );
270 class GDALPansharpenOperation;
275 GTAdjust_Intersection,
277 GTAdjust_NoneWithoutWarning
286 GDALPansharpenOperation* m_poPansharpener;
288 std::vector<VRTPansharpenedDataset*> m_apoOverviewDatasets;
289 std::map<CPLString,CPLString> m_oMapToRelativeFilenames;
291 int m_bLoadingOtherBands;
293 GByte *m_pabyLastBufferBandRasterIO;
294 int m_nLastBandRasterIOXOff;
295 int m_nLastBandRasterIOYOff;
296 int m_nLastBandRasterIOXSize;
297 int m_nLastBandRasterIOYSize;
298 GDALDataType m_eLastBandRasterIODataType;
300 GTAdjustment m_eGTAdjustment;
301 int m_bNoDataDisabled;
303 std::vector<GDALDataset*> m_apoDatasetsToClose;
306 virtual int CloseDependentDatasets();
312 virtual CPLErr XMLInit( CPLXMLNode *,
const char * );
313 virtual CPLXMLNode * SerializeToXML(
const char *pszVRTPath );
315 CPLErr XMLInit( CPLXMLNode *psTree,
const char *pszVRTPath,
316 GDALRasterBandH hPanchroBandIn,
317 int nInputSpectralBandsIn,
318 GDALRasterBandH* pahInputSpectralBandsIn );
320 virtual CPLErr AddBand( GDALDataType eType,
321 char **papszOptions=NULL );
323 virtual char **GetFileList();
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,
332 GDALRasterIOExtraArg* psExtraArg);
334 void GetBlockSize(
int *,
int * );
336 GDALPansharpenOperation* GetPansharpener() {
return m_poPansharpener; }
351 int m_bNoDataValueSet;
352 int m_bHideNoDataValue;
353 double m_dfNoDataValue;
355 GDALColorTable *m_poColorTable;
357 GDALColorInterp m_eColorInterp;
360 char **m_papszCategoryNames;
365 CPLXMLNode *m_psSavedHistograms;
367 void Initialize(
int nXSize,
int nYSize );
369 std::vector<VRTOverviewInfo> m_apoOverviews;
378 virtual CPLErr XMLInit( CPLXMLNode *,
const char * );
379 virtual CPLXMLNode * SerializeToXML(
const char *pszVRTPath );
381 virtual CPLErr SetNoDataValue(
double );
382 virtual double GetNoDataValue(
int *pbSuccess = NULL );
383 virtual CPLErr DeleteNoDataValue();
385 virtual CPLErr SetColorTable( GDALColorTable * );
386 virtual GDALColorTable *GetColorTable();
388 virtual CPLErr SetColorInterpretation( GDALColorInterp );
389 virtual GDALColorInterp GetColorInterpretation();
391 virtual const char *GetUnitType();
392 CPLErr SetUnitType(
const char * );
394 virtual char **GetCategoryNames();
395 virtual CPLErr SetCategoryNames(
char ** );
397 virtual CPLErr SetMetadata(
char **papszMD,
const char *pszDomain =
"" );
398 virtual CPLErr SetMetadataItem(
const char *pszName,
const char *pszValue,
399 const char *pszDomain =
"" );
401 virtual double GetOffset(
int *pbSuccess = NULL );
402 CPLErr SetOffset(
double );
403 virtual double GetScale(
int *pbSuccess = NULL );
404 CPLErr SetScale(
double );
406 virtual int GetOverviewCount();
407 virtual GDALRasterBand *GetOverview(
int);
409 virtual CPLErr GetHistogram(
double dfMin,
double dfMax,
410 int nBuckets, GUIntBig * panHistogram,
411 int bIncludeOutOfRange,
int bApproxOK,
412 GDALProgressFunc,
void *pProgressData );
414 virtual CPLErr GetDefaultHistogram(
double *pdfMin,
double *pdfMax,
415 int *pnBuckets, GUIntBig ** ppanHistogram,
417 GDALProgressFunc,
void *pProgressData);
419 virtual CPLErr SetDefaultHistogram(
double dfMin,
double dfMax,
420 int nBuckets, GUIntBig *panHistogram );
422 CPLErr CopyCommonInfoFrom( GDALRasterBand * );
424 virtual void GetFileList(
char*** ppapszFileList,
int *pnSize,
425 int *pnMaxSize, CPLHashSet* hSetFiles);
427 virtual void SetDescription(
const char * );
429 virtual GDALRasterBand *GetMaskBand();
430 virtual int GetMaskFlags();
432 virtual CPLErr CreateMaskBand(
int nFlags );
436 void SetIsMaskBand();
438 CPLErr UnsetNoDataValue();
440 virtual int CloseDependentDatasets();
442 virtual int IsSourcedRasterBand() {
return FALSE; }
443 virtual int IsPansharpenRasterBand() {
return FALSE; }
455 int m_nRecursionCounter;
456 CPLString m_osLastLocationInfo;
457 char **m_papszSourceList;
459 void Initialize(
int nXSize,
int nYSize );
461 int CanUseSourcesMinMaxImplementations();
470 int nXSize,
int nYSize );
473 int nXSize,
int nYSize );
476 virtual CPLErr IRasterIO( GDALRWFlag,
int,
int,
int,
int,
477 void *,
int,
int, GDALDataType,
478 GSpacing nPixelSpace, GSpacing nLineSpace,
479 GDALRasterIOExtraArg* psExtraArg);
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 =
"" );
491 virtual CPLErr XMLInit( CPLXMLNode *,
const char * );
492 virtual CPLXMLNode * SerializeToXML(
const char *pszVRTPath );
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 );
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);
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 );
530 CPLErr AddFuncSource( VRTImageReadFunc pfnReadFunc,
void *hCBData,
531 double dfNoDataValue = VRT_NODATA_UNSET );
534 GDALRasterBand *poSrcBand,
536 double dfSrcXOff,
double dfSrcYOff,
537 double dfSrcXSize,
double dfSrcYSize,
538 double dfDstXOff,
double dfDstYOff,
539 double dfDstXSize,
double dfDstYSize);
541 virtual CPLErr IReadBlock(
int,
int,
void * );
543 virtual void GetFileList(
char*** ppapszFileList,
int *pnSize,
544 int *pnMaxSize, CPLHashSet* hSetFiles);
546 virtual int CloseDependentDatasets();
548 virtual int IsSourcedRasterBand() {
return TRUE; }
559 GDALDataType eType = GDT_Unknown );
562 virtual CPLErr XMLInit( CPLXMLNode *,
const char * );
563 virtual CPLXMLNode * SerializeToXML(
const char *pszVRTPath );
565 virtual CPLErr IReadBlock(
int,
int,
void * );
566 virtual CPLErr IWriteBlock(
int,
int,
void * );
568 virtual int GetOverviewCount();
569 virtual GDALRasterBand *GetOverview(
int);
577 int m_nIndexAsPansharpenedBand;
581 GDALDataType eDataType = GDT_Unknown );
584 virtual CPLErr XMLInit( CPLXMLNode *,
const char * );
585 virtual CPLXMLNode * SerializeToXML(
const char *pszVRTPath );
587 virtual CPLErr IReadBlock(
int,
int,
void * );
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);
596 virtual int GetOverviewCount();
597 virtual GDALRasterBand *GetOverview(
int);
599 virtual int IsPansharpenRasterBand() {
return TRUE; }
601 void SetIndexAsPansharpenedBand(
int nIdx) { m_nIndexAsPansharpenedBand = nIdx; }
602 int GetIndexAsPansharpenedBand()
const {
return m_nIndexAsPansharpenedBand; }
614 GDALDataType eSourceTransferType;
618 GDALDataType eType,
int nXSize,
int nYSize);
621 virtual CPLErr IRasterIO( GDALRWFlag,
int,
int,
int,
int,
622 void *,
int,
int, GDALDataType,
623 GSpacing nPixelSpace, GSpacing nLineSpace,
624 GDALRasterIOExtraArg* psExtraArg );
626 static CPLErr AddPixelFunction
627 (
const char *pszFuncName, GDALDerivedPixelFunc pfnPixelFunc);
628 static GDALDerivedPixelFunc GetPixelFunction(
const char *pszFuncName);
630 void SetPixelFunctionName(
const char *pszFuncName);
631 void SetSourceTransferType(GDALDataType eDataType);
633 virtual CPLErr XMLInit( CPLXMLNode *,
const char * );
634 virtual CPLXMLNode * SerializeToXML(
const char *pszVRTPath );
646 RawRasterBand *m_poRawRaster;
648 char *m_pszSourceFilename;
649 int m_bRelativeToVRT;
653 GDALDataType eType = GDT_Unknown );
656 virtual CPLErr XMLInit( CPLXMLNode *,
const char * );
657 virtual CPLXMLNode * SerializeToXML(
const char *pszVRTPath );
659 virtual CPLErr IRasterIO( GDALRWFlag,
int,
int,
int,
int,
660 void *,
int,
int, GDALDataType,
661 GSpacing nPixelSpace, GSpacing nLineSpace,
662 GDALRasterIOExtraArg* psExtraArg );
664 virtual CPLErr IReadBlock(
int,
int,
void * );
665 virtual CPLErr IWriteBlock(
int,
int,
void * );
667 CPLErr SetRawLink(
const char *pszFilename,
668 const char *pszVRTPath,
670 vsi_l_offset nImageOffset,
671 int nPixelOffset,
int nLineOffset,
672 const char *pszByteOrder );
676 virtual void GetFileList(
char*** ppapszFileList,
int *pnSize,
677 int *pnMaxSize, CPLHashSet* hSetFiles);
686 void *m_pDeserializerData;
692 char **papszSourceParsers;
694 virtual char **GetMetadataDomainList();
695 virtual char **GetMetadata(
const char * pszDomain =
"" );
696 virtual CPLErr SetMetadata(
char ** papszMetadata,
697 const char * pszDomain =
"" );
699 VRTSource *ParseSource( CPLXMLNode *psSrc,
const char *pszVRTPath );
700 void AddSourceParser(
const char *pszElementName,
701 VRTSourceParser pfnParser );
711 GDALRasterBand *m_poRasterBand;
715 GDALRasterBand *m_poMaskBandMainBand;
728 double m_dfNoDataValue;
729 CPLString m_osResampling;
733 int m_bRelativeToVRTOri;
734 CPLString m_osSourceFileNameOri;
736 int NeedMaxValAdjustment()
const;
741 double dfXDstRatio,
double dfYDstRatio);
744 virtual CPLErr XMLInit( CPLXMLNode *psTree,
const char * );
745 virtual CPLXMLNode *SerializeToXML(
const char *pszVRTPath );
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 );
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 * );
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 );
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,
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 );
781 void DstToSrc(
double dfX,
double dfY,
782 double &dfXOut,
double &dfYOut );
783 void SrcToDst(
double dfX,
double dfY,
784 double &dfXOut,
double &dfYOut );
786 virtual void GetFileList(
char*** ppapszFileList,
int *pnSize,
787 int *pnMaxSize, CPLHashSet* hSetFiles);
789 virtual int IsSimpleSource() {
return TRUE; }
790 virtual const char* GetType() {
return "SimpleSource"; }
792 GDALRasterBand* GetBand();
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,
801 GDALRasterIOExtraArg* psExtraArg);
803 void UnsetPreservedRelativeFilenames();
805 void SetMaxValue(
int nVal) { m_nMaxValue = nVal; }
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 );
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,
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 );
836 virtual CPLXMLNode *SerializeToXML(
const char *pszVRTPath );
837 virtual const char* GetType() {
return "AveragedSource"; }
848 VRT_SCALING_EXPONENTIAL,
849 } VRTComplexSourceScaling;
854 VRTComplexSourceScaling m_eScalingType;
856 double m_dfScaleRatio;
859 int m_bSrcMinMaxDefined;
866 int m_nColorTableComponent;
868 template <
class WorkingDT>
869 CPLErr RasterIOInternal(
int nReqXOff,
int nReqYOff,
870 int nReqXSize,
int nReqYSize,
871 void *pData,
int nOutXSize,
int nOutYSize,
872 GDALDataType eBufType,
873 GSpacing nPixelSpace, GSpacing nLineSpace,
874 GDALRasterIOExtraArg* psExtraArg,
875 GDALDataType eWrkDataType );
880 double dfXDstRatio,
double dfYDstRatio);
883 virtual CPLErr RasterIO(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
884 void *pData,
int nBufXSize,
int nBufYSize,
885 GDALDataType eBufType,
886 GSpacing nPixelSpace, GSpacing nLineSpace,
887 GDALRasterIOExtraArg* psExtraArg );
889 virtual double GetMinimum(
int nXSize,
int nYSize,
int *pbSuccess );
890 virtual double GetMaximum(
int nXSize,
int nYSize,
int *pbSuccess );
891 virtual CPLErr ComputeRasterMinMax(
int nXSize,
int nYSize,
int bApproxOK,
double* adfMinMax );
892 virtual CPLErr ComputeStatistics(
int nXSize,
int nYSize,
894 double *pdfMin,
double *pdfMax,
895 double *pdfMean,
double *pdfStdDev,
896 GDALProgressFunc pfnProgress,
void *pProgressData );
897 virtual CPLErr GetHistogram(
int nXSize,
int nYSize,
898 double dfMin,
double dfMax,
899 int nBuckets, GUIntBig * panHistogram,
900 int bIncludeOutOfRange,
int bApproxOK,
901 GDALProgressFunc pfnProgress,
void *pProgressData );
903 virtual CPLXMLNode *SerializeToXML(
const char *pszVRTPath );
904 virtual CPLErr XMLInit( CPLXMLNode *,
const char * );
905 virtual const char* GetType() {
return "ComplexSource"; }
907 double LookupValue(
double dfInput );
909 void SetLinearScaling(
double dfOffset,
double dfScale);
910 void SetPowerScaling(
double dfExponent,
915 void SetColorTableComponent(
int nComponent);
917 double *m_padfLUTInputs;
918 double *m_padfLUTOutputs;
930 int IsTypeSupported( GDALDataType eType );
933 int m_nSupportedTypesCount;
934 GDALDataType m_aeSupportedTypes[20];
936 int m_nExtraEdgePixels;
942 void SetExtraEdgePixels(
int );
943 void SetFilteringDataTypesSupported(
int, GDALDataType * );
945 virtual CPLErr FilterData(
int nXSize,
int nYSize, GDALDataType eType,
946 GByte *pabySrcData, GByte *pabyDstData ) = 0;
948 virtual CPLErr RasterIO(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
949 void *pData,
int nBufXSize,
int nBufYSize,
950 GDALDataType eBufType,
951 GSpacing nPixelSpace, GSpacing nLineSpace,
952 GDALRasterIOExtraArg* psExtraArg );
964 double *m_padfKernelCoefs;
972 virtual CPLErr XMLInit( CPLXMLNode *psTree,
const char * );
973 virtual CPLXMLNode *SerializeToXML(
const char *pszVRTPath );
975 virtual CPLErr FilterData(
int nXSize,
int nYSize, GDALDataType eType,
976 GByte *pabySrcData, GByte *pabyDstData );
978 CPLErr SetKernel(
int nKernelSize,
double *padfCoefs );
979 void SetNormalized(
int );
992 virtual CPLErr XMLInit( CPLXMLNode *psTree,
const char * );
993 virtual CPLXMLNode *SerializeToXML(
const char *pszVRTPath );
1005 virtual CPLErr XMLInit( CPLXMLNode *,
const char *) {
return CE_Failure; }
1006 virtual CPLXMLNode *SerializeToXML(
const char *pszVRTPath );
1008 virtual CPLErr RasterIO(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
1009 void *pData,
int nBufXSize,
int nBufYSize,
1010 GDALDataType eBufType,
1011 GSpacing nPixelSpace, GSpacing nLineSpace,
1012 GDALRasterIOExtraArg* psExtraArg );
1014 virtual double GetMinimum(
int nXSize,
int nYSize,
int *pbSuccess );
1015 virtual double GetMaximum(
int nXSize,
int nYSize,
int *pbSuccess );
1016 virtual CPLErr ComputeRasterMinMax(
int nXSize,
int nYSize,
int bApproxOK,
double* adfMinMax );
1017 virtual CPLErr ComputeStatistics(
int nXSize,
int nYSize,
1019 double *pdfMin,
double *pdfMax,
1020 double *pdfMean,
double *pdfStdDev,
1021 GDALProgressFunc pfnProgress,
void *pProgressData );
1022 virtual CPLErr GetHistogram(
int nXSize,
int nYSize,
1023 double dfMin,
double dfMax,
1024 int nBuckets, GUIntBig * panHistogram,
1025 int bIncludeOutOfRange,
int bApproxOK,
1026 GDALProgressFunc pfnProgress,
void *pProgressData );
1028 VRTImageReadFunc pfnReadFunc;
Definition: vrtdataset.h:959
Definition: vrtdataset.h:812
Definition: vrtdataset.h:346
Definition: vrtdataset.h:575
Definition: vrtdataset.h:80
Definition: vrtdataset.h:927
Definition: vrtdataset.h:452
Definition: vrtdataset.h:125
Definition: vrtdataset.h:56
Definition: vrtdataset.h:986
Definition: vrtdataset.h:280
Definition: vrtdataset.h:644
Definition: vrtdataset.h:555
Definition: vrtdataset.h:609
Definition: vrtdataset.h:999
Definition: vrtdataset.h:851
Definition: vrtdataset.h:708
Definition: vrtdataset.h:684
Definition: vrtdataset.h:224