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);
114 CPLErr IReadBlock(
int,
int,
void * )
override;
115 CPLErr IWriteBlock(
int,
int,
void * )
override;
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;
131 char **GetCategoryNames()
override;
132 double GetNoDataValue(
int *pbSuccess =
nullptr )
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;
137 const char *GetUnitType()
override;
140 CPLErr Fill(
double dfRealValue,
double dfImaginaryValue = 0)
override;
142 CPLErr SetCategoryNames(
char ** )
override;
143 CPLErr SetNoDataValue(
double )
override;
144 CPLErr DeleteNoDataValue()
override;
147 CPLErr SetOffset(
double )
override;
148 CPLErr SetScale(
double )
override;
149 CPLErr SetUnitType(
const char * )
override;
151 CPLErr GetStatistics(
int bApproxOK,
int bForce,
152 double *pdfMin,
double *pdfMax,
153 double *pdfMean,
double *padfStdDev )
override;
154 CPLErr ComputeStatistics(
int bApproxOK,
155 double *pdfMin,
double *pdfMax,
156 double *pdfMean,
double *pdfStdDev,
157 GDALProgressFunc,
void *pProgressData )
override;
158 CPLErr SetStatistics(
double dfMin,
double dfMax,
159 double dfMean,
double dfStdDev )
override;
160 CPLErr ComputeRasterMinMax(
int,
double* )
override;
162 int HasArbitraryOverviews()
override;
163 int GetOverviewCount()
override;
167 GDALProgressFunc,
void * )
override;
170 int nBufXSize,
int nBufYSize,
173 CPLErr GetHistogram(
double dfMin,
double dfMax,
174 int nBuckets,
GUIntBig * panHistogram,
175 int bIncludeOutOfRange,
int bApproxOK,
176 GDALProgressFunc,
void *pProgressData )
override;
178 CPLErr GetDefaultHistogram(
double *pdfMin,
double *pdfMax,
179 int *pnBuckets,
GUIntBig ** ppanHistogram,
181 GDALProgressFunc,
void *pProgressData)
override;
182 CPLErr SetDefaultHistogram(
double dfMin,
double dfMax,
183 int nBuckets,
GUIntBig *panHistogram )
override;
189 int GetMaskFlags()
override;
195 char **papszOptions )
override;
205typedef struct _GDALProxyPoolCacheEntry GDALProxyPoolCacheEntry;
206class GDALProxyPoolRasterBand;
208class CPL_DLL GDALProxyPoolDataset :
public GDALProxyDataset
213 char *pszProjectionRef =
nullptr;
214 double adfGeoTransform[6]{0,1,0,0,0,1};
215 int bHasSrcProjection =
false;
216 int bHasSrcGeoTransform =
false;
217 char *pszGCPProjection =
nullptr;
223 GDALProxyPoolCacheEntry* cacheEntry =
nullptr;
224 char *m_pszOwner =
nullptr;
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,
251 void AddSrcBand(
int nBand,
GDALDataType eDataType,
int nBlockXSize,
264 char **
GetMetadata(
const char * pszDomain )
override;
266 const char * pszDomain )
override;
281class GDALProxyPoolOverviewRasterBand;
282class GDALProxyPoolMaskBand;
284class CPL_DLL GDALProxyPoolRasterBand :
public GDALProxyRasterBand
289 char *pszUnitType =
nullptr;
290 char **papszCategoryNames =
nullptr;
293 int nSizeProxyOverviewRasterBand = 0;
294 GDALProxyPoolOverviewRasterBand **papoProxyOverviewRasterBand =
nullptr;
295 GDALProxyPoolMaskBand *poProxyMaskBand =
nullptr;
301 void UnrefUnderlyingRasterBand(
GDALRasterBand* poUnderlyingRasterBand )
304 friend class GDALProxyPoolOverviewRasterBand;
305 friend class GDALProxyPoolMaskBand;
308 GDALProxyPoolRasterBand( GDALProxyPoolDataset* poDS,
int nBand,
310 int nBlockXSize,
int nBlockYSize );
311 GDALProxyPoolRasterBand( GDALProxyPoolDataset* poDS,
313 ~GDALProxyPoolRasterBand()
override;
315 void AddSrcMaskBandDescription(
GDALDataType eDataType,
int nBlockXSize,
321 char **
GetMetadata(
const char * pszDomain )
override;
323 const char * pszDomain )
override;
324 char **GetCategoryNames()
override;
325 const char *GetUnitType()
override;
341class GDALProxyPoolOverviewRasterBand :
public GDALProxyPoolRasterBand
344 GDALProxyPoolRasterBand *poMainBand =
nullptr;
345 int nOverviewBand = 0;
348 int nRefCountUnderlyingMainRasterBand = 0;
354 void UnrefUnderlyingRasterBand(
GDALRasterBand* poUnderlyingRasterBand )
358 GDALProxyPoolOverviewRasterBand( GDALProxyPoolDataset* poDS,
360 GDALProxyPoolRasterBand* poMainBand,
362 ~GDALProxyPoolOverviewRasterBand()
override;
369class GDALProxyPoolMaskBand :
public GDALProxyPoolRasterBand
372 GDALProxyPoolRasterBand *poMainBand =
nullptr;
375 int nRefCountUnderlyingMainRasterBand = 0;
381 void UnrefUnderlyingRasterBand(
GDALRasterBand* poUnderlyingRasterBand )
385 GDALProxyPoolMaskBand( GDALProxyPoolDataset* poDS,
387 GDALProxyPoolRasterBand* poMainBand );
388 GDALProxyPoolMaskBand( GDALProxyPoolDataset* poDS,
389 GDALProxyPoolRasterBand* poMainBand,
391 int nBlockXSize,
int nBlockYSize );
392 ~GDALProxyPoolMaskBand()
override;
403typedef struct GDALProxyPoolDatasetHS *GDALProxyPoolDatasetH;
405GDALProxyPoolDatasetH CPL_DLL GDALProxyPoolDatasetCreate(
const char* pszSourceDatasetDescription,
406 int nRasterXSize,
int nRasterYSize,
408 const char * pszProjectionRef,
409 double * padfGeoTransform);
411void CPL_DLL GDALProxyPoolDatasetDelete(GDALProxyPoolDatasetH hProxyPoolDataset);
413void CPL_DLL GDALProxyPoolDatasetAddSrcBandDescription( GDALProxyPoolDatasetH hProxyPoolDataset,
415 int nBlockXSize,
int nBlockYSize);
A color table / palette.
Definition: gdal_priv.h:938
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:336
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:2278
char ** GetMetadataDomainList() override
Fetch list of metadata domains.
Definition: gdaldataset.cpp:3585
virtual void * GetInternalHandle(const char *pszHandleName)
Fetch a format specific internally meaningful handle.
Definition: gdaldataset.cpp:1022
CPLErr BuildOverviews(const char *, int, int *, int, int *, GDALProgressFunc, void *)
Build raster overview(s)
Definition: gdaldataset.cpp:1458
virtual CPLErr CreateMaskBand(int nFlagsIn)
Adds a mask band to the dataset.
Definition: gdaldataset.cpp:2460
virtual const char * GetGCPProjection()
Get output projection for GCPs.
Definition: gdaldataset.cpp:1299
virtual CPLErr SetGCPs(int nGCPCount, const GDAL_GCP *pasGCPList, const char *pszGCPProjection)
Assign GCPs.
Definition: gdaldataset.cpp:1382
virtual int GetGCPCount()
Get number of GCPs.
Definition: gdaldataset.cpp:1264
virtual CPLErr GetGeoTransform(double *padfTransform)
Fetch the affine transformation coefficients.
Definition: gdaldataset.cpp:922
virtual CPLErr SetProjection(const char *pszProjection)
Set the projection reference string for this dataset.
Definition: gdaldataset.cpp:864
CPLErr SetMetadata(char **papszMetadata, const char *pszDomain) override
Set metadata.
virtual GDALDriver * GetDriver(void)
Fetch the driver to which this dataset relates.
Definition: gdaldataset.cpp:1060
virtual CPLErr SetGeoTransform(double *padfTransform)
Set the affine transformation coefficients.
Definition: gdaldataset.cpp:977
virtual const char * GetProjectionRef(void)
Fetch the projection definition string for this dataset.
Definition: gdaldataset.cpp:824
CPLErr SetMetadataItem(const char *pszName, const char *pszValue, const char *pszDomain) override
Set single metadata item.
virtual void FlushCache(void)
Flush all write cached data to disk.
Definition: gdaldataset.cpp:396
void char ** GetMetadata(const char *pszDomain="") override
Fetch metadata.
Definition: gdaldataset.cpp:3484
virtual const GDAL_GCP * GetGCPs()
Fetch GCPs.
Definition: gdaldataset.cpp:1332
virtual char ** GetFileList(void)
Fetch files forming dataset.
Definition: gdaldataset.cpp:2360
const char * GetMetadataItem(const char *pszName, const char *pszDomain) override
Fetch single metadata item.
Format specific driver.
Definition: gdal_priv.h:1387
The GDALRasterAttributeTable (or RAT) class is used to encapsulate a table used to provide attribute ...
Definition: gdal_rat.h:48
A single raster band (or channel).
Definition: gdal_priv.h:1033
CPLErr
Error category.
Definition: cpl_error.h:53
struct _CPLHashSet CPLHashSet
Opaque type for a hash set.
Definition: cpl_hash_set.h:52
unsigned long long GUIntBig
Large unsigned integer type (generally 64-bit unsigned integer type).
Definition: cpl_port.h:251
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:339
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:337
#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:989
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:248
struct CPLVirtualMem CPLVirtualMem
Opaque type that represents a virtual memory mapping.
Definition: cpl_virtualmem.h:62
Public (C callable) GDAL entry points.
GIntBig GSpacing
Type to express pixel, line or band spacing.
Definition: gdal.h:273
GDALAccess
Definition: gdal.h:113
@ GA_ReadOnly
Definition: gdal.h:114
GDALDataType
Definition: gdal.h:60
GDALColorInterp
Definition: gdal.h:191
GDALRWFlag
Definition: gdal.h:119
Ground Control Point.
Definition: gdal.h:561