| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 |
|
|---|
| 73 |
|
|---|
| 74 |
|
|---|
| 75 |
|
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 |
|
|---|
| 89 |
|
|---|
| 90 |
|
|---|
| 91 |
|
|---|
| 92 |
|
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 |
|
|---|
| 98 |
|
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 |
|
|---|
| 102 |
|
|---|
| 103 |
|
|---|
| 104 |
|
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 |
#ifndef GDAL_PRIV_H_INCLUDED |
|---|
| 108 |
#define GDAL_PRIV_H_INCLUDED |
|---|
| 109 |
|
|---|
| 110 |
|
|---|
| 111 |
|
|---|
| 112 |
|
|---|
| 113 |
|
|---|
| 114 |
class GDALMajorObject; |
|---|
| 115 |
class GDALDataset; |
|---|
| 116 |
class GDALRasterBand; |
|---|
| 117 |
class GDALDriver; |
|---|
| 118 |
class GDALRasterAttributeTable; |
|---|
| 119 |
|
|---|
| 120 |
|
|---|
| 121 |
|
|---|
| 122 |
|
|---|
| 123 |
|
|---|
| 124 |
|
|---|
| 125 |
|
|---|
| 126 |
#include "gdal.h" |
|---|
| 127 |
#include "gdal_frmts.h" |
|---|
| 128 |
#include "cpl_vsi.h" |
|---|
| 129 |
#include "cpl_conv.h" |
|---|
| 130 |
#include "cpl_string.h" |
|---|
| 131 |
#include "cpl_minixml.h" |
|---|
| 132 |
#include <vector> |
|---|
| 133 |
|
|---|
| 134 |
#define GMO_VALID 0x0001 |
|---|
| 135 |
#define GMO_IGNORE_UNIMPLEMENTED 0x0002 |
|---|
| 136 |
#define GMO_SUPPORT_MD 0x0004 |
|---|
| 137 |
#define GMO_SUPPORT_MDMD 0x0008 |
|---|
| 138 |
#define GMO_MD_DIRTY 0x0010 |
|---|
| 139 |
#define GMO_PAM_CLASS 0x0020 |
|---|
| 140 |
|
|---|
| 141 |
|
|---|
| 142 |
|
|---|
| 143 |
|
|---|
| 144 |
|
|---|
| 145 |
class CPL_DLL GDALMultiDomainMetadata |
|---|
| 146 |
{ |
|---|
| 147 |
private: |
|---|
| 148 |
char **papszDomainList; |
|---|
| 149 |
char ***papapszMetadataLists; |
|---|
| 150 |
|
|---|
| 151 |
public: |
|---|
| 152 |
GDALMultiDomainMetadata(); |
|---|
| 153 |
~GDALMultiDomainMetadata(); |
|---|
| 154 |
|
|---|
| 155 |
int XMLInit( CPLXMLNode *psMetadata, int bMerge ); |
|---|
| 156 |
CPLXMLNode *Serialize(); |
|---|
| 157 |
|
|---|
| 158 |
char **GetDomainList() { return papszDomainList; } |
|---|
| 159 |
|
|---|
| 160 |
char **GetMetadata( const char * pszDomain = "" ); |
|---|
| 161 |
CPLErr SetMetadata( char ** papszMetadata, |
|---|
| 162 |
const char * pszDomain = "" ); |
|---|
| 163 |
const char *GetMetadataItem( const char * pszName, |
|---|
| 164 |
const char * pszDomain = "" ); |
|---|
| 165 |
CPLErr SetMetadataItem( const char * pszName, |
|---|
| 166 |
const char * pszValue, |
|---|
| 167 |
const char * pszDomain = "" ); |
|---|
| 168 |
|
|---|
| 169 |
void Clear(); |
|---|
| 170 |
}; |
|---|
| 171 |
|
|---|
| 172 |
|
|---|
| 173 |
|
|---|
| 174 |
|
|---|
| 175 |
|
|---|
| 176 |
|
|---|
| 177 |
|
|---|
| 178 |
|
|---|
| 179 |
|
|---|
| 180 |
|
|---|
| 181 |
class CPL_DLL GDALMajorObject |
|---|
| 182 |
{ |
|---|
| 183 |
protected: |
|---|
| 184 |
int nFlags; |
|---|
| 185 |
CPLString sDescription; |
|---|
| 186 |
GDALMultiDomainMetadata oMDMD; |
|---|
| 187 |
|
|---|
| 188 |
public: |
|---|
| 189 |
GDALMajorObject(); |
|---|
| 190 |
virtual ~GDALMajorObject(); |
|---|
| 191 |
|
|---|
| 192 |
int GetMOFlags(); |
|---|
| 193 |
void SetMOFlags(int nFlags); |
|---|
| 194 |
|
|---|
| 195 |
virtual const char *GetDescription() const; |
|---|
| 196 |
virtual void SetDescription( const char * ); |
|---|
| 197 |
|
|---|
| 198 |
virtual char **GetMetadata( const char * pszDomain = "" ); |
|---|
| 199 |
virtual CPLErr SetMetadata( char ** papszMetadata, |
|---|
| 200 |
const char * pszDomain = "" ); |
|---|
| 201 |
virtual const char *GetMetadataItem( const char * pszName, |
|---|
| 202 |
const char * pszDomain = "" ); |
|---|
| 203 |
virtual CPLErr SetMetadataItem( const char * pszName, |
|---|
| 204 |
const char * pszValue, |
|---|
| 205 |
const char * pszDomain = "" ); |
|---|
| 206 |
}; |
|---|
| 207 |
|
|---|
| 208 |
|
|---|
| 209 |
|
|---|
| 210 |
|
|---|
| 211 |
class CPL_DLL GDALDefaultOverviews |
|---|
| 212 |
{ |
|---|
| 213 |
GDALDataset *poDS; |
|---|
| 214 |
GDALDataset *poODS; |
|---|
| 215 |
|
|---|
| 216 |
CPLString osOvrFilename; |
|---|
| 217 |
|
|---|
| 218 |
int bOvrIsAux; |
|---|
| 219 |
|
|---|
| 220 |
public: |
|---|
| 221 |
GDALDefaultOverviews(); |
|---|
| 222 |
~GDALDefaultOverviews(); |
|---|
| 223 |
|
|---|
| 224 |
void Initialize( GDALDataset *poDS, const char *pszName = NULL, |
|---|
| 225 |
int bNameIsOVR = FALSE ); |
|---|
| 226 |
int IsInitialized() { return poDS != NULL; } |
|---|
| 227 |
|
|---|
| 228 |
int GetOverviewCount(int); |
|---|
| 229 |
GDALRasterBand *GetOverview(int,int); |
|---|
| 230 |
|
|---|
| 231 |
CPLErr BuildOverviews( const char * pszBasename, |
|---|
| 232 |
const char * pszResampling, |
|---|
| 233 |
int nOverviews, int * panOverviewList, |
|---|
| 234 |
int nBands, int * panBandList, |
|---|
| 235 |
GDALProgressFunc pfnProgress, |
|---|
| 236 |
void *pProgressData ); |
|---|
| 237 |
}; |
|---|
| 238 |
|
|---|
| 239 |
|
|---|
| 240 |
|
|---|
| 241 |
|
|---|
| 242 |
|
|---|
| 243 |
|
|---|
| 244 |
|
|---|
| 245 |
class CPL_DLL GDALDataset : public GDALMajorObject |
|---|
| 246 |
{ |
|---|
| 247 |
friend GDALDatasetH CPL_STDCALL GDALOpen( const char *, GDALAccess); |
|---|
| 248 |
friend GDALDatasetH CPL_STDCALL GDALOpenShared( const char *, GDALAccess); |
|---|
| 249 |
friend class GDALDriver; |
|---|
| 250 |
|
|---|
| 251 |
protected: |
|---|
| 252 |
GDALDriver *poDriver; |
|---|
| 253 |
GDALAccess eAccess; |
|---|
| 254 |
|
|---|
| 255 |
|
|---|
| 256 |
int nRasterXSize; |
|---|
| 257 |
int nRasterYSize; |
|---|
| 258 |
int nBands; |
|---|
| 259 |
GDALRasterBand **papoBands; |
|---|
| 260 |
|
|---|
| 261 |
int bForceCachedIO; |
|---|
| 262 |
|
|---|
| 263 |
int nRefCount; |
|---|
| 264 |
int bShared; |
|---|
| 265 |
|
|---|
| 266 |
GDALDataset(void); |
|---|
| 267 |
void RasterInitialize( int, int ); |
|---|
| 268 |
void SetBand( int, GDALRasterBand * ); |
|---|
| 269 |
|
|---|
| 270 |
GDALDefaultOverviews oOvManager; |
|---|
| 271 |
|
|---|
| 272 |
virtual CPLErr IBuildOverviews( const char *, int, int *, |
|---|
| 273 |
int, int *, GDALProgressFunc, void * ); |
|---|
| 274 |
|
|---|
| 275 |
virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int, |
|---|
| 276 |
void *, int, int, GDALDataType, |
|---|
| 277 |
int, int *, int, int, int ); |
|---|
| 278 |
|
|---|
| 279 |
CPLErr BlockBasedRasterIO( GDALRWFlag, int, int, int, int, |
|---|
| 280 |
void *, int, int, GDALDataType, |
|---|
| 281 |
int, int *, int, int, int ); |
|---|
| 282 |
void BlockBasedFlushCache(); |
|---|
| 283 |
|
|---|
| 284 |
friend class GDALRasterBand; |
|---|
| 285 |
|
|---|
| 286 |
public: |
|---|
| 287 |
virtual ~GDALDataset(); |
|---|
| 288 |
|
|---|
| 289 |
int GetRasterXSize( void ); |
|---|
| 290 |
int GetRasterYSize( void ); |
|---|
| 291 |
int GetRasterCount( void ); |
|---|
| 292 |
GDALRasterBand *GetRasterBand( int ); |
|---|
| 293 |
|
|---|
| 294 |
virtual void FlushCache(void); |
|---|
| 295 |
|
|---|
| 296 |
virtual const char *GetProjectionRef(void); |
|---|
| 297 |
virtual CPLErr SetProjection( const char * ); |
|---|
| 298 |
|
|---|
| 299 |
virtual CPLErr GetGeoTransform( double * ); |
|---|
| 300 |
virtual CPLErr SetGeoTransform( double * ); |
|---|
| 301 |
|
|---|
| 302 |
virtual CPLErr AddBand( GDALDataType eType, |
|---|
| 303 |
char **papszOptions=NULL ); |
|---|
| 304 |
|
|---|
| 305 |
virtual void *GetInternalHandle( const char * ); |
|---|
| 306 |
virtual GDALDriver *GetDriver(void); |
|---|
| 307 |
|
|---|
| 308 |
virtual int GetGCPCount(); |
|---|
| 309 |
virtual const char *GetGCPProjection(); |
|---|
| 310 |
virtual const GDAL_GCP *GetGCPs(); |
|---|
| 311 |
virtual CPLErr SetGCPs( int nGCPCount, const GDAL_GCP *pasGCPList, |
|---|
| 312 |
const char *pszGCPProjection ); |
|---|
| 313 |
|
|---|
| 314 |
virtual CPLErr AdviseRead( int nXOff, int nYOff, int nXSize, int nYSize, |
|---|
| 315 |
int nBufXSize, int nBufYSize, |
|---|
| 316 |
GDALDataType eDT, |
|---|
| 317 |
int nBandCount, int *panBandList, |
|---|
| 318 |
char **papszOptions ); |
|---|
| 319 |
|
|---|
| 320 |
CPLErr RasterIO( GDALRWFlag, int, int, int, int, |
|---|
| 321 |
void *, int, int, GDALDataType, |
|---|
| 322 |
int, int *, int, int, int ); |
|---|
| 323 |
|
|---|
| 324 |
int Reference(); |
|---|
| 325 |
int Dereference(); |
|---|
| 326 |
GDALAccess GetAccess() { return eAccess; } |
|---|
| 327 |
|
|---|
| 328 |
int GetShared(); |
|---|
| 329 |
void MarkAsShared(); |
|---|
| 330 |
|
|---|
| 331 |
static GDALDataset **GetOpenDatasets( int *pnDatasetCount ); |
|---|
| 332 |
|
|---|
| 333 |
CPLErr BuildOverviews( const char *, int, int *, |
|---|
| 334 |
int, int *, GDALProgressFunc, void * ); |
|---|
| 335 |
}; |
|---|
| 336 |
|
|---|
| 337 |
|
|---|
| 338 |
|
|---|
| 339 |
|
|---|
| 340 |
|
|---|
| 341 |
|
|---|
| 342 |
|
|---|
| 343 |
class CPL_DLL GDALRasterBlock |
|---|
| 344 |
{ |
|---|
| 345 |
GDALDataType eType; |
|---|
| 346 |
|
|---|
| 347 |
int bDirty; |
|---|
| 348 |
int nLockCount; |
|---|
| 349 |
|
|---|
| 350 |
int nXOff; |
|---|
| 351 |
int nYOff; |
|---|
| 352 |
|
|---|
| 353 |
int nXSize; |
|---|
| 354 |
int nYSize; |
|---|
| 355 |
|
|---|
| 356 |
void *pData; |
|---|
| 357 |
|
|---|
| 358 |
GDALRasterBand *poBand; |
|---|
| 359 |
|
|---|
| 360 |
GDALRasterBlock *poNext; |
|---|
| 361 |
GDALRasterBlock *poPrevious; |
|---|
| 362 |
|
|---|
| 363 |
public: |
|---|
| 364 |
GDALRasterBlock( GDALRasterBand *, int, int ); |
|---|
| 365 |
virtual ~GDALRasterBlock(); |
|---|
| 366 |
|
|---|
| 367 |
CPLErr Internalize( void ); |
|---|
| 368 |
void Touch( void ); |
|---|
| 369 |
void MarkDirty( void ); |
|---|
| 370 |
void MarkClean( void ); |
|---|
| 371 |
void AddLock( void ) { nLockCount++; } |
|---|
| 372 |
void DropLock( void ) { nLockCount--; } |
|---|
| 373 |
void Detach(); |
|---|
| 374 |
|
|---|
| 375 |
CPLErr Write(); |
|---|
| 376 |
|
|---|
| 377 |
GDALDataType GetDataType() { return eType; } |
|---|
| 378 |
int GetXOff() { return nXOff; } |
|---|
| 379 |
int GetYOff() { return nYOff; } |
|---|
| 380 |
int GetXSize() { return nXSize; } |
|---|
| 381 |
int GetYSize() { return nYSize; } |
|---|
| 382 |
int GetDirty() { return bDirty; } |
|---|
| 383 |
int GetLockCount() { return nLockCount; } |
|---|
| 384 |
|
|---|
| 385 |
void *GetDataRef( void ) { return pData; } |
|---|
| 386 |
|
|---|
| 387 |
GDALRasterBand *GetBand() { return poBand; } |
|---|
| 388 |
|
|---|
| 389 |
static int FlushCacheBlock(); |
|---|
| 390 |
static void Verify(); |
|---|
| 391 |
|
|---|
| 392 |
static int SafeLockBlock( GDALRasterBlock ** ); |
|---|
| 393 |
}; |
|---|
| 394 |
|
|---|
| 395 |
|
|---|
| 396 |
|
|---|
| 397 |
|
|---|
| 398 |
|
|---|
| 399 |
class CPL_DLL GDALColorTable |
|---|
| 400 |
{ |
|---|
| 401 |
GDALPaletteInterp eInterp; |
|---|
| 402 |
|
|---|
| 403 |
std::vector<GDALColorEntry> aoEntries; |
|---|
| 404 |
|
|---|
| 405 |
public: |
|---|
| 406 |
GDALColorTable( GDALPaletteInterp = GPI_RGB ); |
|---|
| 407 |
~GDALColorTable(); |
|---|
| 408 |
|
|---|
| 409 |
GDALColorTable *Clone() const; |
|---|
| 410 |
|
|---|
| 411 |
GDALPaletteInterp GetPaletteInterpretation() const; |
|---|
| 412 |
|
|---|
| 413 |
int GetColorEntryCount() const; |
|---|
| 414 |
const GDALColorEntry *GetColorEntry( int ) const; |
|---|
| 415 |
int GetColorEntryAsRGB( int, GDALColorEntry * ) const; |
|---|
| 416 |
void SetColorEntry( int, const GDALColorEntry * ); |
|---|
| 417 |
}; |
|---|
| 418 |
|
|---|
| 419 |
|
|---|
| 420 |
|
|---|
| 421 |
|
|---|
| 422 |
|
|---|
| 423 |
|
|---|
| 424 |
|
|---|
| 425 |
class CPL_DLL GDALRasterBand : public GDALMajorObject |
|---|
| 426 |
{ |
|---|
| 427 |
protected: |
|---|
| 428 |
GDALDataset *poDS; |
|---|
| 429 |
int nBand; |
|---|
| 430 |
|
|---|
| 431 |
int nRasterXSize; |
|---|
| 432 |
int nRasterYSize; |
|---|
| 433 |
|
|---|
| 434 |
GDALDataType eDataType; |
|---|
| 435 |
GDALAccess eAccess; |
|---|
| 436 |
|
|---|
| 437 |
|
|---|
| 438 |
int nBlockXSize; |
|---|
| 439 |
int nBlockYSize; |
|---|
| 440 |
int nBlocksPerRow; |
|---|
| 441 |
int nBlocksPerColumn; |
|---|
| 442 |
|
|---|
| 443 |
int bSubBlockingActive; |
|---|
| 444 |
int nSubBlocksPerRow; |
|---|
| 445 |
int nSubBlocksPerColumn; |
|---|
| 446 |
GDALRasterBlock **papoBlocks; |
|---|
| 447 |
|
|---|
| 448 |
int nBlockReads; |
|---|
| 449 |
int bForceCachedIO; |
|---|
| 450 |
|
|---|
| 451 |
friend class GDALDataset; |
|---|
| 452 |
friend class GDALRasterBlock; |
|---|
| 453 |
|
|---|
| 454 |
protected: |
|---|
| 455 |
virtual CPLErr IReadBlock( int, int, void * ) = 0; |
|---|
| 456 |
virtual CPLErr IWriteBlock( int, int, void * ); |
|---|
| 457 |
virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int, |
|---|
| 458 |
void *, int, int, GDALDataType, |
|---|
| 459 |
int, int ); |
|---|
| 460 |
CPLErr OverviewRasterIO( GDALRWFlag, int, int, int, int, |
|---|
| 461 |
void *, int, int, GDALDataType, |
|---|
| 462 |
int, int ); |
|---|
| 463 |
|
|---|
| 464 |
int InitBlockInfo(); |
|---|
| 465 |
|
|---|
| 466 |
CPLErr AdoptBlock( int, int, GDALRasterBlock * ); |
|---|
| 467 |
GDALRasterBlock *TryGetLockedBlockRef( int nXBlockOff, int nYBlockYOff ); |
|---|
| 468 |
|
|---|
| 469 |
public: |
|---|
| 470 |
GDALRasterBand(); |
|---|
| 471 |
|
|---|
| 472 |
virtual ~GDALRasterBand(); |
|---|
| 473 |
|
|---|
| 474 |
int GetXSize(); |
|---|
| 475 |
int GetYSize(); |
|---|
| 476 |
int GetBand(); |
|---|
| 477 |
GDALDataset*GetDataset(); |
|---|
| 478 |
|
|---|
| 479 |
GDALDataType GetRasterDataType( void ); |
|---|
| 480 |
void GetBlockSize( int *, int * ); |
|---|
| 481 |
GDALAccess GetAccess(); |
|---|
| 482 |
|
|---|
| 483 |
CPLErr RasterIO( GDALRWFlag, int, int, int, int, |
|---|
| 484 |
void *, int, int, GDALDataType, |
|---|
| 485 |
int, int ); |
|---|
| 486 |
CPLErr ReadBlock( int, int, void * ); |
|---|
| 487 |
|
|---|
| 488 |
CPLErr WriteBlock( int, int, void * ); |
|---|
| 489 |
|
|---|
| 490 |
GDALRasterBlock *GetLockedBlockRef( int nXBlockOff, int nYBlockOff, |
|---|
| 491 |
int bJustInitialize = FALSE ); |
|---|
| 492 |
CPLErr FlushBlock( int = -1, int = -1 ); |
|---|
| 493 |
|
|---|
| 494 |
|
|---|
| 495 |
|
|---|
| 496 |
virtual CPLErr FlushCache(); |
|---|
| 497 |
virtual char **GetCategoryNames(); |
|---|
| 498 |
virtual double GetNoDataValue( int *pbSuccess = NULL ); |
|---|
| 499 |
virtual double GetMinimum( int *pbSuccess = NULL ); |
|---|
| 500 |
virtual double GetMaximum(int *pbSuccess = NULL ); |
|---|
| 501 |
virtual double GetOffset( int *pbSuccess = NULL ); |
|---|
| 502 |
virtual double GetScale( int *pbSuccess = NULL ); |
|---|
| 503 |
virtual const char *GetUnitType(); |
|---|
| 504 |
virtual GDALColorInterp GetColorInterpretation(); |
|---|
| 505 |
virtual GDALColorTable *GetColorTable(); |
|---|
| 506 |
virtual CPLErr Fill(double dfRealValue, double dfImaginaryValue = 0); |
|---|
| 507 |
|
|---|
| 508 |
virtual CPLErr SetCategoryNames( char ** ); |
|---|
| 509 |
virtual CPLErr SetNoDataValue( double ); |
|---|
| 510 |
virtual CPLErr SetColorTable( GDALColorTable * ); |
|---|
| 511 |
virtual CPLErr SetColorInterpretation( GDALColorInterp ); |
|---|
| 512 |
virtual CPLErr SetOffset( double ); |
|---|
| 513 |
virtual CPLErr SetScale( double ); |
|---|
| 514 |
virtual CPLErr SetUnitType( const char * ); |
|---|
| 515 |
|
|---|
| 516 |
virtual CPLErr GetStatistics( int bApproxOK, int bForce, |
|---|
| 517 |
double *pdfMin, double *pdfMax, |
|---|
| 518 |
double *pdfMean, double *padfStdDev ); |
|---|
| 519 |
virtual CPLErr SetStatistics( double dfMin, double dfMax, |
|---|
| 520 |
double dfMean, double dfStdDev ); |
|---|
| 521 |
|
|---|
| 522 |
virtual int HasArbitraryOverviews(); |
|---|
| 523 |
virtual int GetOverviewCount(); |
|---|
| 524 |
virtual GDALRasterBand *GetOverview(int); |
|---|
| 525 |
virtual CPLErr BuildOverviews( const char *, int, int *, |
|---|
| 526 |
GDALProgressFunc, void * ); |
|---|
| 527 |
|
|---|
| 528 |
virtual CPLErr AdviseRead( int nXOff, int nYOff, int nXSize, int nYSize, |
|---|
| 529 |
int nBufXSize, int nBufYSize, |
|---|
| 530 |
GDALDataType eDT, char **papszOptions ); |
|---|
| 531 |
|
|---|
| 532 |
virtual CPLErr GetHistogram( double dfMin, double dfMax, |
|---|
| 533 |
int nBuckets, int * panHistogram, |
|---|
| 534 |
int bIncludeOutOfRange, int bApproxOK, |
|---|
| 535 |
GDALProgressFunc, void *pProgressData ); |
|---|
| 536 |
|
|---|
| 537 |
virtual CPLErr GetDefaultHistogram( double *pdfMin, double *pdfMax, |
|---|
| 538 |
int *pnBuckets, int ** ppanHistogram, |
|---|
| 539 |
int bForce, |
|---|
| 540 |
GDALProgressFunc, void *pProgressData); |
|---|
| 541 |
virtual CPLErr SetDefaultHistogram( double dfMin, double dfMax, |
|---|
| 542 |
int nBuckets, int *panHistogram ); |
|---|
| 543 |
|
|---|
| 544 |
virtual const GDALRasterAttributeTable *GetDefaultRAT(); |
|---|
| 545 |
virtual CPLErr SetDefaultRAT( const GDALRasterAttributeTable * ); |
|---|
| 546 |
}; |
|---|
| 547 |
|
|---|
| 548 |
|
|---|
| 549 |
|
|---|
| 550 |
|
|---|
| 551 |
|
|---|
| 552 |
|
|---|
| 553 |
|
|---|
| 554 |
class CPL_DLL GDALOpenInfo |
|---|
| 555 |
{ |
|---|
| 556 |
public: |
|---|
| 557 |
|
|---|
| 558 |
GDALOpenInfo( const char * pszFile, GDALAccess eAccessIn ); |
|---|
| 559 |
~GDALOpenInfo( void ); |
|---|
| 560 |
|
|---|
| 561 |
char *pszFilename; |
|---|
| 562 |
|
|---|
| 563 |
GDALAccess eAccess; |
|---|
| 564 |
|
|---|
| 565 |
int bStatOK; |
|---|
| 566 |
int bIsDirectory; |
|---|
| 567 |
|
|---|
| 568 |
FILE *fp; |
|---|
| 569 |
|
|---|
| 570 |
int nHeaderBytes; |
|---|
| 571 |
GByte *pabyHeader; |
|---|
| 572 |
|
|---|
| 573 |
}; |
|---|
| 574 |
|
|---|
| 575 |
|
|---|
| 576 |
|
|---|
| 577 |
|
|---|
| 578 |
|
|---|
| 579 |
|
|---|
| 580 |
|
|---|
| 581 |
|
|---|
| 582 |
|
|---|
| 583 |
|
|---|
| 584 |
|
|---|
| 585 |
|
|---|
| 586 |
|
|---|
| 587 |
|
|---|
| 588 |
|
|---|
| 589 |
|
|---|
| 590 |
|
|---|
| 591 |
class CPL_DLL GDALDriver : public GDALMajorObject |
|---|
| 592 |
{ |
|---|
| 593 |
public: |
|---|
| 594 |
GDALDriver(); |
|---|
| 595 |
~GDALDriver(); |
|---|
| 596 |
|
|---|
| 597 |
|
|---|
| 598 |
|
|---|
| 599 |
|
|---|
| 600 |
GDALDataset *Create( const char * pszName, |
|---|
| 601 |
int nXSize, int nYSize, int nBands, |
|---|
| 602 |
GDALDataType eType, char ** papszOptions ); |
|---|
| 603 |
|
|---|
| 604 |
CPLErr Delete( const char * pszName ); |
|---|
| 605 |
|
|---|
| 606 |
GDALDataset *CreateCopy( const char *, GDALDataset *, |
|---|
| 607 |
int, char **, |
|---|
| 608 |
GDALProgressFunc pfnProgress, |
|---|
| 609 |
void * pProgressData ); |
|---|
| 610 |
|
|---|
| 611 |
|
|---|
| 612 |
|
|---|
| 613 |
|
|---|
| 614 |
|
|---|
| 615 |
|
|---|
| 616 |
GDALDataset *(*pfnOpen)( GDALOpenInfo * ); |
|---|
| 617 |
|
|---|
| 618 |
GDALDataset *(*pfnCreate)( const char * pszName, |
|---|
| 619 |
int nXSize, int nYSize, int nBands, |
|---|
| 620 |
GDALDataType eType, |
|---|
| 621 |
char ** papszOptions ); |
|---|
| 622 |
|
|---|
| 623 |
CPLErr (*pfnDelete)( const char * pszName ); |
|---|
| 624 |
|
|---|
| 625 |
GDALDataset *(*pfnCreateCopy)( const char *, GDALDataset *, |
|---|
| 626 |
int, char **, |
|---|
| 627 |
GDALProgressFunc pfnProgress, |
|---|
| 628 |
void * pProgressData ); |
|---|
| 629 |
|
|---|
| 630 |
void *pDriverData; |
|---|
| 631 |
|
|---|
| 632 |
void (*pfnUnloadDriver)(GDALDriver *); |
|---|
| 633 |
}; |
|---|
| 634 |
|
|---|
| 635 |
|
|---|
| 636 |
|
|---|
| 637 |
|
|---|
| 638 |
|
|---|
| 639 |
|
|---|
| 640 |
|
|---|
| 641 |
|
|---|
| 642 |
|
|---|
| 643 |
|
|---|
| 644 |
|
|---|
| 645 |
|
|---|
| 646 |
class CPL_DLL GDALDriverManager : public GDALMajorObject |
|---|
| 647 |
{ |
|---|
| 648 |
int nDrivers; |
|---|
| 649 |
GDALDriver **papoDrivers; |
|---|
| 650 |
|
|---|
| 651 |
char *pszHome; |
|---|
| 652 |
|
|---|
| 653 |
public: |
|---|
| 654 |
GDALDriverManager(); |
|---|
| 655 |
~GDALDriverManager(); |
|---|
| 656 |
|
|---|
| 657 |
int GetDriverCount( void ); |
|---|
| 658 |
GDALDriver *GetDriver( int ); |
|---|
| 659 |
GDALDriver *GetDriverByName( const char * ); |
|---|
| 660 |
|
|---|
| 661 |
int RegisterDriver( GDALDriver * ); |
|---|
| 662 |
void MoveDriver( GDALDriver *, int ); |
|---|
| 663 |
void DeregisterDriver( GDALDriver * ); |
|---|
| 664 |
|
|---|
| 665 |
void AutoLoadDrivers(); |
|---|
| 666 |
void AutoSkipDrivers(); |
|---|
| 667 |
|
|---|
| 668 |
const char *GetHome(); |
|---|
| 669 |
void SetHome( const char * ); |
|---|
| 670 |
}; |
|---|
| 671 |
|
|---|
| 672 |
CPL_C_START |
|---|
| 673 |
GDALDriverManager CPL_DLL * GetGDALDriverManager( void ); |
|---|
| 674 |
CPL_C_END |
|---|
| 675 |
|
|---|
| 676 |
|
|---|
| 677 |
|
|---|
| 678 |
|
|---|
| 679 |
|
|---|
| 680 |
CPL_C_START |
|---|
| 681 |
|
|---|
| 682 |
CPLErr CPL_DLL |
|---|
| 683 |
HFAAuxBuildOverviews( const char *pszOvrFilename, GDALDataset *poParentDS, |
|---|
| 684 |
GDALDataset **ppoDS, |
|---|
| 685 |
int nBands, int *panBandList, |
|---|
| 686 |
int nNewOverviews, int *panNewOverviewList, |
|---|
| 687 |
const char *pszResampling, |
|---|
| 688 |
GDALProgressFunc pfnProgress, |
|---|
| 689 |
void *pProgressData ); |
|---|
| 690 |
CPLErr CPL_DLL |
|---|
| 691 |
GTIFFBuildOverviews( const char * pszFilename, |
|---|
| 692 |
int nBands, GDALRasterBand **papoBandList, |
|---|
| 693 |
int nOverviews, int * panOverviewList, |
|---|
| 694 |
const char * pszResampling, |
|---|
| 695 |
GDALProgressFunc pfnProgress, void * pProgressData ); |
|---|
| 696 |
|
|---|
| 697 |
CPLErr CPL_DLL |
|---|
| 698 |
GDALDefaultBuildOverviews( GDALDataset *hSrcDS, const char * pszBasename, |
|---|
| 699 |
const char * pszResampling, |
|---|
| 700 |
int nOverviews, int * panOverviewList, |
|---|
| 701 |
int nBands, int * panBandList, |
|---|
| 702 |
GDALProgressFunc pfnProgress, void * pProgressData); |
|---|
| 703 |
|
|---|
| 704 |
|
|---|
| 705 |
CPLErr CPL_DLL |
|---|
| 706 |
GDALRegenerateOverviews( GDALRasterBand *, int, GDALRasterBand **, |
|---|
| 707 |
const char *, GDALProgressFunc, void * ); |
|---|
| 708 |
|
|---|
| 709 |
int CPL_DLL GDALOvLevelAdjust( int nOvLevel, int nXSize ); |
|---|
| 710 |
|
|---|
| 711 |
GDALDataset CPL_DLL * |
|---|
| 712 |
GDALFindAssociatedAuxFile( const char *pszBasefile, GDALAccess eAccess ); |
|---|
| 713 |
|
|---|
| 714 |
CPL_C_END |
|---|
| 715 |
|
|---|
| 716 |
#endif |
|---|