30 #ifndef GDAL_PROXY_H_INCLUDED 31 #define GDAL_PROXY_H_INCLUDED 49 GDALProxyDataset() {};
52 virtual void UnrefUnderlyingDataset(
GDALDataset* poUnderlyingDataset);
54 virtual CPLErr IBuildOverviews(
const char *,
int,
int *,
63 virtual
char **GetMetadata( const
char * pszDomain ) CPL_OVERRIDE;
64 virtual
CPLErr SetMetadata(
char ** papszMetadata,
65 const
char * pszDomain ) CPL_OVERRIDE;
66 virtual const
char *GetMetadataItem( const
char * pszName,
67 const
char * pszDomain ) CPL_OVERRIDE;
68 virtual
CPLErr SetMetadataItem( const
char * pszName,
69 const
char * pszValue,
70 const
char * pszDomain ) CPL_OVERRIDE;
72 virtual
void FlushCache(
void) CPL_OVERRIDE;
74 virtual const
char *GetProjectionRef(
void) CPL_OVERRIDE;
75 virtual
CPLErr SetProjection( const
char * ) CPL_OVERRIDE;
77 virtual
CPLErr GetGeoTransform(
double * ) CPL_OVERRIDE;
78 virtual
CPLErr SetGeoTransform(
double * ) CPL_OVERRIDE;
80 virtual
void *GetInternalHandle( const
char * ) CPL_OVERRIDE;
81 virtual
GDALDriver *GetDriver(
void) CPL_OVERRIDE;
82 virtual
char **GetFileList(
void) CPL_OVERRIDE;
84 virtual
int GetGCPCount() CPL_OVERRIDE;
85 virtual const
char *GetGCPProjection() CPL_OVERRIDE;
86 virtual const
GDAL_GCP *GetGCPs() CPL_OVERRIDE;
88 const
char *pszGCPProjection ) CPL_OVERRIDE;
90 virtual
CPLErr AdviseRead(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
91 int nBufXSize,
int nBufYSize,
93 int nBandCount,
int *panBandList,
94 char **papszOptions ) CPL_OVERRIDE;
96 virtual
CPLErr CreateMaskBand(
int nFlags ) CPL_OVERRIDE;
109 GDALProxyRasterBand() {};
111 virtual GDALRasterBand* RefUnderlyingRasterBand() = 0;
112 virtual void UnrefUnderlyingRasterBand(GDALRasterBand* poUnderlyingRasterBand);
123 virtual
char **GetMetadata( const
char * pszDomain ) CPL_OVERRIDE;
124 virtual
CPLErr SetMetadata(
char ** papszMetadata,
125 const
char * pszDomain ) CPL_OVERRIDE;
126 virtual const
char *GetMetadataItem( const
char * pszName,
127 const
char * pszDomain ) CPL_OVERRIDE;
128 virtual
CPLErr SetMetadataItem( const
char * pszName,
129 const
char * pszValue,
130 const
char * pszDomain ) CPL_OVERRIDE;
131 virtual
CPLErr FlushCache() CPL_OVERRIDE;
132 virtual
char **GetCategoryNames() CPL_OVERRIDE;
133 virtual
double GetNoDataValue(
int *pbSuccess = NULL ) CPL_OVERRIDE;
134 virtual
double GetMinimum(
int *pbSuccess = NULL ) CPL_OVERRIDE;
135 virtual
double GetMaximum(
int *pbSuccess = NULL ) CPL_OVERRIDE;
136 virtual
double GetOffset(
int *pbSuccess = NULL ) CPL_OVERRIDE;
137 virtual
double GetScale(
int *pbSuccess = NULL ) CPL_OVERRIDE;
138 virtual const
char *GetUnitType() CPL_OVERRIDE;
141 virtual
CPLErr Fill(
double dfRealValue,
double dfImaginaryValue = 0) CPL_OVERRIDE;
143 virtual
CPLErr SetCategoryNames(
char ** ) CPL_OVERRIDE;
144 virtual
CPLErr SetNoDataValue(
double ) CPL_OVERRIDE;
145 virtual
CPLErr DeleteNoDataValue() CPL_OVERRIDE;
148 virtual
CPLErr SetOffset(
double ) CPL_OVERRIDE;
149 virtual
CPLErr SetScale(
double ) CPL_OVERRIDE;
150 virtual
CPLErr SetUnitType( const
char * ) CPL_OVERRIDE;
152 virtual
CPLErr GetStatistics(
int bApproxOK,
int bForce,
153 double *pdfMin,
double *pdfMax,
154 double *pdfMean,
double *padfStdDev ) CPL_OVERRIDE;
155 virtual
CPLErr ComputeStatistics(
int bApproxOK,
156 double *pdfMin,
double *pdfMax,
157 double *pdfMean,
double *pdfStdDev,
158 GDALProgressFunc,
void *pProgressData ) CPL_OVERRIDE;
159 virtual
CPLErr SetStatistics(
double dfMin,
double dfMax,
160 double dfMean,
double dfStdDev ) CPL_OVERRIDE;
161 virtual
CPLErr ComputeRasterMinMax(
int,
double* ) CPL_OVERRIDE;
163 virtual
int HasArbitraryOverviews() CPL_OVERRIDE;
164 virtual
int GetOverviewCount() CPL_OVERRIDE;
165 virtual GDALRasterBand *GetOverview(
int) CPL_OVERRIDE;
166 virtual GDALRasterBand *GetRasterSampleOverview(
GUIntBig ) CPL_OVERRIDE;
167 virtual
CPLErr BuildOverviews( const
char *,
int,
int *,
168 GDALProgressFunc,
void * ) CPL_OVERRIDE;
170 virtual
CPLErr AdviseRead(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
171 int nBufXSize,
int nBufYSize,
174 virtual
CPLErr GetHistogram(
double dfMin,
double dfMax,
175 int nBuckets,
GUIntBig * panHistogram,
176 int bIncludeOutOfRange,
int bApproxOK,
177 GDALProgressFunc,
void *pProgressData ) CPL_OVERRIDE;
179 virtual
CPLErr GetDefaultHistogram(
double *pdfMin,
double *pdfMax,
180 int *pnBuckets,
GUIntBig ** ppanHistogram,
182 GDALProgressFunc,
void *pProgressData) CPL_OVERRIDE;
183 virtual
CPLErr SetDefaultHistogram(
double dfMin,
double dfMax,
184 int nBuckets,
GUIntBig *panHistogram ) CPL_OVERRIDE;
189 virtual GDALRasterBand *GetMaskBand() CPL_OVERRIDE;
190 virtual
int GetMaskFlags() CPL_OVERRIDE;
191 virtual
CPLErr CreateMaskBand(
int nFlags ) CPL_OVERRIDE;
196 char **papszOptions ) CPL_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 virtual GDALDataset *RefUnderlyingDataset() CPL_OVERRIDE;
227 virtual
void UnrefUnderlyingDataset(
GDALDataset* poUnderlyingDataset) CPL_OVERRIDE;
229 friend class GDALProxyPoolRasterBand;
232 GDALProxyPoolDataset(const
char* pszSourceDatasetDescription,
233 int nRasterXSize,
int nRasterYSize,
236 const
char * pszProjectionRef = NULL,
237 double * padfGeoTransform = NULL);
238 virtual ~GDALProxyPoolDataset();
240 void SetOpenOptions(
char** papszOpenOptions);
241 void AddSrcBandDescription(
GDALDataType eDataType,
int nBlockXSize,
int nBlockYSize);
243 virtual const
char *GetProjectionRef(
void) CPL_OVERRIDE;
244 virtual
CPLErr SetProjection( const
char * ) CPL_OVERRIDE;
246 virtual
CPLErr GetGeoTransform(
double * ) CPL_OVERRIDE;
247 virtual
CPLErr SetGeoTransform(
double * ) CPL_OVERRIDE;
252 virtual
char **GetMetadata( const
char * pszDomain ) CPL_OVERRIDE;
253 virtual const
char *GetMetadataItem( const
char * pszName,
254 const
char * pszDomain ) CPL_OVERRIDE;
256 virtual
void *GetInternalHandle( const
char * pszRequest ) CPL_OVERRIDE;
258 virtual const
char *GetGCPProjection() CPL_OVERRIDE;
259 virtual const
GDAL_GCP *GetGCPs() CPL_OVERRIDE;
268 class GDALProxyPoolOverviewRasterBand;
269 class GDALProxyPoolMaskBand;
271 class CPL_DLL GDALProxyPoolRasterBand : public GDALProxyRasterBand
277 char **papszCategoryNames;
280 int nSizeProxyOverviewRasterBand;
281 GDALProxyPoolOverviewRasterBand **papoProxyOverviewRasterBand;
282 GDALProxyPoolMaskBand *poProxyMaskBand;
287 virtual GDALRasterBand* RefUnderlyingRasterBand() CPL_OVERRIDE;
288 virtual
void UnrefUnderlyingRasterBand(GDALRasterBand* poUnderlyingRasterBand) CPL_OVERRIDE;
290 friend class GDALProxyPoolOverviewRasterBand;
291 friend class GDALProxyPoolMaskBand;
294 GDALProxyPoolRasterBand(GDALProxyPoolDataset* poDS,
int nBand,
296 int nBlockXSize,
int nBlockYSize);
297 GDALProxyPoolRasterBand(GDALProxyPoolDataset* poDS,
298 GDALRasterBand* poUnderlyingRasterBand);
299 virtual ~GDALProxyPoolRasterBand();
301 void AddSrcMaskBandDescription(
GDALDataType eDataType,
int nBlockXSize,
int nBlockYSize);
306 virtual
char **GetMetadata( const
char * pszDomain ) CPL_OVERRIDE;
307 virtual const
char *GetMetadataItem( const
char * pszName,
308 const
char * pszDomain ) CPL_OVERRIDE;
309 virtual
char **GetCategoryNames() CPL_OVERRIDE;
310 virtual const
char *GetUnitType() CPL_OVERRIDE;
312 virtual GDALRasterBand *GetOverview(
int) CPL_OVERRIDE;
313 virtual GDALRasterBand *GetRasterSampleOverview(
GUIntBig nDesiredSamples) CPL_OVERRIDE;
314 virtual GDALRasterBand *GetMaskBand() CPL_OVERRIDE;
323 class GDALProxyPoolOverviewRasterBand : public GDALProxyPoolRasterBand
326 GDALProxyPoolRasterBand *poMainBand;
329 GDALRasterBand *poUnderlyingMainRasterBand;
330 int nRefCountUnderlyingMainRasterBand;
333 virtual GDALRasterBand* RefUnderlyingRasterBand() CPL_OVERRIDE;
334 virtual
void UnrefUnderlyingRasterBand(GDALRasterBand* poUnderlyingRasterBand) CPL_OVERRIDE;
337 GDALProxyPoolOverviewRasterBand(GDALProxyPoolDataset* poDS,
338 GDALRasterBand* poUnderlyingOverviewBand,
339 GDALProxyPoolRasterBand* poMainBand,
341 virtual ~GDALProxyPoolOverviewRasterBand();
348 class GDALProxyPoolMaskBand : public GDALProxyPoolRasterBand
351 GDALProxyPoolRasterBand *poMainBand;
353 GDALRasterBand *poUnderlyingMainRasterBand;
354 int nRefCountUnderlyingMainRasterBand;
357 virtual GDALRasterBand* RefUnderlyingRasterBand() CPL_OVERRIDE;
358 virtual
void UnrefUnderlyingRasterBand(GDALRasterBand* poUnderlyingRasterBand) CPL_OVERRIDE;
361 GDALProxyPoolMaskBand(GDALProxyPoolDataset* poDS,
362 GDALRasterBand* poUnderlyingMaskBand,
363 GDALProxyPoolRasterBand* poMainBand);
364 GDALProxyPoolMaskBand(GDALProxyPoolDataset* poDS,
365 GDALProxyPoolRasterBand* poMainBand,
367 int nBlockXSize,
int nBlockYSize);
368 virtual ~GDALProxyPoolMaskBand();
379 typedef struct GDALProxyPoolDatasetHS *GDALProxyPoolDatasetH;
381 GDALProxyPoolDatasetH CPL_DLL GDALProxyPoolDatasetCreate(
const char* pszSourceDatasetDescription,
382 int nRasterXSize,
int nRasterYSize,
384 const char * pszProjectionRef,
385 double * padfGeoTransform);
387 void CPL_DLL GDALProxyPoolDatasetDelete(GDALProxyPoolDatasetH hProxyPoolDataset);
389 void CPL_DLL GDALProxyPoolDatasetAddSrcBandDescription( GDALProxyPoolDatasetH hProxyPoolDataset,
391 int nBlockXSize,
int nBlockYSize);
The GDALRasterAttributeTable (or RAT) class is used to encapsulate a table used to provide attribute ...
Definition: gdal_rat.h:46
GDALDataType
Definition: gdal.h:57
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:352
#define CPL_OVERRIDE
To be used in public headers only.
Definition: cpl_port.h:1049
GDALRWFlag
Definition: gdal.h:105
struct CPLVirtualMem CPLVirtualMem
Opaque type that represents a virtual memory mapping.
Definition: cpl_virtualmem.h:62
GIntBig GSpacing
Type to express pixel, line or band spacing.
Definition: gdal.h:259
Public (C callable) GDAL entry points.
virtual char ** GetMetadataDomainList() CPL_OVERRIDE
Fetch list of metadata domains.
Definition: gdaldataset.cpp:3566
unsigned long long GUIntBig
Large unsigned integer type (generally 64-bit unsigned integer type).
Definition: cpl_port.h:253
A single raster band (or channel).
Definition: gdal_priv.h:832
GDALAccess
Definition: gdal.h:99
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:322
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:354
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:250
GDALColorInterp
Definition: gdal.h:176
struct _CPLHashSet CPLHashSet
Opaque type for a hash set.
Definition: cpl_hash_set.h:52
Format specific driver.
Definition: gdal_priv.h:1163
A color table / palette.
Definition: gdal_priv.h:752
Ground Control Point.
Definition: gdal.h:515
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:1073