30 #ifndef GDAL_PROXY_H_INCLUDED 31 #define GDAL_PROXY_H_INCLUDED 52 virtual void UnrefUnderlyingDataset(
GDALDataset* poUnderlyingDataset);
54 CPLErr IBuildOverviews(
const char *,
int,
int *,
55 int,
int *, GDALProgressFunc,
void * )
override;
63 char **
GetMetadata(
const char * pszDomain )
override;
65 const char * pszDomain )
override;
67 const char * pszDomain )
override;
69 const char * pszValue,
70 const char * pszDomain )
override;
88 const char *pszGCPProjection )
override;
91 int nBufXSize,
int nBufYSize,
93 int nBandCount,
int *panBandList,
94 char **papszOptions )
override;
109 GDALProxyRasterBand() {}
112 virtual void UnrefUnderlyingRasterBand(
GDALRasterBand* poUnderlyingRasterBand);
122 char **
GetMetadata(
const char * pszDomain )
override;
124 const char * pszDomain )
override;
126 const char * pszDomain )
override;
128 const char * pszValue,
129 const char * pszDomain )
override;
133 double GetMinimum(
int *pbSuccess =
nullptr )
override;
134 double GetMaximum(
int *pbSuccess =
nullptr )
override;
135 double GetOffset(
int *pbSuccess =
nullptr )
override;
136 double GetScale(
int *pbSuccess =
nullptr )
override;
140 CPLErr Fill(
double dfRealValue,
double dfImaginaryValue = 0)
override;
152 double *pdfMin,
double *pdfMax,
153 double *pdfMean,
double *padfStdDev )
override;
155 double *pdfMin,
double *pdfMax,
156 double *pdfMean,
double *pdfStdDev,
157 GDALProgressFunc,
void *pProgressData )
override;
159 double dfMean,
double dfStdDev )
override;
167 GDALProgressFunc,
void * )
override;
170 int nBufXSize,
int nBufYSize,
174 int nBuckets,
GUIntBig * panHistogram,
175 int bIncludeOutOfRange,
int bApproxOK,
176 GDALProgressFunc,
void *pProgressData )
override;
179 int *pnBuckets,
GUIntBig ** ppanHistogram,
181 GDALProgressFunc,
void *pProgressData)
override;
183 int nBuckets,
GUIntBig *panHistogram )
override;
195 char **papszOptions )
override;
205 typedef struct _GDALProxyPoolCacheEntry GDALProxyPoolCacheEntry;
206 class GDALProxyPoolRasterBand;
208 class CPL_DLL GDALProxyPoolDataset :
public GDALProxyDataset
213 char *pszProjectionRef;
214 double adfGeoTransform[6];
215 int bHasSrcProjection;
216 int bHasSrcGeoTransform;
217 char *pszGCPProjection;
223 GDALProxyPoolCacheEntry* cacheEntry;
226 GDALDataset *RefUnderlyingDataset(
bool bForceOpen);
230 void UnrefUnderlyingDataset(
GDALDataset* poUnderlyingDataset)
override;
232 friend class GDALProxyPoolRasterBand;
235 GDALProxyPoolDataset(
const char* pszSourceDatasetDescription,
236 int nRasterXSize,
int nRasterYSize,
239 const char * pszProjectionRef =
nullptr,
240 double * padfGeoTransform =
nullptr,
241 const char* pszOwner =
nullptr );
242 ~GDALProxyPoolDataset()
override;
244 void SetOpenOptions(
char** papszOpenOptions );
245 void AddSrcBandDescription(
GDALDataType eDataType,
int nBlockXSize,
248 void FlushCache()
override;
250 const char *GetProjectionRef()
override;
251 CPLErr SetProjection(
const char * )
override;
253 CPLErr GetGeoTransform(
double * )
override;
254 CPLErr SetGeoTransform(
double * )
override;
259 char **GetMetadata(
const char * pszDomain )
override;
260 const char *GetMetadataItem(
const char * pszName,
261 const char * pszDomain )
override;
263 void *GetInternalHandle(
const char * pszRequest )
override;
265 const char *GetGCPProjection()
override;
276 class GDALProxyPoolOverviewRasterBand;
277 class GDALProxyPoolMaskBand;
279 class CPL_DLL GDALProxyPoolRasterBand :
public GDALProxyRasterBand
285 char **papszCategoryNames;
288 int nSizeProxyOverviewRasterBand;
289 GDALProxyPoolOverviewRasterBand **papoProxyOverviewRasterBand;
290 GDALProxyPoolMaskBand *poProxyMaskBand;
298 void UnrefUnderlyingRasterBand(
GDALRasterBand* poUnderlyingRasterBand )
301 friend class GDALProxyPoolOverviewRasterBand;
302 friend class GDALProxyPoolMaskBand;
305 GDALProxyPoolRasterBand( GDALProxyPoolDataset* poDS,
int nBand,
307 int nBlockXSize,
int nBlockYSize );
308 GDALProxyPoolRasterBand( GDALProxyPoolDataset* poDS,
310 ~GDALProxyPoolRasterBand()
override;
312 void AddSrcMaskBandDescription(
GDALDataType eDataType,
int nBlockXSize,
318 char **GetMetadata(
const char * pszDomain )
override;
319 const char *GetMetadataItem(
const char * pszName,
320 const char * pszDomain )
override;
321 char **GetCategoryNames()
override;
322 const char *GetUnitType()
override;
328 CPLErr FlushCache()
override;
338 class GDALProxyPoolOverviewRasterBand :
public GDALProxyPoolRasterBand
341 GDALProxyPoolRasterBand *poMainBand;
345 int nRefCountUnderlyingMainRasterBand;
349 void UnrefUnderlyingRasterBand(
GDALRasterBand* poUnderlyingRasterBand )
353 GDALProxyPoolOverviewRasterBand( GDALProxyPoolDataset* poDS,
355 GDALProxyPoolRasterBand* poMainBand,
357 ~GDALProxyPoolOverviewRasterBand()
override;
364 class GDALProxyPoolMaskBand :
public GDALProxyPoolRasterBand
367 GDALProxyPoolRasterBand *poMainBand;
370 int nRefCountUnderlyingMainRasterBand;
374 void UnrefUnderlyingRasterBand(
GDALRasterBand* poUnderlyingRasterBand )
378 GDALProxyPoolMaskBand( GDALProxyPoolDataset* poDS,
380 GDALProxyPoolRasterBand* poMainBand );
381 GDALProxyPoolMaskBand( GDALProxyPoolDataset* poDS,
382 GDALProxyPoolRasterBand* poMainBand,
384 int nBlockXSize,
int nBlockYSize );
385 ~GDALProxyPoolMaskBand()
override;
396 typedef struct GDALProxyPoolDatasetHS *GDALProxyPoolDatasetH;
398 GDALProxyPoolDatasetH CPL_DLL GDALProxyPoolDatasetCreate(
const char* pszSourceDatasetDescription,
399 int nRasterXSize,
int nRasterYSize,
401 const char * pszProjectionRef,
402 double * padfGeoTransform);
404 void CPL_DLL GDALProxyPoolDatasetDelete(GDALProxyPoolDatasetH hProxyPoolDataset);
406 void CPL_DLL GDALProxyPoolDatasetAddSrcBandDescription( GDALProxyPoolDatasetH hProxyPoolDataset,
408 int nBlockXSize,
int nBlockYSize);
The GDALRasterAttributeTable (or RAT) class is used to encapsulate a table used to provide attribute ...
Definition: gdal_rat.h:47
virtual GDALDriver * GetDriver(void)
Fetch the driver to which this dataset relates.
Definition: gdaldataset.cpp:1092
virtual CPLErr GetGeoTransform(double *padfTransform)
Fetch the affine transformation coefficients.
Definition: gdaldataset.cpp:954
GDALDataType
Definition: gdal.h:60
virtual CPLErr SetCategoryNames(char **papszNames)
Set the category names for this band.
Definition: gdalrasterband.cpp:1579
virtual GDALRasterBand * GetMaskBand()
Return the mask band associated with the band.
Definition: gdalrasterband.cpp:6004
virtual char ** GetCategoryNames()
Fetch the list of category names for this raster.
Definition: gdalrasterband.cpp:1531
virtual void FlushCache(void)
Flush all write cached data to disk.
Definition: gdaldataset.cpp:428
virtual int HasArbitraryOverviews()
Check for arbitrary overviews.
Definition: gdalrasterband.cpp:2163
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:335
virtual GDALRasterBand * GetOverview(int)
Fetch overview raster band object.
Definition: gdalrasterband.cpp:2242
virtual CPLErr GetDefaultHistogram(double *pdfMin, double *pdfMax, int *pnBuckets, GUIntBig **ppanHistogram, int bForce, GDALProgressFunc, void *pProgressData)
Fetch default raster histogram.
Definition: gdalrasterband.cpp:3473
virtual CPLErr AdviseRead(int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eDT, int nBandCount, int *panBandList, char **papszOptions)
Advise driver of upcoming read requests.
Definition: gdaldataset.cpp:2295
virtual CPLErr IRasterIO(GDALRWFlag, int, int, int, int, void *, int, int, GDALDataType, GSpacing, GSpacing, GDALRasterIOExtraArg *psExtraArg) CPL_WARN_UNUSED_RESULT
Read/write a region of image data for this band.
Definition: rasterio.cpp:68
virtual GDALColorInterp GetColorInterpretation()
How should this band be interpreted as color?
Definition: gdalrasterband.cpp:1974
virtual const char * GetProjectionRef(void)
Fetch the projection definition string for this dataset.
Definition: gdaldataset.cpp:856
virtual CPLErr SetDefaultRAT(const GDALRasterAttributeTable *poRAT)
Set default Raster Attribute Table.
Definition: gdalrasterband.cpp:5922
GDALRWFlag
Definition: gdal.h:119
virtual CPLErr SetStatistics(double dfMin, double dfMax, double dfMean, double dfStdDev)
Set statistics on band.
Definition: gdalrasterband.cpp:5346
virtual void * GetInternalHandle(const char *pszHandleName)
Fetch a format specific internally meaningful handle.
Definition: gdaldataset.cpp:1054
virtual int GetMaskFlags()
Return the status flags of the mask band associated with the band.
Definition: gdalrasterband.cpp:6251
virtual GDALRasterAttributeTable * GetDefaultRAT()
Fetch default Raster Attribute Table.
Definition: gdalrasterband.cpp:5874
virtual CPLErr BuildOverviews(const char *pszResampling, int nOverviews, int *panOverviewList, GDALProgressFunc pfnProgress, void *pProgressData)
Build raster overview(s)
Definition: gdalrasterband.cpp:2400
virtual CPLErr GetHistogram(double dfMin, double dfMax, int nBuckets, GUIntBig *panHistogram, int bIncludeOutOfRange, int bApproxOK, GDALProgressFunc, void *pProgressData)
Compute raster histogram.
Definition: gdalrasterband.cpp:2921
virtual CPLErr SetGCPs(int nGCPCount, const GDAL_GCP *pasGCPList, const char *pszGCPProjection)
Assign GCPs.
Definition: gdaldataset.cpp:1414
virtual CPLErr ComputeStatistics(int bApproxOK, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev, GDALProgressFunc, void *pProgressData)
Compute image statistics.
Definition: gdalrasterband.cpp:4740
virtual CPLErr SetOffset(double dfNewOffset)
Set scaling offset.
Definition: gdalrasterband.cpp:2490
CPLErr SetMetadata(char **papszMetadata, const char *pszDomain) override
Set metadata.
struct CPLVirtualMem CPLVirtualMem
Opaque type that represents a virtual memory mapping.
Definition: cpl_virtualmem.h:62
void char ** GetMetadata(const char *pszDomain="") override
Fetch metadata.
Definition: gdaldataset.cpp:3484
CPLErr SetMetadataItem(const char *pszName, const char *pszValue, const char *pszDomain) override
Set single metadata item.
virtual CPLErr IReadBlock(int nBlockXOff, int nBlockYOff, void *pData)=0
Read a block of data.
virtual CPLErr FlushCache()
Flush raster data cache.
Definition: gdalrasterband.cpp:1032
GIntBig GSpacing
Type to express pixel, line or band spacing.
Definition: gdal.h:273
virtual CPLErr SetDefaultHistogram(double dfMin, double dfMax, int nBuckets, GUIntBig *panHistogram)
Set default histogram.
Definition: gdalrasterband.cpp:5775
const char * GetMetadataItem(const char *pszName, const char *pszDomain) override
Fetch single metadata item.
virtual double GetScale(int *pbSuccess=nullptr)
Fetch the raster value scale.
Definition: gdalrasterband.cpp:2547
virtual CPLErr AdviseRead(int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eBufType, char **papszOptions)
Advise driver of upcoming read requests.
Definition: gdalrasterband.cpp:3688
virtual const GDAL_GCP * GetGCPs()
Fetch GCPs.
Definition: gdaldataset.cpp:1364
Public (C callable) GDAL entry points.
virtual CPLErr DeleteNoDataValue()
Remove the no data value for this band.
Definition: gdalrasterband.cpp:1744
virtual CPLErr SetGeoTransform(double *padfTransform)
Set the affine transformation coefficients.
Definition: gdaldataset.cpp:1009
virtual double GetNoDataValue(int *pbSuccess=nullptr)
Fetch the no data value for this band.
Definition: gdalrasterband.cpp:1631
virtual int GetGCPCount()
Get number of GCPs.
Definition: gdaldataset.cpp:1296
virtual CPLErr ComputeRasterMinMax(int, double *)
Compute the min/max values for a band.
Definition: gdalrasterband.cpp:5413
virtual CPLErr SetColorInterpretation(GDALColorInterp eColorInterp)
Set color interpretation of a band.
Definition: gdalrasterband.cpp:2019
virtual const char * GetUnitType()
Return raster unit type.
Definition: gdalrasterband.cpp:2643
virtual CPLErr SetColorTable(GDALColorTable *poCT)
Set the raster color table.
Definition: gdalrasterband.cpp:2115
virtual double GetMinimum(int *pbSuccess=nullptr)
Fetch the minimum value for this band.
Definition: gdalrasterband.cpp:1887
virtual GDALColorTable * GetColorTable()
Fetch the color table associated with band.
Definition: gdalrasterband.cpp:2066
virtual CPLErr CreateMaskBand(int nFlagsIn)
Adds a mask band to the dataset.
Definition: gdaldataset.cpp:2477
unsigned long long GUIntBig
Large unsigned integer type (generally 64-bit unsigned integer type).
Definition: cpl_port.h:249
virtual char ** GetFileList(void)
Fetch files forming dataset.
Definition: gdaldataset.cpp:2377
char ** GetMetadata(const char *pszDomain="") override
Fetch metadata.
virtual CPLErr SetProjection(const char *pszProjection)
Set the projection reference string for this dataset.
Definition: gdaldataset.cpp:896
virtual const char * GetGCPProjection()
Get output projection for GCPs.
Definition: gdaldataset.cpp:1331
virtual CPLErr SetScale(double dfNewScale)
Set scaling ratio.
Definition: gdalrasterband.cpp:2596
virtual CPLErr IWriteBlock(int nBlockXOff, int nBlockYOff, void *pData)
Write a block of data.
Definition: gdalrasterband.cpp:626
virtual double GetOffset(int *pbSuccess=nullptr)
Fetch the raster value offset.
Definition: gdalrasterband.cpp:2441
virtual int GetOverviewCount()
Return the number of overview layers available.
Definition: gdalrasterband.cpp:2200
CPLErr SetMetadataItem(const char *pszName, const char *pszValue, const char *pszDomain) override
Set single metadata item.
virtual CPLVirtualMem * GetVirtualMemAuto(GDALRWFlag eRWFlag, int *pnPixelSpace, GIntBig *pnLineSpace, char **papszOptions) CPL_WARN_UNUSED_RESULT
Create a CPLVirtualMem object from a GDAL raster band object.
Definition: gdalrasterband.cpp:6656
virtual CPLErr SetUnitType(const char *pszNewValue)
Set unit type.
Definition: gdalrasterband.cpp:2691
A single raster band (or channel).
Definition: gdal_priv.h:1042
GDALAccess
Definition: gdal.h:113
virtual CPLErr CreateMaskBand(int nFlagsIn)
Adds a mask band to the current band.
Definition: gdalrasterband.cpp:6332
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:339
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:337
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:246
virtual double GetMaximum(int *pbSuccess=nullptr)
Fetch the maximum value for this band.
Definition: gdalrasterband.cpp:1794
CPLErr SetMetadata(char **papszMetadata, const char *pszDomain) override
Set metadata.
virtual GDALRasterBand * GetRasterSampleOverview(GUIntBig)
Fetch best sampling overview.
Definition: gdalrasterband.cpp:2292
char ** GetMetadataDomainList() override
Fetch list of metadata domains.
Definition: gdaldataset.cpp:3585
GDALColorInterp
Definition: gdal.h:190
virtual CPLErr SetNoDataValue(double dfNoData)
Set the no data value for this band.
Definition: gdalrasterband.cpp:1690
const char * GetMetadataItem(const char *pszName, const char *pszDomain) override
Fetch single metadata item.
struct _CPLHashSet CPLHashSet
Opaque type for a hash set.
Definition: cpl_hash_set.h:52
virtual CPLErr GetStatistics(int bApproxOK, int bForce, double *pdfMin, double *pdfMax, double *pdfMean, double *padfStdDev)
Fetch image statistics.
Definition: gdalrasterband.cpp:3768
Format specific driver.
Definition: gdal_priv.h:1386
A color table / palette.
Definition: gdal_priv.h:949
virtual char ** GetMetadataDomainList()
Fetch list of metadata domains.
Definition: gdalmajorobject.cpp:161
virtual CPLErr Fill(double dfRealValue, double dfImaginaryValue=0)
Fill this band with a constant value.
Definition: gdalrasterband.cpp:1386
Ground Control Point.
Definition: gdal.h:560
CPLErr
Error category.
Definition: cpl_error.h:52
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition: cpl_port.h:987