GDAL
|
00001 /****************************************************************************** 00002 * $Id: gdal_priv.h 31109 2015-10-23 19:53:08Z rouault $ 00003 * 00004 * Name: gdal_priv.h 00005 * Project: GDAL Core 00006 * Purpose: GDAL Core C++/Private declarations. 00007 * Author: Frank Warmerdam, warmerdam@pobox.com 00008 * 00009 ****************************************************************************** 00010 * Copyright (c) 1998, Frank Warmerdam 00011 * Copyright (c) 2007-2014, Even Rouault <even dot rouault at mines-paris dot org> 00012 * 00013 * Permission is hereby granted, free of charge, to any person obtaining a 00014 * copy of this software and associated documentation files (the "Software"), 00015 * to deal in the Software without restriction, including without limitation 00016 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00017 * and/or sell copies of the Software, and to permit persons to whom the 00018 * Software is furnished to do so, subject to the following conditions: 00019 * 00020 * The above copyright notice and this permission notice shall be included 00021 * in all copies or substantial portions of the Software. 00022 * 00023 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00024 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00025 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00026 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00027 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00028 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 00029 * DEALINGS IN THE SOFTWARE. 00030 ****************************************************************************/ 00031 00032 #ifndef GDAL_PRIV_H_INCLUDED 00033 #define GDAL_PRIV_H_INCLUDED 00034 00035 /* -------------------------------------------------------------------- */ 00036 /* Predeclare various classes before pulling in gdal.h, the */ 00037 /* public declarations. */ 00038 /* -------------------------------------------------------------------- */ 00039 class GDALMajorObject; 00040 class GDALDataset; 00041 class GDALRasterBand; 00042 class GDALDriver; 00043 class GDALRasterAttributeTable; 00044 class GDALProxyDataset; 00045 class GDALProxyRasterBand; 00046 class GDALAsyncReader; 00047 00048 /* -------------------------------------------------------------------- */ 00049 /* Pull in the public declarations. This gets the C apis, and */ 00050 /* also various constants. However, we will still get to */ 00051 /* provide the real class definitions for the GDAL classes. */ 00052 /* -------------------------------------------------------------------- */ 00053 00054 #include "gdal.h" 00055 #include "gdal_frmts.h" 00056 #include "cpl_vsi.h" 00057 #include "cpl_conv.h" 00058 #include "cpl_string.h" 00059 #include "cpl_minixml.h" 00060 #include "cpl_multiproc.h" 00061 #include <vector> 00062 #include <map> 00063 #include "ogr_core.h" 00064 00065 #define GMO_VALID 0x0001 00066 #define GMO_IGNORE_UNIMPLEMENTED 0x0002 00067 #define GMO_SUPPORT_MD 0x0004 00068 #define GMO_SUPPORT_MDMD 0x0008 00069 #define GMO_MD_DIRTY 0x0010 00070 #define GMO_PAM_CLASS 0x0020 00071 00072 /************************************************************************/ 00073 /* GDALMultiDomainMetadata */ 00074 /************************************************************************/ 00075 00076 class CPL_DLL GDALMultiDomainMetadata 00077 { 00078 private: 00079 char **papszDomainList; 00080 CPLStringList **papoMetadataLists; 00081 00082 public: 00083 GDALMultiDomainMetadata(); 00084 ~GDALMultiDomainMetadata(); 00085 00086 int XMLInit( CPLXMLNode *psMetadata, int bMerge ); 00087 CPLXMLNode *Serialize(); 00088 00089 char **GetDomainList() { return papszDomainList; } 00090 00091 char **GetMetadata( const char * pszDomain = "" ); 00092 CPLErr SetMetadata( char ** papszMetadata, 00093 const char * pszDomain = "" ); 00094 const char *GetMetadataItem( const char * pszName, 00095 const char * pszDomain = "" ); 00096 CPLErr SetMetadataItem( const char * pszName, 00097 const char * pszValue, 00098 const char * pszDomain = "" ); 00099 00100 void Clear(); 00101 }; 00102 00103 /* ******************************************************************** */ 00104 /* GDALMajorObject */ 00105 /* */ 00106 /* Base class providing metadata, description and other */ 00107 /* services shared by major objects. */ 00108 /* ******************************************************************** */ 00109 00111 00112 class CPL_DLL GDALMajorObject 00113 { 00114 protected: 00115 int nFlags; // GMO_* flags. 00116 CPLString sDescription; 00117 GDALMultiDomainMetadata oMDMD; 00118 00119 char **BuildMetadataDomainList(char** papszList, int bCheckNonEmpty, ...) CPL_NULL_TERMINATED; 00120 00121 public: 00122 GDALMajorObject(); 00123 virtual ~GDALMajorObject(); 00124 00125 int GetMOFlags(); 00126 void SetMOFlags(int nFlagsIn); 00127 00128 virtual const char *GetDescription() const; 00129 virtual void SetDescription( const char * ); 00130 00131 virtual char **GetMetadataDomainList(); 00132 00133 virtual char **GetMetadata( const char * pszDomain = "" ); 00134 virtual CPLErr SetMetadata( char ** papszMetadata, 00135 const char * pszDomain = "" ); 00136 virtual const char *GetMetadataItem( const char * pszName, 00137 const char * pszDomain = "" ); 00138 virtual CPLErr SetMetadataItem( const char * pszName, 00139 const char * pszValue, 00140 const char * pszDomain = "" ); 00141 }; 00142 00143 /* ******************************************************************** */ 00144 /* GDALDefaultOverviews */ 00145 /* ******************************************************************** */ 00146 class CPL_DLL GDALDefaultOverviews 00147 { 00148 friend class GDALDataset; 00149 00150 GDALDataset *poDS; 00151 GDALDataset *poODS; 00152 00153 CPLString osOvrFilename; 00154 00155 int bOvrIsAux; 00156 00157 int bCheckedForMask; 00158 int bOwnMaskDS; 00159 GDALDataset *poMaskDS; 00160 00161 // for "overview datasets" we record base level info so we can 00162 // find our way back to get overview masks. 00163 GDALDataset *poBaseDS; 00164 00165 // Stuff for deferred initialize/overviewscans... 00166 bool bCheckedForOverviews; 00167 void OverviewScan(); 00168 char *pszInitName; 00169 int bInitNameIsOVR; 00170 char **papszInitSiblingFiles; 00171 00172 public: 00173 GDALDefaultOverviews(); 00174 ~GDALDefaultOverviews(); 00175 00176 void Initialize( GDALDataset *poDSIn, const char *pszName = NULL, 00177 char **papszSiblingFiles = NULL, 00178 int bNameIsOVR = FALSE ); 00179 00180 int IsInitialized(); 00181 00182 int CloseDependentDatasets(); 00183 00184 // Overview Related 00185 00186 int GetOverviewCount(int); 00187 GDALRasterBand *GetOverview(int,int); 00188 00189 CPLErr BuildOverviews( const char * pszBasename, 00190 const char * pszResampling, 00191 int nOverviews, int * panOverviewList, 00192 int nBands, int * panBandList, 00193 GDALProgressFunc pfnProgress, 00194 void *pProgressData ); 00195 00196 CPLErr BuildOverviewsSubDataset( const char * pszPhysicalFile, 00197 const char * pszResampling, 00198 int nOverviews, int * panOverviewList, 00199 int nBands, int * panBandList, 00200 GDALProgressFunc pfnProgress, 00201 void *pProgressData ); 00202 00203 CPLErr CleanOverviews(); 00204 00205 // Mask Related 00206 00207 CPLErr CreateMaskBand( int nFlags, int nBand = -1 ); 00208 GDALRasterBand *GetMaskBand( int nBand ); 00209 int GetMaskFlags( int nBand ); 00210 00211 int HaveMaskFile( char **papszSiblings = NULL, 00212 const char *pszBasename = NULL ); 00213 00214 char** GetSiblingFiles() { return papszInitSiblingFiles; } 00215 }; 00216 00217 /* ******************************************************************** */ 00218 /* GDALOpenInfo */ 00219 /* */ 00220 /* Structure of data about dataset for open functions. */ 00221 /* ******************************************************************** */ 00222 00223 class CPL_DLL GDALOpenInfo 00224 { 00225 int bHasGotSiblingFiles; 00226 char **papszSiblingFiles; 00227 int nHeaderBytesTried; 00228 00229 public: 00230 GDALOpenInfo( const char * pszFile, int nOpenFlagsIn, 00231 char **papszSiblingFiles = NULL ); 00232 ~GDALOpenInfo( void ); 00233 00234 char *pszFilename; 00235 char** papszOpenOptions; 00236 00237 GDALAccess eAccess; 00238 int nOpenFlags; 00239 00240 int bStatOK; 00241 int bIsDirectory; 00242 00243 VSILFILE *fpL; 00244 00245 int nHeaderBytes; 00246 GByte *pabyHeader; 00247 00248 int TryToIngest(int nBytes); 00249 char **GetSiblingFiles(); 00250 }; 00251 00252 /* ******************************************************************** */ 00253 /* GDALDataset */ 00254 /* ******************************************************************** */ 00255 00256 class OGRLayer; 00257 class OGRGeometry; 00258 class OGRSpatialReference; 00259 class OGRStyleTable; 00260 class swq_select; 00261 class swq_select_parse_options; 00262 typedef struct GDALSQLParseInfo GDALSQLParseInfo; 00263 00264 #ifdef DETECT_OLD_IRASTERIO 00265 typedef void signature_changed; 00266 #endif 00267 00268 #ifdef GDAL_COMPILATION 00269 #define OPTIONAL_OUTSIDE_GDAL(val) 00270 #else 00271 #define OPTIONAL_OUTSIDE_GDAL(val) = val 00272 #endif 00273 00275 00276 class CPL_DLL GDALDataset : public GDALMajorObject 00277 { 00278 friend GDALDatasetH CPL_STDCALL GDALOpenEx( const char* pszFilename, 00279 unsigned int nOpenFlags, 00280 const char* const* papszAllowedDrivers, 00281 const char* const* papszOpenOptions, 00282 const char* const* papszSiblingFiles ); 00283 friend void CPL_STDCALL GDALClose( GDALDatasetH hDS ); 00284 00285 friend class GDALDriver; 00286 friend class GDALDefaultOverviews; 00287 friend class GDALProxyDataset; 00288 friend class GDALDriverManager; 00289 00290 void AddToDatasetOpenList(); 00291 00292 protected: 00293 GDALDriver *poDriver; 00294 GDALAccess eAccess; 00295 00296 // Stored raster information. 00297 int nRasterXSize; 00298 int nRasterYSize; 00299 int nBands; 00300 GDALRasterBand **papoBands; 00301 00302 int bForceCachedIO; 00303 00304 int nRefCount; 00305 int bShared; 00306 GByte bIsInternal; 00307 GByte bSuppressOnClose; 00308 GByte bReserved1; 00309 GByte bReserved2; 00310 00311 GDALDataset(void); 00312 00313 void RasterInitialize( int, int ); 00314 void SetBand( int, GDALRasterBand * ); 00315 00316 GDALDefaultOverviews oOvManager; 00317 00318 virtual CPLErr IBuildOverviews( const char *, int, int *, 00319 int, int *, GDALProgressFunc, void * ); 00320 00321 #ifdef DETECT_OLD_IRASTERIO 00322 virtual signature_changed IRasterIO( GDALRWFlag, int, int, int, int, 00323 void *, int, int, GDALDataType, 00324 int, int *, int, int, int ) {}; 00325 #endif 00326 00327 virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int, 00328 void *, int, int, GDALDataType, 00329 int, int *, GSpacing, GSpacing, GSpacing, 00330 GDALRasterIOExtraArg* psExtraArg ); 00331 00332 CPLErr BlockBasedRasterIO( GDALRWFlag, int, int, int, int, 00333 void *, int, int, GDALDataType, 00334 int, int *, GSpacing, GSpacing, GSpacing, 00335 GDALRasterIOExtraArg* psExtraArg ); 00336 void BlockBasedFlushCache(); 00337 00338 CPLErr ValidateRasterIOOrAdviseReadParameters( 00339 const char* pszCallingFunc, 00340 int* pbStopProcessingOnCENone, 00341 int nXOff, int nYOff, int nXSize, int nYSize, 00342 int nBufXSize, int nBufYSize, 00343 int nBandCount, int *panBandMap); 00344 00345 virtual int CloseDependentDatasets(); 00346 00347 int ValidateLayerCreationOptions( const char* const* papszLCO ); 00348 00349 char **papszOpenOptions; 00350 00351 friend class GDALRasterBand; 00352 00353 int EnterReadWrite(GDALRWFlag eRWFlag); 00354 void LeaveReadWrite(); 00355 00356 void TemporarilyDropReadWriteLock(); 00357 void ReacquireReadWriteLock(); 00358 00359 public: 00360 virtual ~GDALDataset(); 00361 00362 int GetRasterXSize( void ); 00363 int GetRasterYSize( void ); 00364 int GetRasterCount( void ); 00365 GDALRasterBand *GetRasterBand( int ); 00366 00367 virtual void FlushCache(void); 00368 00369 virtual const char *GetProjectionRef(void); 00370 virtual CPLErr SetProjection( const char * ); 00371 00372 virtual CPLErr GetGeoTransform( double * ); 00373 virtual CPLErr SetGeoTransform( double * ); 00374 00375 virtual CPLErr AddBand( GDALDataType eType, 00376 char **papszOptions=NULL ); 00377 00378 virtual void *GetInternalHandle( const char * ); 00379 virtual GDALDriver *GetDriver(void); 00380 virtual char **GetFileList(void); 00381 00382 virtual const char* GetDriverName(); 00383 00384 virtual int GetGCPCount(); 00385 virtual const char *GetGCPProjection(); 00386 virtual const GDAL_GCP *GetGCPs(); 00387 virtual CPLErr SetGCPs( int nGCPCount, const GDAL_GCP *pasGCPList, 00388 const char *pszGCPProjection ); 00389 00390 virtual CPLErr AdviseRead( int nXOff, int nYOff, int nXSize, int nYSize, 00391 int nBufXSize, int nBufYSize, 00392 GDALDataType eDT, 00393 int nBandCount, int *panBandList, 00394 char **papszOptions ); 00395 00396 virtual CPLErr CreateMaskBand( int nFlagsIn ); 00397 00398 virtual GDALAsyncReader* 00399 BeginAsyncReader(int nXOff, int nYOff, int nXSize, int nYSize, 00400 void *pBuf, int nBufXSize, int nBufYSize, 00401 GDALDataType eBufType, 00402 int nBandCount, int* panBandMap, 00403 int nPixelSpace, int nLineSpace, int nBandSpace, 00404 char **papszOptions); 00405 virtual void EndAsyncReader(GDALAsyncReader *); 00406 00407 CPLErr RasterIO( GDALRWFlag, int, int, int, int, 00408 void *, int, int, GDALDataType, 00409 int, int *, GSpacing, GSpacing, GSpacing, 00410 GDALRasterIOExtraArg* psExtraArg 00411 #ifndef DOXYGEN_SKIP 00412 OPTIONAL_OUTSIDE_GDAL(NULL) 00413 #endif 00414 ); 00415 00416 int Reference(); 00417 int Dereference(); 00418 GDALAccess GetAccess() { return eAccess; } 00419 00420 int GetShared(); 00421 void MarkAsShared(); 00422 00423 void MarkSuppressOnClose() { bSuppressOnClose = TRUE; } 00424 00425 char **GetOpenOptions() { return papszOpenOptions; } 00426 00427 static GDALDataset **GetOpenDatasets( int *pnDatasetCount ); 00428 00429 CPLErr BuildOverviews( const char *, int, int *, 00430 int, int *, GDALProgressFunc, void * ); 00431 00432 void ReportError(CPLErr eErrClass, int err_no, const char *fmt, ...) CPL_PRINT_FUNC_FORMAT (4, 5); 00433 00434 private: 00435 void *m_hPrivateData; 00436 00437 OGRLayer* BuildLayerFromSelectInfo(swq_select* psSelectInfo, 00438 OGRGeometry *poSpatialFilter, 00439 const char *pszDialect, 00440 swq_select_parse_options* poSelectParseOptions); 00441 00442 public: 00443 00444 virtual int GetLayerCount(); 00445 virtual OGRLayer *GetLayer(int); 00446 virtual OGRLayer *GetLayerByName(const char *); 00447 virtual OGRErr DeleteLayer(int); 00448 00449 virtual int TestCapability( const char * ); 00450 00451 virtual OGRLayer *CreateLayer( const char *pszName, 00452 OGRSpatialReference *poSpatialRef = NULL, 00453 OGRwkbGeometryType eGType = wkbUnknown, 00454 char ** papszOptions = NULL ); 00455 virtual OGRLayer *CopyLayer( OGRLayer *poSrcLayer, 00456 const char *pszNewName, 00457 char **papszOptions = NULL ); 00458 00459 virtual OGRStyleTable *GetStyleTable(); 00460 virtual void SetStyleTableDirectly( OGRStyleTable *poStyleTable ); 00461 00462 virtual void SetStyleTable(OGRStyleTable *poStyleTable); 00463 00464 virtual OGRLayer * ExecuteSQL( const char *pszStatement, 00465 OGRGeometry *poSpatialFilter, 00466 const char *pszDialect ); 00467 virtual void ReleaseResultSet( OGRLayer * poResultsSet ); 00468 00469 int GetRefCount() const; 00470 int GetSummaryRefCount() const; 00471 OGRErr Release(); 00472 00473 virtual OGRErr StartTransaction(int bForce=FALSE); 00474 virtual OGRErr CommitTransaction(); 00475 virtual OGRErr RollbackTransaction(); 00476 00477 static int IsGenericSQLDialect(const char* pszDialect); 00478 00479 // Semi-public methods. Only to be used by in-tree drivers. 00480 GDALSQLParseInfo* BuildParseInfo(swq_select* psSelectInfo, 00481 swq_select_parse_options* poSelectParseOptions); 00482 void DestroyParseInfo(GDALSQLParseInfo* psParseInfo ); 00483 OGRLayer * ExecuteSQL( const char *pszStatement, 00484 OGRGeometry *poSpatialFilter, 00485 const char *pszDialect, 00486 swq_select_parse_options* poSelectParseOptions); 00487 00488 protected: 00489 00490 virtual OGRLayer *ICreateLayer( const char *pszName, 00491 OGRSpatialReference *poSpatialRef = NULL, 00492 OGRwkbGeometryType eGType = wkbUnknown, 00493 char ** papszOptions = NULL ); 00494 00495 OGRErr ProcessSQLCreateIndex( const char * ); 00496 OGRErr ProcessSQLDropIndex( const char * ); 00497 OGRErr ProcessSQLDropTable( const char * ); 00498 OGRErr ProcessSQLAlterTableAddColumn( const char * ); 00499 OGRErr ProcessSQLAlterTableDropColumn( const char * ); 00500 OGRErr ProcessSQLAlterTableAlterColumn( const char * ); 00501 OGRErr ProcessSQLAlterTableRenameColumn( const char * ); 00502 00503 OGRStyleTable *m_poStyleTable; 00504 }; 00505 00506 /* ******************************************************************** */ 00507 /* GDALRasterBlock */ 00508 /* ******************************************************************** */ 00509 00511 00512 class CPL_DLL GDALRasterBlock 00513 { 00514 GDALDataType eType; 00515 00516 int bDirty; 00517 int nLockCount; 00518 00519 int nXOff; 00520 int nYOff; 00521 00522 int nXSize; 00523 int nYSize; 00524 00525 void *pData; 00526 00527 GDALRasterBand *poBand; 00528 00529 GDALRasterBlock *poNext; 00530 GDALRasterBlock *poPrevious; 00531 00532 int bMustDetach; 00533 00534 void Touch_unlocked( void ); 00535 void Detach_unlocked( void ); 00536 00537 public: 00538 GDALRasterBlock( GDALRasterBand *, int, int ); 00539 virtual ~GDALRasterBlock(); 00540 00541 CPLErr Internalize( void ); 00542 void Touch( void ); 00543 void MarkDirty( void ); 00544 void MarkClean( void ); 00545 void AddLock( void ) { nLockCount++; } 00546 void DropLock( void ) { nLockCount--; } 00547 void Detach(); 00548 00549 CPLErr Write(); 00550 00551 GDALDataType GetDataType() { return eType; } 00552 int GetXOff() { return nXOff; } 00553 int GetYOff() { return nYOff; } 00554 int GetXSize() { return nXSize; } 00555 int GetYSize() { return nYSize; } 00556 int GetDirty() { return bDirty; } 00557 int GetLockCount() { return nLockCount; } 00558 00559 void *GetDataRef( void ) { return pData; } 00560 int GetBlockSize() { return nXSize * nYSize * (GDALGetDataTypeSize(eType) / 8); } 00561 00564 GDALRasterBand *GetBand() { return poBand; } 00565 00566 static void FlushDirtyBlocks(); 00567 static int FlushCacheBlock(int bDirtyBlocksOnly = FALSE); 00568 static void Verify(); 00569 00570 static int SafeLockBlock( GDALRasterBlock ** ); 00571 00572 /* Should only be called by GDALDestroyDriverManager() */ 00573 static void DestroyRBMutex(); 00574 }; 00575 00576 /* ******************************************************************** */ 00577 /* GDALColorTable */ 00578 /* ******************************************************************** */ 00579 00582 class CPL_DLL GDALColorTable 00583 { 00584 GDALPaletteInterp eInterp; 00585 00586 std::vector<GDALColorEntry> aoEntries; 00587 00588 public: 00589 GDALColorTable( GDALPaletteInterp = GPI_RGB ); 00590 ~GDALColorTable(); 00591 00592 GDALColorTable *Clone() const; 00593 int IsSame(const GDALColorTable* poOtherCT) const; 00594 00595 GDALPaletteInterp GetPaletteInterpretation() const; 00596 00597 int GetColorEntryCount() const; 00598 const GDALColorEntry *GetColorEntry( int ) const; 00599 int GetColorEntryAsRGB( int, GDALColorEntry * ) const; 00600 void SetColorEntry( int, const GDALColorEntry * ); 00601 int CreateColorRamp( int, const GDALColorEntry * , 00602 int, const GDALColorEntry * ); 00603 }; 00604 00605 /* ******************************************************************** */ 00606 /* GDALRasterBand */ 00607 /* ******************************************************************** */ 00608 00610 00611 class CPL_DLL GDALRasterBand : public GDALMajorObject 00612 { 00613 private: 00614 CPLErr eFlushBlockErr; 00615 00616 void SetFlushBlockErr( CPLErr eErr ); 00617 00618 friend class GDALRasterBlock; 00619 CPLErr UnreferenceBlock( int nXBlockOff, int nYBlockOff ); 00620 00621 protected: 00622 GDALDataset *poDS; 00623 int nBand; /* 1 based */ 00624 00625 int nRasterXSize; 00626 int nRasterYSize; 00627 00628 GDALDataType eDataType; 00629 GDALAccess eAccess; 00630 00631 /* stuff related to blocking, and raster cache */ 00632 int nBlockXSize; 00633 int nBlockYSize; 00634 int nBlocksPerRow; 00635 int nBlocksPerColumn; 00636 00637 int bSubBlockingActive; 00638 int nSubBlocksPerRow; 00639 int nSubBlocksPerColumn; 00640 GDALRasterBlock **papoBlocks; 00641 00642 int nBlockReads; 00643 int bForceCachedIO; 00644 00645 GDALRasterBand *poMask; 00646 bool bOwnMask; 00647 int nMaskFlags; 00648 00649 void InvalidateMaskBand(); 00650 00651 friend class GDALDataset; 00652 friend class GDALProxyRasterBand; 00653 friend class GDALDefaultOverviews; 00654 00655 CPLErr RasterIOResampled( GDALRWFlag, int, int, int, int, 00656 void *, int, int, GDALDataType, 00657 GSpacing, GSpacing, GDALRasterIOExtraArg* psExtraArg ); 00658 00659 int EnterReadWrite(GDALRWFlag eRWFlag); 00660 void LeaveReadWrite(); 00661 00662 protected: 00663 virtual CPLErr IReadBlock( int, int, void * ) = 0; 00664 virtual CPLErr IWriteBlock( int, int, void * ); 00665 00666 #ifdef DETECT_OLD_IRASTERIO 00667 virtual signature_changed IRasterIO( GDALRWFlag, int, int, int, int, 00668 void *, int, int, GDALDataType, 00669 int, int ) {}; 00670 #endif 00671 00672 virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int, 00673 void *, int, int, GDALDataType, 00674 GSpacing, GSpacing, GDALRasterIOExtraArg* psExtraArg ); 00675 CPLErr OverviewRasterIO( GDALRWFlag, int, int, int, int, 00676 void *, int, int, GDALDataType, 00677 GSpacing, GSpacing, GDALRasterIOExtraArg* psExtraArg ); 00678 00679 int InitBlockInfo(); 00680 00681 CPLErr AdoptBlock( int, int, GDALRasterBlock * ); 00682 GDALRasterBlock *TryGetLockedBlockRef( int nXBlockOff, int nYBlockYOff ); 00683 00684 public: 00685 GDALRasterBand(); 00686 00687 virtual ~GDALRasterBand(); 00688 00689 int GetXSize(); 00690 int GetYSize(); 00691 int GetBand(); 00692 GDALDataset*GetDataset(); 00693 00694 GDALDataType GetRasterDataType( void ); 00695 void GetBlockSize( int *, int * ); 00696 GDALAccess GetAccess(); 00697 00698 CPLErr RasterIO( GDALRWFlag, int, int, int, int, 00699 void *, int, int, GDALDataType, 00700 GSpacing, GSpacing, GDALRasterIOExtraArg* psExtraArg 00701 #ifndef DOXYGEN_SKIP 00702 OPTIONAL_OUTSIDE_GDAL(NULL) 00703 #endif 00704 ); 00705 CPLErr ReadBlock( int, int, void * ); 00706 00707 CPLErr WriteBlock( int, int, void * ); 00708 00709 GDALRasterBlock *GetLockedBlockRef( int nXBlockOff, int nYBlockOff, 00710 int bJustInitialize = FALSE ); 00711 CPLErr FlushBlock( int = -1, int = -1, int bWriteDirtyBlock = TRUE ); 00712 00713 unsigned char* GetIndexColorTranslationTo(/* const */ GDALRasterBand* poReferenceBand, 00714 unsigned char* pTranslationTable = NULL, 00715 int* pApproximateMatching = NULL); 00716 00717 // New OpengIS CV_SampleDimension stuff. 00718 00719 virtual CPLErr FlushCache(); 00720 virtual char **GetCategoryNames(); 00721 virtual double GetNoDataValue( int *pbSuccess = NULL ); 00722 virtual double GetMinimum( int *pbSuccess = NULL ); 00723 virtual double GetMaximum(int *pbSuccess = NULL ); 00724 virtual double GetOffset( int *pbSuccess = NULL ); 00725 virtual double GetScale( int *pbSuccess = NULL ); 00726 virtual const char *GetUnitType(); 00727 virtual GDALColorInterp GetColorInterpretation(); 00728 virtual GDALColorTable *GetColorTable(); 00729 virtual CPLErr Fill(double dfRealValue, double dfImaginaryValue = 0); 00730 00731 virtual CPLErr SetCategoryNames( char ** ); 00732 virtual CPLErr SetNoDataValue( double ); 00733 virtual CPLErr SetColorTable( GDALColorTable * ); 00734 virtual CPLErr SetColorInterpretation( GDALColorInterp ); 00735 virtual CPLErr SetOffset( double ); 00736 virtual CPLErr SetScale( double ); 00737 virtual CPLErr SetUnitType( const char * ); 00738 00739 virtual CPLErr GetStatistics( int bApproxOK, int bForce, 00740 double *pdfMin, double *pdfMax, 00741 double *pdfMean, double *padfStdDev ); 00742 virtual CPLErr ComputeStatistics( int bApproxOK, 00743 double *pdfMin, double *pdfMax, 00744 double *pdfMean, double *pdfStdDev, 00745 GDALProgressFunc, void *pProgressData ); 00746 virtual CPLErr SetStatistics( double dfMin, double dfMax, 00747 double dfMean, double dfStdDev ); 00748 virtual CPLErr ComputeRasterMinMax( int, double* ); 00749 00750 virtual int HasArbitraryOverviews(); 00751 virtual int GetOverviewCount(); 00752 virtual GDALRasterBand *GetOverview(int); 00753 virtual GDALRasterBand *GetRasterSampleOverview( GUIntBig ); 00754 virtual CPLErr BuildOverviews( const char *, int, int *, 00755 GDALProgressFunc, void * ); 00756 00757 virtual CPLErr AdviseRead( int nXOff, int nYOff, int nXSize, int nYSize, 00758 int nBufXSize, int nBufYSize, 00759 GDALDataType eDT, char **papszOptions ); 00760 00761 virtual CPLErr GetHistogram( double dfMin, double dfMax, 00762 int nBuckets, GUIntBig * panHistogram, 00763 int bIncludeOutOfRange, int bApproxOK, 00764 GDALProgressFunc, void *pProgressData ); 00765 00766 virtual CPLErr GetDefaultHistogram( double *pdfMin, double *pdfMax, 00767 int *pnBuckets, GUIntBig ** ppanHistogram, 00768 int bForce, 00769 GDALProgressFunc, void *pProgressData); 00770 virtual CPLErr SetDefaultHistogram( double dfMin, double dfMax, 00771 int nBuckets, GUIntBig *panHistogram ); 00772 00773 virtual GDALRasterAttributeTable *GetDefaultRAT(); 00774 virtual CPLErr SetDefaultRAT( const GDALRasterAttributeTable * ); 00775 00776 virtual GDALRasterBand *GetMaskBand(); 00777 virtual int GetMaskFlags(); 00778 virtual CPLErr CreateMaskBand( int nFlagsIn ); 00779 00780 virtual CPLVirtualMem *GetVirtualMemAuto( GDALRWFlag eRWFlag, 00781 int *pnPixelSpace, 00782 GIntBig *pnLineSpace, 00783 char **papszOptions ); 00784 00785 void ReportError(CPLErr eErrClass, int err_no, const char *fmt, ...) CPL_PRINT_FUNC_FORMAT (4, 5); 00786 }; 00787 00788 /* ******************************************************************** */ 00789 /* GDALAllValidMaskBand */ 00790 /* ******************************************************************** */ 00791 00792 class CPL_DLL GDALAllValidMaskBand : public GDALRasterBand 00793 { 00794 protected: 00795 virtual CPLErr IReadBlock( int, int, void * ); 00796 00797 public: 00798 GDALAllValidMaskBand( GDALRasterBand * ); 00799 virtual ~GDALAllValidMaskBand(); 00800 00801 virtual GDALRasterBand *GetMaskBand(); 00802 virtual int GetMaskFlags(); 00803 }; 00804 00805 /* ******************************************************************** */ 00806 /* GDALNoDataMaskBand */ 00807 /* ******************************************************************** */ 00808 00809 class CPL_DLL GDALNoDataMaskBand : public GDALRasterBand 00810 { 00811 double dfNoDataValue; 00812 GDALRasterBand *poParent; 00813 00814 protected: 00815 virtual CPLErr IReadBlock( int, int, void * ); 00816 virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int, 00817 void *, int, int, GDALDataType, 00818 GSpacing, GSpacing, GDALRasterIOExtraArg* psExtraArg ); 00819 00820 public: 00821 GDALNoDataMaskBand( GDALRasterBand * ); 00822 virtual ~GDALNoDataMaskBand(); 00823 }; 00824 00825 /* ******************************************************************** */ 00826 /* GDALNoDataValuesMaskBand */ 00827 /* ******************************************************************** */ 00828 00829 class CPL_DLL GDALNoDataValuesMaskBand : public GDALRasterBand 00830 { 00831 double *padfNodataValues; 00832 00833 protected: 00834 virtual CPLErr IReadBlock( int, int, void * ); 00835 00836 public: 00837 GDALNoDataValuesMaskBand( GDALDataset * ); 00838 virtual ~GDALNoDataValuesMaskBand(); 00839 }; 00840 00841 /* ******************************************************************** */ 00842 /* GDALRescaledAlphaBand */ 00843 /* ******************************************************************** */ 00844 00845 class GDALRescaledAlphaBand : public GDALRasterBand 00846 { 00847 GDALRasterBand *poParent; 00848 void *pTemp; 00849 00850 protected: 00851 virtual CPLErr IReadBlock( int, int, void * ); 00852 virtual CPLErr IRasterIO( GDALRWFlag, int, int, int, int, 00853 void *, int, int, GDALDataType, 00854 GSpacing, GSpacing, GDALRasterIOExtraArg* psExtraArg ); 00855 00856 public: 00857 GDALRescaledAlphaBand( GDALRasterBand * ); 00858 virtual ~GDALRescaledAlphaBand(); 00859 }; 00860 00861 /* ******************************************************************** */ 00862 /* GDALDriver */ 00863 /* ******************************************************************** */ 00864 00865 00877 class CPL_DLL GDALDriver : public GDALMajorObject 00878 { 00879 public: 00880 GDALDriver(); 00881 ~GDALDriver(); 00882 00883 virtual CPLErr SetMetadataItem( const char * pszName, 00884 const char * pszValue, 00885 const char * pszDomain = "" ); 00886 00887 /* -------------------------------------------------------------------- */ 00888 /* Public C++ methods. */ 00889 /* -------------------------------------------------------------------- */ 00890 GDALDataset *Create( const char * pszName, 00891 int nXSize, int nYSize, int nBands, 00892 GDALDataType eType, char ** papszOptions ) CPL_WARN_UNUSED_RESULT; 00893 00894 CPLErr Delete( const char * pszName ); 00895 CPLErr Rename( const char * pszNewName, 00896 const char * pszOldName ); 00897 CPLErr CopyFiles( const char * pszNewName, 00898 const char * pszOldName ); 00899 00900 GDALDataset *CreateCopy( const char *, GDALDataset *, 00901 int, char **, 00902 GDALProgressFunc pfnProgress, 00903 void * pProgressData ) CPL_WARN_UNUSED_RESULT; 00904 00905 /* -------------------------------------------------------------------- */ 00906 /* The following are semiprivate, not intended to be accessed */ 00907 /* by anyone but the formats instantiating and populating the */ 00908 /* drivers. */ 00909 /* -------------------------------------------------------------------- */ 00910 GDALDataset *(*pfnOpen)( GDALOpenInfo * ); 00911 00912 GDALDataset *(*pfnCreate)( const char * pszName, 00913 int nXSize, int nYSize, int nBands, 00914 GDALDataType eType, 00915 char ** papszOptions ); 00916 00917 CPLErr (*pfnDelete)( const char * pszName ); 00918 00919 GDALDataset *(*pfnCreateCopy)( const char *, GDALDataset *, 00920 int, char **, 00921 GDALProgressFunc pfnProgress, 00922 void * pProgressData ); 00923 00924 void *pDriverData; 00925 00926 void (*pfnUnloadDriver)(GDALDriver *); 00927 00928 /* Return 1 if the passed file is certainly recognized by the driver */ 00929 /* Return 0 if the passed file is certainly NOT recognized by the driver */ 00930 /* Return -1 if the passed file may be or may not be recognized by the driver, 00931 and that a potentially costly test must be done with pfnOpen */ 00932 int (*pfnIdentify)( GDALOpenInfo * ); 00933 00934 CPLErr (*pfnRename)( const char * pszNewName, 00935 const char * pszOldName ); 00936 CPLErr (*pfnCopyFiles)( const char * pszNewName, 00937 const char * pszOldName ); 00938 00939 /* For legacy OGR drivers */ 00940 GDALDataset *(*pfnOpenWithDriverArg)( GDALDriver*, GDALOpenInfo * ); 00941 GDALDataset *(*pfnCreateVectorOnly)( GDALDriver*, 00942 const char * pszName, 00943 char ** papszOptions ); 00944 CPLErr (*pfnDeleteDataSource)( GDALDriver*, 00945 const char * pszName ); 00946 00947 /* -------------------------------------------------------------------- */ 00948 /* Helper methods. */ 00949 /* -------------------------------------------------------------------- */ 00950 GDALDataset *DefaultCreateCopy( const char *, GDALDataset *, 00951 int, char **, 00952 GDALProgressFunc pfnProgress, 00953 void * pProgressData ) CPL_WARN_UNUSED_RESULT; 00954 static CPLErr DefaultCopyMasks( GDALDataset *poSrcDS, 00955 GDALDataset *poDstDS, 00956 int bStrict ); 00957 static CPLErr QuietDelete( const char * pszName ); 00958 00959 CPLErr DefaultRename( const char * pszNewName, 00960 const char * pszOldName ); 00961 CPLErr DefaultCopyFiles( const char * pszNewName, 00962 const char * pszOldName ); 00963 }; 00964 00965 /* ******************************************************************** */ 00966 /* GDALDriverManager */ 00967 /* ******************************************************************** */ 00968 00976 class CPL_DLL GDALDriverManager : public GDALMajorObject 00977 { 00978 int nDrivers; 00979 GDALDriver **papoDrivers; 00980 std::map<CPLString, GDALDriver*> oMapNameToDrivers; 00981 00982 GDALDriver *GetDriver_unlocked( int iDriver ) 00983 { return (iDriver >= 0 && iDriver < nDrivers) ? papoDrivers[iDriver] : NULL; } 00984 00985 GDALDriver *GetDriverByName_unlocked( const char * pszName ) 00986 { return oMapNameToDrivers[CPLString(pszName).toupper()]; } 00987 00988 public: 00989 GDALDriverManager(); 00990 ~GDALDriverManager(); 00991 00992 int GetDriverCount( void ); 00993 GDALDriver *GetDriver( int ); 00994 GDALDriver *GetDriverByName( const char * ); 00995 00996 int RegisterDriver( GDALDriver * ); 00997 void DeregisterDriver( GDALDriver * ); 00998 00999 void AutoLoadDrivers(); 01000 void AutoSkipDrivers(); 01001 }; 01002 01003 CPL_C_START 01004 GDALDriverManager CPL_DLL * GetGDALDriverManager( void ); 01005 CPL_C_END 01006 01007 /* ******************************************************************** */ 01008 /* GDALAsyncReader */ 01009 /* ******************************************************************** */ 01010 01016 class CPL_DLL GDALAsyncReader 01017 { 01018 protected: 01019 GDALDataset* poDS; 01020 int nXOff; 01021 int nYOff; 01022 int nXSize; 01023 int nYSize; 01024 void * pBuf; 01025 int nBufXSize; 01026 int nBufYSize; 01027 GDALDataType eBufType; 01028 int nBandCount; 01029 int* panBandMap; 01030 int nPixelSpace; 01031 int nLineSpace; 01032 int nBandSpace; 01033 01034 public: 01035 GDALAsyncReader(); 01036 virtual ~GDALAsyncReader(); 01037 01038 GDALDataset* GetGDALDataset() {return poDS;} 01039 int GetXOffset() {return nXOff;} 01040 int GetYOffset() {return nYOff;} 01041 int GetXSize() {return nXSize;} 01042 int GetYSize() {return nYSize;} 01043 void * GetBuffer() {return pBuf;} 01044 int GetBufferXSize() {return nBufXSize;} 01045 int GetBufferYSize() {return nBufYSize;} 01046 GDALDataType GetBufferType() {return eBufType;} 01047 int GetBandCount() {return nBandCount;} 01048 int* GetBandMap() {return panBandMap;} 01049 int GetPixelSpace() {return nPixelSpace;} 01050 int GetLineSpace() {return nLineSpace;} 01051 int GetBandSpace() {return nBandSpace;} 01052 01053 virtual GDALAsyncStatusType 01054 GetNextUpdatedRegion(double dfTimeout, 01055 int* pnBufXOff, int* pnBufYOff, 01056 int* pnBufXSize, int* pnBufYSize) = 0; 01057 virtual int LockBuffer( double dfTimeout = -1.0 ); 01058 virtual void UnlockBuffer(); 01059 }; 01060 01061 /* ==================================================================== */ 01062 /* An assortment of overview related stuff. */ 01063 /* ==================================================================== */ 01064 01065 /* Not a public symbol for the moment */ 01066 CPLErr 01067 GDALRegenerateOverviewsMultiBand(int nBands, GDALRasterBand** papoSrcBands, 01068 int nOverviews, 01069 GDALRasterBand*** papapoOverviewBands, 01070 const char * pszResampling, 01071 GDALProgressFunc pfnProgress, void * pProgressData ); 01072 01073 typedef CPLErr (*GDALResampleFunction) 01074 ( double dfXRatioDstToSrc, 01075 double dfYRatioDstToSrc, 01076 double dfSrcXDelta, 01077 double dfSrcYDelta, 01078 GDALDataType eWrkDataType, 01079 void * pChunk, 01080 GByte * pabyChunkNodataMask, 01081 int nChunkXOff, int nChunkXSize, 01082 int nChunkYOff, int nChunkYSize, 01083 int nDstXOff, int nDstXOff2, 01084 int nDstYOff, int nDstYOff2, 01085 GDALRasterBand * poOverview, 01086 const char * pszResampling, 01087 int bHasNoData, float fNoDataValue, 01088 GDALColorTable* poColorTable, 01089 GDALDataType eSrcDataType); 01090 01091 GDALResampleFunction GDALGetResampleFunction(const char* pszResampling, 01092 int* pnRadius); 01093 GDALDataType GDALGetOvrWorkDataType(const char* pszResampling, 01094 GDALDataType eSrcDataType); 01095 01096 CPL_C_START 01097 01098 #ifndef WIN32CE 01099 01100 CPLErr CPL_DLL 01101 HFAAuxBuildOverviews( const char *pszOvrFilename, GDALDataset *poParentDS, 01102 GDALDataset **ppoDS, 01103 int nBands, int *panBandList, 01104 int nNewOverviews, int *panNewOverviewList, 01105 const char *pszResampling, 01106 GDALProgressFunc pfnProgress, 01107 void *pProgressData ); 01108 01109 #endif /* WIN32CE */ 01110 01111 CPLErr CPL_DLL 01112 GTIFFBuildOverviews( const char * pszFilename, 01113 int nBands, GDALRasterBand **papoBandList, 01114 int nOverviews, int * panOverviewList, 01115 const char * pszResampling, 01116 GDALProgressFunc pfnProgress, void * pProgressData ); 01117 01118 CPLErr CPL_DLL 01119 GDALDefaultBuildOverviews( GDALDataset *hSrcDS, const char * pszBasename, 01120 const char * pszResampling, 01121 int nOverviews, int * panOverviewList, 01122 int nBands, int * panBandList, 01123 GDALProgressFunc pfnProgress, void * pProgressData); 01124 01125 int CPL_DLL GDALBandGetBestOverviewLevel(GDALRasterBand* poBand, 01126 int &nXOff, int &nYOff, 01127 int &nXSize, int &nYSize, 01128 int nBufXSize, int nBufYSize) CPL_WARN_DEPRECATED("Use GDALBandGetBestOverviewLevel2 instead"); 01129 int CPL_DLL GDALBandGetBestOverviewLevel2(GDALRasterBand* poBand, 01130 int &nXOff, int &nYOff, 01131 int &nXSize, int &nYSize, 01132 int nBufXSize, int nBufYSize, 01133 GDALRasterIOExtraArg* psExtraArg); 01134 01135 int CPL_DLL GDALOvLevelAdjust( int nOvLevel, int nXSize ) CPL_WARN_DEPRECATED("Use GDALOvLevelAdjust2 instead"); 01136 int CPL_DLL GDALOvLevelAdjust2( int nOvLevel, int nXSize, int nYSize ); 01137 int CPL_DLL GDALComputeOvFactor( int nOvrXSize, int nRasterXSize, 01138 int nOvrYSize, int nRasterYSize ); 01139 01140 GDALDataset CPL_DLL * 01141 GDALFindAssociatedAuxFile( const char *pszBasefile, GDALAccess eAccess, 01142 GDALDataset *poDependentDS ); 01143 01144 /* ==================================================================== */ 01145 /* Misc functions. */ 01146 /* ==================================================================== */ 01147 01148 CPLErr CPL_DLL GDALParseGMLCoverage( CPLXMLNode *psTree, 01149 int *pnXSize, int *pnYSize, 01150 double *padfGeoTransform, 01151 char **ppszProjection ); 01152 01153 /* ==================================================================== */ 01154 /* Infrastructure to check that dataset characteristics are valid */ 01155 /* ==================================================================== */ 01156 01157 int CPL_DLL GDALCheckDatasetDimensions( int nXSize, int nYSize ); 01158 int CPL_DLL GDALCheckBandCount( int nBands, int bIsZeroAllowed ); 01159 01160 01161 // Test if 2 floating point values match. Useful when comparing values 01162 // stored as a string at some point. See #3573, #4183, #4506 01163 #define ARE_REAL_EQUAL(dfVal1, dfVal2) \ 01164 (dfVal1 == dfVal2 || fabs(dfVal1 - dfVal2) < 1e-10 || (dfVal2 != 0 && fabs(1 - dfVal1 / dfVal2) < 1e-10 )) 01165 01166 /* Internal use only */ 01167 01168 /* CPL_DLL exported, but only for in-tree drivers that can be built as plugins */ 01169 int CPL_DLL GDALReadWorldFile2( const char *pszBaseFilename, const char *pszExtension, 01170 double *padfGeoTransform, char** papszSiblingFiles, 01171 char** ppszWorldFileNameOut); 01172 int GDALReadTabFile2( const char * pszBaseFilename, 01173 double *padfGeoTransform, char **ppszWKT, 01174 int *pnGCPCount, GDAL_GCP **ppasGCPs, 01175 char** papszSiblingFiles, char** ppszTabFileNameOut ); 01176 01177 void CPL_DLL GDALCopyRasterIOExtraArg(GDALRasterIOExtraArg* psDestArg, 01178 GDALRasterIOExtraArg* psSrcArg); 01179 01180 CPL_C_END 01181 01182 void GDALNullifyOpenDatasetsList(); 01183 CPLMutex** GDALGetphDMMutex(); 01184 CPLMutex** GDALGetphDLMutex(); 01185 void GDALNullifyProxyPoolSingleton(); 01186 GDALDriver* GDALGetAPIPROXYDriver(); 01187 void GDALSetResponsiblePIDForCurrentThread(GIntBig responsiblePID); 01188 GIntBig GDALGetResponsiblePIDForCurrentThread(); 01189 01190 CPLString GDALFindAssociatedFile( const char *pszBasename, const char *pszExt, 01191 char **papszSiblingFiles, int nFlags ); 01192 01193 CPLErr EXIFExtractMetadata(char**& papszMetadata, 01194 void *fpL, int nOffset, 01195 int bSwabflag, int nTIFFHEADER, 01196 int& nExifOffset, int& nInterOffset, int& nGPSOffset); 01197 01198 int GDALValidateOpenOptions( GDALDriverH hDriver, 01199 const char* const* papszOptionOptions); 01200 int GDALValidateOptions( const char* pszOptionList, 01201 const char* const* papszOptionsToValidate, 01202 const char* pszErrorMessageOptionType, 01203 const char* pszErrorMessageContainerName); 01204 01205 GDALRIOResampleAlg GDALRasterIOGetResampleAlg(const char* pszResampling); 01206 01207 void GDALRasterIOExtraArgSetResampleAlg(GDALRasterIOExtraArg* psExtraArg, 01208 int nXSize, int nYSize, 01209 int nBufXSize, int nBufYSize); 01210 01211 /* CPL_DLL exported, but only for gdalwarp */ 01212 GDALDataset CPL_DLL* GDALCreateOverviewDataset(GDALDataset* poDS, int nOvrLevel, 01213 int bThisLevelOnly, int bOwnDS); 01214 01215 #define DIV_ROUND_UP(a, b) ( ((a) % (b)) == 0 ? ((a) / (b)) : (((a) / (b)) + 1) ) 01216 01217 // Number of data samples that will be used to compute approximate statistics 01218 // (minimum value, maximum value, etc.) 01219 #define GDALSTAT_APPROX_NUMSAMPLES 2500 01220 01221 CPL_C_START 01222 /* Caution: for technical reason this declaration is duplicated in gdal_crs.c */ 01223 /* so any signature change should be reflected there too */ 01224 void GDALSerializeGCPListToXML( CPLXMLNode* psParentNode, 01225 GDAL_GCP* pasGCPList, 01226 int nGCPCount, 01227 const char* pszGCPProjection ); 01228 void GDALDeserializeGCPListFromXML( CPLXMLNode* psGCPList, 01229 GDAL_GCP** ppasGCPList, 01230 int* pnGCPCount, 01231 char** ppszGCPProjection ); 01232 CPL_C_END 01233 01234 void GDALSerializeOpenOptionsToXML( CPLXMLNode* psParentNode, char** papszOpenOptions); 01235 char** GDALDeserializeOpenOptionsFromXML( CPLXMLNode* psParentNode ); 01236 01237 int GDALCanFileAcceptSidecarFile(const char* pszFilename); 01238 01239 #endif /* ndef GDAL_PRIV_H_INCLUDED */