32 #ifndef GDAL_PRIV_H_INCLUDED 33 #define GDAL_PRIV_H_INCLUDED 61 #include "gdal_frmts.h" 66 #include "cpl_multiproc.h" 67 #include "cpl_atomic_ops.h" 72 #define GMO_VALID 0x0001 73 #define GMO_IGNORE_UNIMPLEMENTED 0x0002 74 #define GMO_SUPPORT_MD 0x0004 75 #define GMO_SUPPORT_MDMD 0x0008 76 #define GMO_MD_DIRTY 0x0010 77 #define GMO_PAM_CLASS 0x0020 86 char **papszDomainList;
93 int XMLInit(
CPLXMLNode *psMetadata,
int bMerge );
96 char **GetDomainList() {
return papszDomainList; }
98 char **GetMetadata(
const char * pszDomain =
"" );
99 CPLErr SetMetadata(
char ** papszMetadata,
100 const char * pszDomain =
"" );
101 const char *GetMetadataItem(
const char * pszName,
102 const char * pszDomain =
"" );
103 CPLErr SetMetadataItem(
const char * pszName,
104 const char * pszValue,
105 const char * pszDomain =
"" );
129 char **BuildMetadataDomainList(
char** papszList,
int bCheckNonEmpty, ...) CPL_NULL_TERMINATED;
136 void SetMOFlags(
int nFlagsIn);
138 virtual const char *GetDescription()
const;
139 virtual void SetDescription(
const char * );
141 virtual char **GetMetadataDomainList();
143 virtual char **GetMetadata(
const char * pszDomain =
"" );
144 virtual CPLErr SetMetadata(
char ** papszMetadata,
145 const char * pszDomain =
"" );
146 virtual const char *GetMetadataItem(
const char * pszName,
147 const char * pszDomain =
"" );
148 virtual CPLErr SetMetadataItem(
const char * pszName,
149 const char * pszValue,
150 const char * pszDomain =
"" );
176 bool bCheckedForOverviews;
180 char **papszInitSiblingFiles;
186 void Initialize(
GDALDataset *poDSIn,
const char *pszName = NULL,
187 char **papszSiblingFiles = NULL,
188 int bNameIsOVR = FALSE );
190 void TransferSiblingFiles(
char** papszSiblingFiles);
198 int GetOverviewCount(
int);
202 const char * pszResampling,
203 int nOverviews,
int * panOverviewList,
204 int nBands,
int * panBandList,
205 GDALProgressFunc pfnProgress,
206 void *pProgressData );
208 CPLErr BuildOverviewsSubDataset(
const char * pszPhysicalFile,
209 const char * pszResampling,
210 int nOverviews,
int * panOverviewList,
211 int nBands,
int * panBandList,
212 GDALProgressFunc pfnProgress,
213 void *pProgressData );
215 CPLErr CleanOverviews();
221 int GetMaskFlags(
int nBand );
223 int HaveMaskFile(
char **papszSiblings = NULL,
224 const char *pszBasename = NULL );
226 char** GetSiblingFiles() {
return papszInitSiblingFiles; }
240 bool bHasGotSiblingFiles;
241 char **papszSiblingFiles;
242 int nHeaderBytesTried;
246 char **papszSiblingFiles = NULL );
250 char** papszOpenOptions;
263 int TryToIngest(
int nBytes);
264 char **GetSiblingFiles();
265 char **StealSiblingFiles();
266 bool AreSiblingFilesLoaded()
const;
282 typedef struct GDALSQLParseInfo GDALSQLParseInfo;
284 #ifdef DETECT_OLD_IRASTERIO 285 typedef void signature_changed;
288 #ifdef GDAL_COMPILATION 289 #define OPTIONAL_OUTSIDE_GDAL(val) 291 #define OPTIONAL_OUTSIDE_GDAL(val) = val 299 unsigned int nOpenFlags,
300 const char*
const* papszAllowedDrivers,
301 const char*
const* papszOpenOptions,
302 const char*
const* papszSiblingFiles );
310 void AddToDatasetOpenList();
312 void Init(
int bForceCachedIO);
327 GByte bForceCachedIO;
330 GByte bSuppressOnClose;
335 void RasterInitialize(
int,
int );
340 virtual CPLErr IBuildOverviews(
const char *,
int,
int *,
341 int,
int *, GDALProgressFunc,
void * );
343 #ifdef DETECT_OLD_IRASTERIO 344 virtual signature_changed IRasterIO(
GDALRWFlag,
int,
int,
int,
int,
346 int,
int *,
int,
int,
int ) {};
349 virtual CPLErr IRasterIO(
GDALRWFlag,
int,
int,
int,
int,
354 CPLErr BlockBasedRasterIO(
GDALRWFlag,
int,
int,
int,
int,
358 void BlockBasedFlushCache();
361 int nXOff,
int nYOff,
int nXSize,
int nYSize,
362 void * pData,
int nBufXSize,
int nBufYSize,
364 int nBandCount,
int *panBandMap,
370 int nXOff,
int nYOff,
int nXSize,
int nYSize,
371 void * pData,
int nBufXSize,
int nBufYSize,
373 int nBandCount,
int *panBandMap,
378 CPLErr ValidateRasterIOOrAdviseReadParameters(
379 const char* pszCallingFunc,
380 int* pbStopProcessingOnCENone,
381 int nXOff,
int nYOff,
int nXSize,
int nYSize,
382 int nBufXSize,
int nBufYSize,
383 int nBandCount,
int *panBandMap);
385 CPLErr TryOverviewRasterIO(
GDALRWFlag eRWFlag,
386 int nXOff,
int nYOff,
int nXSize,
int nYSize,
387 void * pData,
int nBufXSize,
int nBufYSize,
389 int nBandCount,
int *panBandMap,
395 virtual int CloseDependentDatasets();
397 int ValidateLayerCreationOptions(
const char*
const* papszLCO );
399 char **papszOpenOptions;
406 void LeaveReadWrite();
409 void TemporarilyDropReadWriteLock();
410 void ReacquireReadWriteLock();
412 void DisableReadWriteMutex();
420 int GetRasterXSize(
void );
421 int GetRasterYSize(
void );
422 int GetRasterCount(
void );
427 virtual const char *GetProjectionRef(
void);
428 virtual CPLErr SetProjection(
const char * );
430 virtual CPLErr GetGeoTransform(
double * );
431 virtual CPLErr SetGeoTransform(
double * );
434 char **papszOptions=NULL );
436 virtual void *GetInternalHandle(
const char * );
438 virtual char **GetFileList(
void);
440 virtual const char* GetDriverName();
442 virtual int GetGCPCount();
443 virtual const char *GetGCPProjection();
445 virtual CPLErr SetGCPs(
int nGCPCount,
const GDAL_GCP *pasGCPList,
446 const char *pszGCPProjection );
448 virtual CPLErr
AdviseRead(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
449 int nBufXSize,
int nBufYSize,
451 int nBandCount,
int *panBandList,
452 char **papszOptions );
457 BeginAsyncReader(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
458 void *pBuf,
int nBufXSize,
int nBufYSize,
460 int nBandCount,
int* panBandMap,
461 int nPixelSpace,
int nLineSpace,
int nBandSpace,
462 char **papszOptions);
470 OPTIONAL_OUTSIDE_GDAL(NULL)
472 ) CPL_WARN_UNUSED_RESULT;
481 void MarkSuppressOnClose() { bSuppressOnClose = TRUE; }
483 char **GetOpenOptions() {
return papszOpenOptions; }
485 static GDALDataset **GetOpenDatasets(
int *pnDatasetCount );
488 int,
int *, GDALProgressFunc,
void * );
490 void ReportError(CPLErr eErrClass, CPLErrorNum err_no,
const char *fmt, ...) CPL_PRINT_FUNC_FORMAT (4, 5);
493 void *m_hPrivateData;
497 const char *pszDialect,
502 virtual int GetLayerCount();
504 virtual OGRLayer *GetLayerByName(
const char *);
505 virtual OGRErr DeleteLayer(
int);
507 virtual int TestCapability(
const char * );
509 virtual OGRLayer *CreateLayer(
const char *pszName,
512 char ** papszOptions = NULL );
514 const char *pszNewName,
515 char **papszOptions = NULL );
518 virtual void SetStyleTableDirectly(
OGRStyleTable *poStyleTable );
522 virtual OGRLayer * ExecuteSQL(
const char *pszStatement,
524 const char *pszDialect );
525 virtual void ReleaseResultSet(
OGRLayer * poResultsSet );
527 int GetRefCount()
const;
528 int GetSummaryRefCount()
const;
531 virtual OGRErr StartTransaction(
int bForce=FALSE);
532 virtual OGRErr CommitTransaction();
533 virtual OGRErr RollbackTransaction();
535 static int IsGenericSQLDialect(
const char* pszDialect);
538 GDALSQLParseInfo* BuildParseInfo(
swq_select* psSelectInfo,
540 void DestroyParseInfo(GDALSQLParseInfo* psParseInfo );
541 OGRLayer * ExecuteSQL(
const char *pszStatement,
543 const char *pszDialect,
548 virtual OGRLayer *ICreateLayer(
const char *pszName,
551 char ** papszOptions = NULL );
553 OGRErr ProcessSQLCreateIndex(
const char * );
554 OGRErr ProcessSQLDropIndex(
const char * );
555 OGRErr ProcessSQLDropTable(
const char * );
556 OGRErr ProcessSQLAlterTableAddColumn(
const char * );
557 OGRErr ProcessSQLAlterTableDropColumn(
const char * );
558 OGRErr ProcessSQLAlterTableAlterColumn(
const char * );
559 OGRErr ProcessSQLAlterTableRenameColumn(
const char * );
582 volatile int nLockCount;
599 void Detach_unlocked(
void );
600 void Touch_unlocked(
void );
602 void RecycleFor(
int nXOffIn,
int nYOffIn );
609 CPLErr Internalize(
void );
611 void MarkDirty(
void );
612 void MarkClean(
void );
613 int AddLock(
void ) {
return CPLAtomicInc(&nLockCount); }
614 int DropLock(
void ) {
return CPLAtomicDec(&nLockCount); }
620 int GetXOff()
const {
return nXOff; }
621 int GetYOff()
const {
return nYOff; }
622 int GetXSize()
const {
return nXSize; }
623 int GetYSize()
const {
return nYSize; }
624 int GetDirty()
const {
return bDirty; }
626 void *GetDataRef(
void ) {
return pData; }
627 int GetBlockSize()
const {
631 int DropLockForRemovalFromStorage();
637 static void FlushDirtyBlocks();
638 static int FlushCacheBlock(
int bDirtyBlocksOnly = FALSE);
639 static void Verify();
644 static void DumpAll();
648 static void DestroyRBMutex();
664 std::vector<GDALColorEntry> aoEntries;
675 int GetColorEntryCount()
const;
699 CPLMutex *hCondMutex;
700 volatile int nKeepAliveCounter;
705 void FreeDanglingBlocks();
706 void UnreferenceBlockBase();
707 void WaitKeepAliveCounter();
716 virtual bool Init() = 0;
717 virtual bool IsInitOK() = 0;
718 virtual CPLErr FlushCache() = 0;
721 int nYBlockYOff ) = 0;
723 virtual CPLErr FlushBlock(
int nXBlockOff,
int nYBlockOff,
724 int bWriteDirtyBlock ) = 0;
739 friend class GDALArrayBandBlockCache;
740 friend class GDALHashSetBandBlockCache;
743 CPLErr eFlushBlockErr;
746 void SetFlushBlockErr( CPLErr eErr );
749 void Init(
int bForceCachedIO);
765 int nBlocksPerColumn;
774 void InvalidateMaskBand();
780 CPLErr RasterIOResampled(
GDALRWFlag,
int,
int,
int,
int,
785 void LeaveReadWrite();
789 virtual CPLErr IReadBlock(
int,
int,
void * ) = 0;
790 virtual CPLErr IWriteBlock(
int,
int,
void * );
792 #ifdef DETECT_OLD_IRASTERIO 793 virtual signature_changed IRasterIO(
GDALRWFlag,
int,
int,
int,
int,
798 virtual CPLErr IRasterIO(
GDALRWFlag,
int,
int,
int,
int,
801 CPLErr OverviewRasterIO(
GDALRWFlag,
int,
int,
int,
int,
805 CPLErr TryOverviewRasterIO(
GDALRWFlag eRWFlag,
806 int nXOff,
int nYOff,
int nXSize,
int nYSize,
807 void * pData,
int nBufXSize,
int nBufYSize,
816 GDALRasterBlock *TryGetLockedBlockRef(
int nXBlockOff,
int nYBlockYOff );
831 void GetBlockSize(
int *,
int * );
834 CPLErr RasterIO(
GDALRWFlag,
int,
int,
int,
int,
838 OPTIONAL_OUTSIDE_GDAL(NULL)
840 ) CPL_WARN_UNUSED_RESULT;
841 CPLErr ReadBlock(
int,
int,
void * ) CPL_WARN_UNUSED_RESULT;
843 CPLErr WriteBlock(
int,
int,
void * ) CPL_WARN_UNUSED_RESULT;
846 int bJustInitialize = FALSE ) CPL_WARN_UNUSED_RESULT;
847 CPLErr FlushBlock(
int,
int,
int bWriteDirtyBlock = TRUE );
849 unsigned char* GetIndexColorTranslationTo(
GDALRasterBand* poReferenceBand,
850 unsigned char* pTranslationTable = NULL,
851 int* pApproximateMatching = NULL);
855 virtual CPLErr FlushCache();
856 virtual char **GetCategoryNames();
857 virtual double GetNoDataValue(
int *pbSuccess = NULL );
858 virtual double GetMinimum(
int *pbSuccess = NULL );
859 virtual double GetMaximum(
int *pbSuccess = NULL );
860 virtual double GetOffset(
int *pbSuccess = NULL );
861 virtual double GetScale(
int *pbSuccess = NULL );
862 virtual const char *GetUnitType();
865 virtual CPLErr Fill(
double dfRealValue,
double dfImaginaryValue = 0);
867 virtual CPLErr SetCategoryNames(
char ** );
868 virtual CPLErr SetNoDataValue(
double );
869 virtual CPLErr DeleteNoDataValue();
872 virtual CPLErr SetOffset(
double );
873 virtual CPLErr SetScale(
double );
874 virtual CPLErr SetUnitType(
const char * );
876 virtual CPLErr GetStatistics(
int bApproxOK,
int bForce,
877 double *pdfMin,
double *pdfMax,
878 double *pdfMean,
double *padfStdDev );
879 virtual CPLErr ComputeStatistics(
int bApproxOK,
880 double *pdfMin,
double *pdfMax,
881 double *pdfMean,
double *pdfStdDev,
882 GDALProgressFunc,
void *pProgressData );
883 virtual CPLErr SetStatistics(
double dfMin,
double dfMax,
884 double dfMean,
double dfStdDev );
885 virtual CPLErr ComputeRasterMinMax(
int,
double* );
887 virtual int HasArbitraryOverviews();
888 virtual int GetOverviewCount();
891 virtual CPLErr BuildOverviews(
const char *,
int,
int *,
892 GDALProgressFunc,
void * );
894 virtual CPLErr AdviseRead(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
895 int nBufXSize,
int nBufYSize,
898 virtual CPLErr GetHistogram(
double dfMin,
double dfMax,
899 int nBuckets, GUIntBig * panHistogram,
900 int bIncludeOutOfRange,
int bApproxOK,
901 GDALProgressFunc,
void *pProgressData );
903 virtual CPLErr GetDefaultHistogram(
double *pdfMin,
double *pdfMax,
904 int *pnBuckets, GUIntBig ** ppanHistogram,
906 GDALProgressFunc,
void *pProgressData);
907 virtual CPLErr SetDefaultHistogram(
double dfMin,
double dfMax,
908 int nBuckets, GUIntBig *panHistogram );
914 virtual int GetMaskFlags();
915 virtual CPLErr CreateMaskBand(
int nFlagsIn );
919 GIntBig *pnLineSpace,
920 char **papszOptions ) CPL_WARN_UNUSED_RESULT;
922 void ReportError(CPLErr eErrClass, CPLErrorNum err_no,
const char *fmt, ...) CPL_PRINT_FUNC_FORMAT (4, 5);
935 virtual CPLErr IReadBlock(
int,
int,
void * );
951 double dfNoDataValue;
955 virtual CPLErr IReadBlock(
int,
int,
void * );
956 virtual CPLErr IRasterIO(
GDALRWFlag,
int,
int,
int,
int,
971 double *padfNodataValues;
974 virtual CPLErr IReadBlock(
int,
int,
void * );
991 virtual CPLErr IReadBlock(
int,
int,
void * );
992 virtual CPLErr IRasterIO(
GDALRWFlag,
int,
int,
int,
int,
1042 virtual CPLErr SetMetadataItem(
const char * pszName,
1043 const char * pszValue,
1044 const char * pszDomain =
"" );
1050 int nXSize,
int nYSize,
int nBands,
1051 GDALDataType eType,
char ** papszOptions ) CPL_WARN_UNUSED_RESULT;
1053 CPLErr Delete(
const char * pszName );
1054 CPLErr Rename(
const char * pszNewName,
1055 const char * pszOldName );
1056 CPLErr CopyFiles(
const char * pszNewName,
1057 const char * pszOldName );
1061 GDALProgressFunc pfnProgress,
1062 void * pProgressData ) CPL_WARN_UNUSED_RESULT;
1072 int nXSize,
int nYSize,
int nBands,
1074 char ** papszOptions );
1076 CPLErr (*pfnDelete)(
const char * pszName );
1080 GDALProgressFunc pfnProgress,
1081 void * pProgressData );
1096 CPLErr (*pfnRename)(
const char * pszNewName,
1097 const char * pszOldName );
1098 CPLErr (*pfnCopyFiles)(
const char * pszNewName,
1099 const char * pszOldName );
1103 GDALDataset *(*pfnCreateVectorOnly)( GDALDriver*,
1104 const char * pszName,
1105 char ** papszOptions );
1106 CPLErr (*pfnDeleteDataSource)( GDALDriver*,
1107 const char * pszName );
1112 GDALDataset *DefaultCreateCopy(
const char *, GDALDataset *,
1114 GDALProgressFunc pfnProgress,
1115 void * pProgressData ) CPL_WARN_UNUSED_RESULT;
1116 static CPLErr DefaultCopyMasks( GDALDataset *poSrcDS,
1117 GDALDataset *poDstDS,
1119 static CPLErr QuietDelete(
const char * pszName );
1121 CPLErr DefaultRename(
const char * pszNewName,
1122 const char * pszOldName );
1123 CPLErr DefaultCopyFiles(
const char * pszNewName,
1124 const char * pszOldName );
1126 CPL_DISALLOW_COPY_ASSIGN(GDALDriver);
1144 std::map<CPLString, GDALDriver*> oMapNameToDrivers;
1146 GDALDriver *GetDriver_unlocked(
int iDriver )
1147 {
return (iDriver >= 0 && iDriver < nDrivers) ? papoDrivers[iDriver] : NULL; }
1149 GDALDriver *GetDriverByName_unlocked(
const char * pszName )
1156 int GetDriverCount(
void );
1164 void AutoLoadDrivers();
1165 void AutoSkipDrivers();
1204 int GetXOffset()
const {
return nXOff; }
1205 int GetYOffset()
const {
return nYOff; }
1206 int GetXSize()
const {
return nXSize; }
1207 int GetYSize()
const {
return nYSize; }
1208 void * GetBuffer() {
return pBuf;}
1209 int GetBufferXSize()
const {
return nBufXSize; }
1210 int GetBufferYSize()
const {
return nBufYSize; }
1211 GDALDataType GetBufferType()
const {
return eBufType; }
1212 int GetBandCount()
const {
return nBandCount; }
1213 int* GetBandMap() {
return panBandMap; }
1214 int GetPixelSpace()
const {
return nPixelSpace; }
1215 int GetLineSpace()
const {
return nLineSpace; }
1216 int GetBandSpace()
const {
return nBandSpace; }
1219 GetNextUpdatedRegion(
double dfTimeout,
1220 int* pnBufXOff,
int* pnBufYOff,
1221 int* pnBufXSize,
int* pnBufYSize) = 0;
1222 virtual int LockBuffer(
double dfTimeout = -1.0 );
1223 virtual void UnlockBuffer();
1235 const char * pszResampling,
1236 GDALProgressFunc pfnProgress,
void * pProgressData );
1238 typedef CPLErr (*GDALResampleFunction)
1239 (
double dfXRatioDstToSrc,
1240 double dfYRatioDstToSrc,
1245 GByte * pabyChunkNodataMask,
1246 int nChunkXOff,
int nChunkXSize,
1247 int nChunkYOff,
int nChunkYSize,
1248 int nDstXOff,
int nDstXOff2,
1249 int nDstYOff,
int nDstYOff2,
1251 const char * pszResampling,
1252 int bHasNoData,
float fNoDataValue,
1256 GDALResampleFunction GDALGetResampleFunction(
const char* pszResampling,
1259 #ifdef GDAL_ENABLE_RESAMPLING_MULTIBAND 1260 typedef CPLErr (*GDALResampleFunctionMultiBands)
1261 (
double dfXRatioDstToSrc,
1262 double dfYRatioDstToSrc,
1266 void * pChunk,
int nBands,
1267 GByte * pabyChunkNodataMask,
1268 int nChunkXOff,
int nChunkXSize,
1269 int nChunkYOff,
int nChunkYSize,
1270 int nDstXOff,
int nDstXOff2,
1271 int nDstYOff,
int nDstYOff2,
1273 const char * pszResampling,
1274 int bHasNoData,
float fNoDataValue,
1278 GDALResampleFunctionMultiBands GDALGetResampleFunctionMultiBands(
const char* pszResampling,
1282 GDALDataType GDALGetOvrWorkDataType(
const char* pszResampling,
1288 HFAAuxBuildOverviews(
const char *pszOvrFilename,
GDALDataset *poParentDS,
1290 int nBands,
int *panBandList,
1291 int nNewOverviews,
int *panNewOverviewList,
1292 const char *pszResampling,
1293 GDALProgressFunc pfnProgress,
1294 void *pProgressData );
1297 GTIFFBuildOverviews(
const char * pszFilename,
1299 int nOverviews,
int * panOverviewList,
1300 const char * pszResampling,
1301 GDALProgressFunc pfnProgress,
void * pProgressData );
1304 GDALDefaultBuildOverviews(
GDALDataset *hSrcDS,
const char * pszBasename,
1305 const char * pszResampling,
1306 int nOverviews,
int * panOverviewList,
1307 int nBands,
int * panBandList,
1308 GDALProgressFunc pfnProgress,
void * pProgressData);
1311 int &nXOff,
int &nYOff,
1312 int &nXSize,
int &nYSize,
1313 int nBufXSize,
int nBufYSize) CPL_WARN_DEPRECATED(
"Use GDALBandGetBestOverviewLevel2 instead");
1314 int CPL_DLL GDALBandGetBestOverviewLevel2(
GDALRasterBand* poBand,
1315 int &nXOff,
int &nYOff,
1316 int &nXSize,
int &nYSize,
1317 int nBufXSize,
int nBufYSize,
1320 int CPL_DLL GDALOvLevelAdjust(
int nOvLevel,
int nXSize ) CPL_WARN_DEPRECATED(
"Use GDALOvLevelAdjust2 instead");
1321 int CPL_DLL GDALOvLevelAdjust2(
int nOvLevel,
int nXSize,
int nYSize );
1322 int CPL_DLL GDALComputeOvFactor(
int nOvrXSize,
int nRasterXSize,
1323 int nOvrYSize,
int nRasterYSize );
1326 GDALFindAssociatedAuxFile(
const char *pszBasefile,
GDALAccess eAccess,
1333 CPLErr CPL_DLL GDALParseGMLCoverage(
CPLXMLNode *psTree,
1334 int *pnXSize,
int *pnYSize,
1335 double *padfGeoTransform,
1336 char **ppszProjection );
1348 #define ARE_REAL_EQUAL(dfVal1, dfVal2) \ 1350 (((float)dfVal2 == (float)1.17549435e-38) ? ((float)dfVal1 == (float)dfVal2) : \ 1352 (dfVal2 == 2.2250738585072014e-308) ? (dfVal1 == dfVal2) : \ 1354 (dfVal1 == dfVal2 || fabs(dfVal1 - dfVal2) < 1e-10 || (dfVal2 != 0 && fabs(1 - dfVal1 / dfVal2) < 1e-10 ))) 1359 int CPL_DLL GDALReadWorldFile2(
const char *pszBaseFilename,
const char *pszExtension,
1360 double *padfGeoTransform,
char** papszSiblingFiles,
1361 char** ppszWorldFileNameOut);
1362 int GDALReadTabFile2(
const char * pszBaseFilename,
1363 double *padfGeoTransform,
char **ppszWKT,
1364 int *pnGCPCount,
GDAL_GCP **ppasGCPs,
1365 char** papszSiblingFiles,
char** ppszTabFileNameOut );
1372 void GDALNullifyOpenDatasetsList();
1373 CPLMutex** GDALGetphDMMutex();
1374 CPLMutex** GDALGetphDLMutex();
1375 void GDALNullifyProxyPoolSingleton();
1377 void GDALSetResponsiblePIDForCurrentThread(GIntBig responsiblePID);
1378 GIntBig GDALGetResponsiblePIDForCurrentThread();
1381 char **papszSiblingFiles,
int nFlags );
1383 CPLErr EXIFExtractMetadata(
char**& papszMetadata,
1384 void *fpL,
int nOffset,
1385 int bSwabflag,
int nTIFFHEADER,
1386 int& nExifOffset,
int& nInterOffset,
int& nGPSOffset);
1389 const char*
const* papszOptionOptions);
1390 int GDALValidateOptions(
const char* pszOptionList,
1391 const char*
const* papszOptionsToValidate,
1392 const char* pszErrorMessageOptionType,
1393 const char* pszErrorMessageContainerName);
1399 int nXSize,
int nYSize,
1400 int nBufXSize,
int nBufYSize);
1404 int bThisLevelOnly,
int bOwnDS);
1406 #define DIV_ROUND_UP(a, b) ( ((a) % (b)) == 0 ? ((a) / (b)) : (((a) / (b)) + 1) ) 1410 #define GDALSTAT_APPROX_NUMSAMPLES 2500 1415 void GDALSerializeGCPListToXML(
CPLXMLNode* psParentNode,
1418 const char* pszGCPProjection );
1419 void GDALDeserializeGCPListFromXML(
CPLXMLNode* psGCPList,
1422 char** ppszGCPProjection );
1425 void GDALSerializeOpenOptionsToXML(
CPLXMLNode* psParentNode,
char** papszOpenOptions);
1426 char** GDALDeserializeOpenOptionsFromXML(
CPLXMLNode* psParentNode );
1428 int GDALCanFileAcceptSidecarFile(
const char* pszFilename);
The GDALRasterAttributeTable (or RAT) class is used to encapsulate a table used to provide attribute ...
Definition: gdal_rat.h:46
GDALDatasetH GDALOpenEx(const char *pszFilename, unsigned int nOpenFlags, const char *const *papszAllowedDrivers, const char *const *papszOpenOptions, const char *const *papszSiblingFiles) CPL_WARN_UNUSED_RESULT
Open a raster or vector file as a GDALDataset.
Definition: gdaldataset.cpp:2626
virtual CPLErr AdviseRead(int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eDT, char **papszOptions)
Advise driver of upcoming read requests.
Definition: gdalrasterband.cpp:3393
GDALDataType
Definition: gdal.h:57
Definition: gdal_priv.h:969
Identify could not determine if the file is recognized or not by the probed driver.
Definition: gdal_priv.h:1013
Document node structure.
Definition: cpl_minixml.h:65
virtual GDALRasterBand * GetMaskBand()
Return the mask band associated with the band.
Definition: gdalrasterband.cpp:4621
Definitions for CPL mini XML Parser/Serializer.
int GDALCheckBandCount(int nBands, int bIsZeroAllowed)
Return TRUE if the band count is valid.
Definition: gdal_misc.cpp:3178
Definition: gdal_proxy.h:104
int GDALCheckDatasetDimensions(int nXSize, int nYSize)
Return TRUE if the dataset dimensions are valid.
Definition: gdal_misc.cpp:3154
This manages how a raster band store its cached block.
Definition: gdal_priv.h:691
void ReportError(CPLErr eErrClass, CPLErrorNum err_no, const char *fmt,...) CPL_PRINT_FUNC_FORMAT(4
Emits an error related to a raster band.
Definition: gdalrasterband.cpp:5147
GDALRIOResampleAlg
RasterIO() resampling method.
Definition: gdal.h:113
GDALRWFlag
Definition: gdal.h:104
CPLErr GDALRegenerateOverviewsMultiBand(int nBands, GDALRasterBand **papoSrcBands, int nOverviews, GDALRasterBand ***papapoOverviewBands, const char *pszResampling, GDALProgressFunc pfnProgress, void *pProgressData)
Variant of GDALRegenerateOverviews, specially dedicated for generating compressed pixel-interleaved o...
Definition: overview.cpp:2689
void * GDALDatasetH
Opaque type used for the C bindings of the C++ GDALDataset class.
Definition: gdal.h:230
Definition: gdal_priv.h:949
Color tuple.
Definition: gdal.h:925
A single raster block in the block cache.
Definition: gdal_priv.h:575
virtual int GetMaskFlags()
Return the status flags of the mask band associated with the band.
Definition: gdalrasterband.cpp:4855
Convenient string class based on std::string.
Definition: cpl_string.h:283
virtual CPLErr BuildOverviews(const char *, int, int *, GDALProgressFunc, void *)
Build raster overview(s)
Definition: gdalrasterband.cpp:2183
CPLErr RasterIO(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: gdalrasterband.cpp:181
unknown type, non-standard
Definition: ogr_core.h:335
struct CPLVirtualMem CPLVirtualMem
Opaque type that represents a virtual memory mapping.
Definition: cpl_virtualmem.h:60
CPLErr BuildOverviews(const char *, int, int *, int, int *, GDALProgressFunc, void *)
Build raster overview(s)
Definition: gdaldataset.cpp:1423
Various convenience functions for working with strings and string lists.
Definition: gdal_priv.h:156
virtual CPLErr FlushCache()
Flush raster data cache.
Definition: gdalrasterband.cpp:849
GIntBig GSpacing
Type to express pixel, line or band spacing.
Definition: gdal.h:248
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:333
Public (C callable) GDAL entry points.
GDALAsyncStatusType
status of the asynchronous stream
Definition: gdal.h:85
Definition: gdal_proxy.h:44
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:104
GDALRasterBand * GetBand()
Accessor to source GDALRasterBand object.
Definition: gdal_priv.h:635
Definition: gdal_priv.h:238
Definition: gdal_priv.h:932
CPLString GDALFindAssociatedFile(const char *pszBasename, const char *pszExt, char **papszSiblingFiles, int nFlags)
Find file with alternate extension.
Definition: gdal_misc.cpp:967
String list class designed around our use of C "char**" string lists.
Definition: cpl_string.h:362
Identify determined the file is recognized by the probed driver.
Definition: gdal_priv.h:1017
GDALPaletteInterp
Definition: gdal.h:199
Core portability services for cross-platform OGR code.
virtual int CloseDependentDatasets()
Drop references to any other datasets referenced by this dataset.
Definition: gdaldataset.cpp:3288
virtual CPLErr CreateMaskBand(int nFlagsIn)
Adds a mask band to the dataset.
Definition: gdaldataset.cpp:2439
Various convenience functions for CPL.
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:129
void * GDALDriverH
Opaque type used for the C bindings of the C++ GDALDriver class.
Definition: gdal.h:236
void GDALClose(GDALDatasetH)
Close GDAL dataset.
Definition: gdaldataset.cpp:2981
Object with metadata.
Definition: gdal_priv.h:122
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:66
A single raster band (or channel).
Definition: gdal_priv.h:736
GDALAccess
Definition: gdal.h:98
Definition: gdal_priv.h:83
virtual CPLErr CreateMaskBand(int nFlagsIn)
Adds a mask band to the current band.
Definition: gdalrasterband.cpp:4928
This class represents a style table.
Definition: ogr_featurestyle.h:82
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:296
GDALAccess GetAccess()
Find out if we have update permission for this band.
Definition: gdalrasterband.cpp:1292
Class for managing the registration of file format drivers.
Definition: gdal_priv.h:1140
Definition: gdal_priv.h:985
CPLString & toupper(void)
Convert to upper case in place.
Definition: cplstring.cpp:298
GDALIdentifyEnum
Enumeration used by GDALDriver::pfnIdentify().
Definition: gdal_priv.h:1010
GDALColorInterp
Definition: gdal.h:173
int GDALGetDataTypeSizeBytes(GDALDataType)
Get data type size in bytes.
Definition: gdal_misc.cpp:204
Identify determined the file is not recognized by the probed driver.
Definition: gdal_priv.h:1015
Format specific driver.
Definition: gdal_priv.h:1036
Definition: gdal_priv.h:660
Ground Control Point.
Definition: gdal.h:492
GDALDriverManager * GetGDALDriverManager(void)
Fetch the global GDAL driver manager.
Definition: gdaldrivermanager.cpp:75
Class used as a session object for asynchronous requests.
Definition: gdal_priv.h:1181