Go to the documentation of this file.
32 #ifndef GDAL_PRIV_H_INCLUDED
33 #define GDAL_PRIV_H_INCLUDED
50 class GDALProxyDataset;
51 class GDALProxyRasterBand;
62 #include "gdal_frmts.h"
67 #include "cpl_multiproc.h"
68 #include "cpl_atomic_ops.h"
84 #define GMO_VALID 0x0001
85 #define GMO_IGNORE_UNIMPLEMENTED 0x0002
86 #define GMO_SUPPORT_MD 0x0004
87 #define GMO_SUPPORT_MDMD 0x0008
88 #define GMO_MD_DIRTY 0x0010
89 #define GMO_PAM_CLASS 0x0020
97 class CPL_DLL GDALMultiDomainMetadata
100 char **papszDomainList;
104 GDALMultiDomainMetadata();
105 ~GDALMultiDomainMetadata();
107 int XMLInit(
CPLXMLNode *psMetadata,
int bMerge);
110 char **GetDomainList()
112 return papszDomainList;
115 char **GetMetadata(
const char *pszDomain =
"");
116 CPLErr SetMetadata(
char **papszMetadata,
const char *pszDomain =
"");
117 const char *GetMetadataItem(
const char *pszName,
118 const char *pszDomain =
"");
119 CPLErr SetMetadataItem(
const char *pszName,
const char *pszValue,
120 const char *pszDomain =
"");
143 GDALMultiDomainMetadata oMDMD{};
147 char **BuildMetadataDomainList(
char **papszList,
int bCheckNonEmpty,
154 int GetMOFlags()
const;
155 void SetMOFlags(
int nFlagsIn);
157 virtual const char *GetDescription()
const;
158 virtual void SetDescription(
const char *);
160 virtual char **GetMetadataDomainList();
162 virtual char **GetMetadata(
const char *pszDomain =
"");
163 virtual CPLErr SetMetadata(
char **papszMetadata,
164 const char *pszDomain =
"");
165 virtual const char *GetMetadataItem(
const char *pszName,
166 const char *pszDomain =
"");
167 virtual CPLErr SetMetadataItem(
const char *pszName,
const char *pszValue,
168 const char *pszDomain =
"");
192 class CPL_DLL GDALDefaultOverviews
203 bool bCheckedForMask;
212 bool bCheckedForOverviews;
216 char **papszInitSiblingFiles;
219 GDALDefaultOverviews();
220 ~GDALDefaultOverviews();
222 void Initialize(
GDALDataset *poDSIn,
const char *pszName =
nullptr,
223 char **papszSiblingFiles =
nullptr,
int bNameIsOVR = FALSE);
225 void TransferSiblingFiles(
char **papszSiblingFiles);
233 int GetOverviewCount(
int nBand);
237 int nOverviews,
const int *panOverviewList,
238 int nBands,
const int *panBandList,
239 GDALProgressFunc pfnProgress,
void *pProgressData,
242 CPLErr BuildOverviewsSubDataset(
const char *pszPhysicalFile,
243 const char *pszResampling,
int nOverviews,
244 const int *panOverviewList,
int nBands,
245 const int *panBandList,
246 GDALProgressFunc pfnProgress,
256 int GetMaskFlags(
int nBand);
258 int HaveMaskFile(
char **papszSiblings =
nullptr,
259 const char *pszBasename =
nullptr);
261 char **GetSiblingFiles()
263 return papszInitSiblingFiles;
278 bool bHasGotSiblingFiles;
279 char **papszSiblingFiles;
280 int nHeaderBytesTried;
284 const char *
const *papszSiblingFiles =
nullptr);
313 int TryToIngest(
int nBytes);
314 char **GetSiblingFiles();
315 char **StealSiblingFiles();
316 bool AreSiblingFilesLoaded()
const;
331 class swq_select_parse_options;
335 typedef struct GDALSQLParseInfo GDALSQLParseInfo;
339 #ifdef GDAL_COMPILATION
340 #define OPTIONAL_OUTSIDE_GDAL(val)
342 #define OPTIONAL_OUTSIDE_GDAL(val) = val
350 GDALOpenEx(
const char *pszFilename,
unsigned int nOpenFlags,
351 const char *
const *papszAllowedDrivers,
352 const char *
const *papszOpenOptions,
353 const char *
const *papszSiblingFiles);
357 friend class GDALDefaultOverviews;
358 friend class GDALProxyDataset;
361 CPL_INTERNAL
void AddToDatasetOpenList();
363 CPL_INTERNAL
static void ReportErrorV(
const char *pszDSName,
365 const char *fmt, va_list args);
373 int nRasterXSize = 512;
374 int nRasterYSize = 512;
378 static constexpr
int OPEN_FLAGS_CLOSED = -1;
383 bool bForceCachedIO =
false;
384 bool bShared =
false;
385 bool bIsInternal =
true;
386 bool bSuppressOnClose =
false;
388 mutable std::map<std::string, std::unique_ptr<OGRFieldDomain>>
389 m_oMapFieldDomains{};
394 void RasterInitialize(
int,
int);
396 void SetBand(
int nNewBand, std::unique_ptr<GDALRasterBand> poBand);
398 GDALDefaultOverviews oOvManager{};
400 virtual CPLErr IBuildOverviews(
const char *,
int,
const int *,
int,
401 const int *, GDALProgressFunc,
void *,
410 BlockBasedRasterIO(
GDALRWFlag,
int,
int,
int,
int,
void *,
int,
int,
413 CPLErr BlockBasedFlushCache(
bool bAtClosing);
416 BandBasedRasterIO(
GDALRWFlag eRWFlag,
int nXOff,
int nYOff,
int nXSize,
417 int nYSize,
void *pData,
int nBufXSize,
int nBufYSize,
424 RasterIOResampled(
GDALRWFlag eRWFlag,
int nXOff,
int nYOff,
int nXSize,
425 int nYSize,
void *pData,
int nBufXSize,
int nBufYSize,
431 CPLErr ValidateRasterIOOrAdviseReadParameters(
432 const char *pszCallingFunc,
int *pbStopProcessingOnCENone,
int nXOff,
433 int nYOff,
int nXSize,
int nYSize,
int nBufXSize,
int nBufYSize,
434 int nBandCount,
int *panBandMap);
437 int nXSize,
int nYSize,
void *pData,
438 int nBufXSize,
int nBufYSize,
440 int *panBandMap,
GSpacing nPixelSpace,
444 void ShareLockWithParentDataset(
GDALDataset *poParentDataset);
448 void CleanupPostFileClosing();
450 virtual int CloseDependentDatasets();
452 int ValidateLayerCreationOptions(
const char *
const *papszLCO);
454 char **papszOpenOptions =
nullptr;
461 void LeaveReadWrite();
464 void TemporarilyDropReadWriteLock();
465 void ReacquireReadWriteLock();
467 void DisableReadWriteMutex();
472 bool IsAllBands(
int nBandCount,
const int *panBandList)
const;
480 int GetRasterXSize();
481 int GetRasterYSize();
482 int GetRasterCount();
492 void *poQueryLoggerArgIn);
505 class CPL_DLL Iterator
508 std::unique_ptr<Private> m_poPrivate;
512 Iterator(
const Iterator &oOther);
514 Iterator(Iterator &&oOther) noexcept;
518 Iterator &operator++();
519 bool operator!=(
const Iterator &it)
const;
523 const Iterator
begin()
const;
525 const Iterator
end()
const;
535 virtual CPLErr FlushCache(
bool bAtClosing =
false);
537 virtual GIntBig GetEstimatedRAMUsage();
543 const char *GetProjectionRef(
void)
const;
544 CPLErr SetProjection(
const char *pszProjection);
546 virtual CPLErr GetGeoTransform(
double *padfTransform);
547 virtual CPLErr SetGeoTransform(
double *padfTransform);
551 virtual void *GetInternalHandle(
const char *pszHandleName);
553 virtual char **GetFileList(
void);
555 virtual const char *GetDriverName();
558 virtual int GetGCPCount();
564 const char *GetGCPProjection();
566 const char *pszGCPProjection);
568 virtual CPLErr AdviseRead(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
570 int nBandCount,
int *panBandList,
571 char **papszOptions);
573 virtual CPLErr CreateMaskBand(
int nFlagsIn);
576 BeginAsyncReader(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
void *pBuf,
578 int nBandCount,
int *panBandMap,
int nPixelSpace,
579 int nLineSpace,
int nBandSpace,
char **papszOptions);
583 struct RawBinaryLayout
585 enum class Interleaving
592 std::string osRawFilename{};
593 Interleaving eInterleaving = Interleaving::UNKNOWN;
595 bool bLittleEndianOrder =
false;
603 virtual bool GetRawBinaryLayout(RawBinaryLayout &);
610 OPTIONAL_OUTSIDE_GDAL(
nullptr)
614 virtual CPLStringList GetCompressionFormats(
int nXOff,
int nYOff,
615 int nXSize,
int nYSize,
617 const int *panBandList);
618 virtual CPLErr ReadCompressedData(
const char *pszFormat,
int nXOff,
619 int nYOff,
int nXSize,
int nYSize,
620 int nBands,
const int *panBandList,
621 void **ppBuffer,
size_t *pnBufferSize,
622 char **ppszDetailedFormat);
636 int GetShared()
const;
639 void MarkSuppressOnClose();
646 return papszOpenOptions;
649 static GDALDataset **GetOpenDatasets(
int *pnDatasetCount);
651 CPLErr BuildOverviews(
const char *,
int,
const int *,
int,
const int *,
652 GDALProgressFunc,
void *,
655 OPTIONAL_OUTSIDE_GDAL(
nullptr)
663 static
void ReportError(const
char *pszDSName,
CPLErr eErrClass,
668 char **GetMetadata(
const char *pszDomain =
"")
override;
672 CPLErr SetMetadata(
char **papszMetadata,
const char *pszDomain)
override;
673 CPLErr SetMetadataItem(
const char *pszName,
const char *pszValue,
674 const char *pszDomain)
override;
677 char **GetMetadataDomainList()
override;
679 virtual void ClearStatistics();
701 unsigned int nOpenFlags = 0,
702 const char *
const *papszAllowedDrivers =
nullptr,
703 const char *
const *papszOpenOptions =
nullptr,
704 const char *
const *papszSiblingFiles =
nullptr)
706 return FromHandle(
GDALOpenEx(pszFilename, nOpenFlags,
707 papszAllowedDrivers, papszOpenOptions,
723 void SetEnableOverviews(
bool bEnable);
726 bool AreOverviewsEnabled()
const;
731 Private *m_poPrivate;
733 CPL_INTERNAL
OGRLayer *BuildLayerFromSelectInfo(
734 swq_select *psSelectInfo,
OGRGeometry *poSpatialFilter,
735 const char *pszDialect, swq_select_parse_options *poSelectParseOptions);
739 virtual int GetLayerCount();
740 virtual OGRLayer *GetLayer(
int iLayer);
742 virtual bool IsLayerPrivate(
int iLayer)
const;
763 std::unique_ptr<Private> m_poPrivate;
771 std::input_iterator_tag;
797 OGRLayer *operator[](
size_t iLayer);
798 OGRLayer *operator[](
const char *pszLayername);
803 virtual OGRLayer *GetLayerByName(
const char *);
804 virtual OGRErr DeleteLayer(
int iLayer);
806 virtual void ResetReading();
808 double *pdfProgressPct,
809 GDALProgressFunc pfnProgress,
810 void *pProgressData);
823 class CPL_DLL Iterator
826 std::unique_ptr<Private> m_poPrivate;
830 Iterator(
const Iterator &oOther);
832 Iterator(Iterator &&oOther) noexcept;
836 Iterator &operator++();
837 bool operator!=(
const Iterator &it)
const;
841 const Iterator
begin()
const;
843 const Iterator
end()
const;
848 virtual int TestCapability(
const char *);
850 virtual std::vector<std::string>
851 GetFieldDomainNames(
CSLConstList papszOptions =
nullptr)
const;
853 virtual const OGRFieldDomain *GetFieldDomain(
const std::string &name)
const;
855 virtual bool AddFieldDomain(std::unique_ptr<OGRFieldDomain> &&domain,
856 std::string &failureReason);
858 virtual bool DeleteFieldDomain(
const std::string &name,
859 std::string &failureReason);
861 virtual bool UpdateFieldDomain(std::unique_ptr<OGRFieldDomain> &&domain,
862 std::string &failureReason);
864 virtual std::vector<std::string>
865 GetRelationshipNames(
CSLConstList papszOptions =
nullptr)
const;
868 GetRelationship(
const std::string &name)
const;
871 AddRelationship(std::unique_ptr<GDALRelationship> &&relationship,
872 std::string &failureReason);
874 virtual bool DeleteRelationship(
const std::string &name,
875 std::string &failureReason);
878 UpdateRelationship(std::unique_ptr<GDALRelationship> &&relationship,
879 std::string &failureReason);
881 virtual OGRLayer *CreateLayer(
const char *pszName,
884 char **papszOptions =
nullptr);
886 char **papszOptions =
nullptr);
889 virtual void SetStyleTableDirectly(
OGRStyleTable *poStyleTable);
893 virtual OGRLayer *ExecuteSQL(
const char *pszStatement,
895 const char *pszDialect);
896 virtual void ReleaseResultSet(
OGRLayer *poResultsSet);
897 virtual OGRErr AbortSQL();
899 int GetRefCount()
const;
900 int GetSummaryRefCount()
const;
903 virtual OGRErr StartTransaction(
int bForce = FALSE);
904 virtual OGRErr CommitTransaction();
905 virtual OGRErr RollbackTransaction();
907 virtual std::shared_ptr<GDALGroup> GetRootGroup()
const;
910 static int IsGenericSQLDialect(
const char *pszDialect);
914 BuildParseInfo(swq_select *psSelectInfo,
915 swq_select_parse_options *poSelectParseOptions);
916 static void DestroyParseInfo(GDALSQLParseInfo *psParseInfo);
918 const char *pszDialect,
919 swq_select_parse_options *poSelectParseOptions);
923 virtual OGRLayer *ICreateLayer(
const char *pszName,
926 char **papszOptions =
nullptr);
929 OGRErr ProcessSQLCreateIndex(
const char *);
930 OGRErr ProcessSQLDropIndex(
const char *);
931 OGRErr ProcessSQLDropTable(
const char *);
932 OGRErr ProcessSQLAlterTableAddColumn(
const char *);
933 OGRErr ProcessSQLAlterTableDropColumn(
const char *);
934 OGRErr ProcessSQLAlterTableAlterColumn(
const char *);
935 OGRErr ProcessSQLAlterTableRenameColumn(
const char *);
939 friend class GDALProxyPoolDataset;
947 struct CPL_DLL GDALDatasetUniquePtrDeleter
962 std::unique_ptr<GDALDataset, GDALDatasetUniquePtrDeleter>;
974 friend class GDALAbstractBandBlockCache;
979 volatile int nLockCount;
996 CPL_INTERNAL
void Detach_unlocked(
void);
997 CPL_INTERNAL
void Touch_unlocked(
void);
999 CPL_INTERNAL
void RecycleFor(
int nXOffIn,
int nYOffIn);
1006 CPLErr Internalize(
void);
1008 void MarkDirty(
void);
1009 void MarkClean(
void);
1013 return CPLAtomicInc(&nLockCount);
1018 return CPLAtomicDec(&nLockCount);
1078 return static_cast<GPtrDiff_t>(nXSize) * nYSize *
1083 int DropLockForRemovalFromStorage();
1092 static void FlushDirtyBlocks();
1093 static int FlushCacheBlock(
int bDirtyBlocksOnly = FALSE);
1094 static void Verify();
1096 static void EnterDisableDirtyBlockFlush();
1097 static void LeaveDisableDirtyBlockFlush();
1102 static void DumpAll();
1107 CPL_INTERNAL
static void DestroyRBMutex();
1124 std::vector<GDALColorEntry> aoEntries{};
1135 int GetColorEntryCount()
const;
1141 bool IsIdentity()
const;
1169 class GDALAbstractBandBlockCache
1172 CPLLock *hSpinLock =
nullptr;
1176 CPLCond *hCond =
nullptr;
1177 CPLMutex *hCondMutex =
nullptr;
1178 volatile int nKeepAliveCounter = 0;
1180 volatile int m_nDirtyBlocks = 0;
1187 int m_nInitialDirtyBlocksInFlushCache = 0;
1188 int m_nLastTick = -1;
1189 bool m_bWriteDirtyBlocks =
true;
1191 void FreeDanglingBlocks();
1192 void UnreferenceBlockBase();
1194 void StartDirtyBlockFlushingLog();
1195 void UpdateDirtyBlockFlushingLog();
1196 void EndDirtyBlockFlushingLog();
1200 virtual ~GDALAbstractBandBlockCache();
1204 void IncDirtyBlocks(
int nInc);
1205 void WaitCompletionPendingTasks();
1206 void DisableDirtyBlockWriting()
1208 m_bWriteDirtyBlocks =
false;
1210 bool HasDirtyBlocks()
const
1212 return m_nDirtyBlocks > 0;
1215 virtual bool Init() = 0;
1216 virtual bool IsInitOK() = 0;
1217 virtual CPLErr FlushCache() = 0;
1220 int nYBlockYOff) = 0;
1222 virtual CPLErr FlushBlock(
int nXBlockOff,
int nYBlockOff,
1223 int bWriteDirtyBlock) = 0;
1226 GDALAbstractBandBlockCache *
1228 GDALAbstractBandBlockCache *
1272 friend class GDALArrayBandBlockCache;
1273 friend class GDALHashSetBandBlockCache;
1277 CPLErr eFlushBlockErr = CE_None;
1278 GDALAbstractBandBlockCache *poBandBlockCache =
nullptr;
1280 CPL_INTERNAL
void SetFlushBlockErr(
CPLErr eErr);
1282 CPL_INTERNAL
void IncDirtyBlocks(
int nInc);
1289 int nRasterXSize = 0;
1290 int nRasterYSize = 0;
1296 int nBlockXSize = -1;
1297 int nBlockYSize = -1;
1298 int nBlocksPerRow = 0;
1299 int nBlocksPerColumn = 0;
1301 int nBlockReads = 0;
1302 int bForceCachedIO = 0;
1305 bool bOwnMask =
false;
1306 bool m_bEnablePixelTypeSignedByteWarning =
1310 void InvalidateMaskBand();
1312 friend class GDALProxyRasterBand;
1313 friend class GDALDefaultOverviews;
1316 RasterIOResampled(
GDALRWFlag,
int,
int,
int,
int,
void *,
int,
int,
1321 void LeaveReadWrite();
1328 virtual CPLErr IReadBlock(
int nBlockXOff,
int nBlockYOff,
void *pData) = 0;
1329 virtual CPLErr IWriteBlock(
int nBlockXOff,
int nBlockYOff,
void *pData);
1336 virtual int IGetDataCoverageStatus(
int nXOff,
int nYOff,
int nXSize,
1337 int nYSize,
int nMaskFlagStop,
1338 double *pdfDataPct);
1341 OverviewRasterIO(
GDALRWFlag,
int,
int,
int,
int,
void *,
int,
int,
1346 int nXSize,
int nYSize,
void *pData,
1347 int nBufXSize,
int nBufYSize,
1352 int InitBlockInfo();
1356 bool HasDirtyBlocks()
const
1358 return poBandBlockCache && poBandBlockCache->HasDirtyBlocks();
1374 void GetBlockSize(
int *,
int *);
1375 CPLErr GetActualBlockSize(
int,
int,
int *,
int *);
1378 GetSuggestedBlockAccessPattern()
const;
1385 #ifndef DOXYGEN_SKIP
1386 OPTIONAL_OUTSIDE_GDAL(
nullptr)
1394 GetLockedBlockRef(
int nXBlockOff,
int nYBlockOff,
1396 GDALRasterBlock *TryGetLockedBlockRef(
int nXBlockOff,
int nYBlockYOff)
1398 CPLErr FlushBlock(
int,
int,
int bWriteDirtyBlock = TRUE);
1402 unsigned char *pTranslationTable =
nullptr,
1403 int *pApproximateMatching =
nullptr);
1407 virtual CPLErr FlushCache(
bool bAtClosing =
false);
1408 virtual char **GetCategoryNames();
1409 virtual double GetNoDataValue(
int *pbSuccess =
nullptr);
1410 virtual int64_t GetNoDataValueAsInt64(
int *pbSuccess =
nullptr);
1411 virtual uint64_t GetNoDataValueAsUInt64(
int *pbSuccess =
nullptr);
1412 virtual double GetMinimum(
int *pbSuccess =
nullptr);
1413 virtual double GetMaximum(
int *pbSuccess =
nullptr);
1414 virtual double GetOffset(
int *pbSuccess =
nullptr);
1415 virtual double GetScale(
int *pbSuccess =
nullptr);
1416 virtual const char *GetUnitType();
1419 virtual CPLErr Fill(
double dfRealValue,
double dfImaginaryValue = 0);
1421 virtual CPLErr SetCategoryNames(
char **papszNames);
1422 virtual CPLErr SetNoDataValue(
double dfNoData);
1423 virtual CPLErr SetNoDataValueAsInt64(int64_t nNoData);
1424 virtual CPLErr SetNoDataValueAsUInt64(uint64_t nNoData);
1425 virtual CPLErr DeleteNoDataValue();
1428 virtual CPLErr SetOffset(
double dfNewOffset);
1429 virtual CPLErr SetScale(
double dfNewScale);
1430 virtual CPLErr SetUnitType(
const char *pszNewValue);
1432 virtual CPLErr GetStatistics(
int bApproxOK,
int bForce,
double *pdfMin,
1433 double *pdfMax,
double *pdfMean,
1434 double *padfStdDev);
1435 virtual CPLErr ComputeStatistics(
int bApproxOK,
double *pdfMin,
1436 double *pdfMax,
double *pdfMean,
1437 double *pdfStdDev, GDALProgressFunc,
1438 void *pProgressData);
1439 virtual CPLErr SetStatistics(
double dfMin,
double dfMax,
double dfMean,
1441 virtual CPLErr ComputeRasterMinMax(
int,
double *);
1447 const char *pszDomain)
override;
1450 const char *pszDomain =
"")
override;
1452 virtual int HasArbitraryOverviews();
1453 virtual int GetOverviewCount();
1456 virtual CPLErr BuildOverviews(
const char *pszResampling,
int nOverviews,
1457 const int *panOverviewList,
1458 GDALProgressFunc pfnProgress,
1459 void *pProgressData,
1462 virtual CPLErr AdviseRead(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
1463 int nBufXSize,
int nBufYSize,
1466 virtual CPLErr GetHistogram(
double dfMin,
double dfMax,
int nBuckets,
1467 GUIntBig *panHistogram,
int bIncludeOutOfRange,
1468 int bApproxOK, GDALProgressFunc,
1469 void *pProgressData);
1471 virtual CPLErr GetDefaultHistogram(
double *pdfMin,
double *pdfMax,
1472 int *pnBuckets,
GUIntBig **ppanHistogram,
1473 int bForce, GDALProgressFunc,
1474 void *pProgressData);
1475 virtual CPLErr SetDefaultHistogram(
double dfMin,
double dfMax,
int nBuckets,
1482 virtual int GetMaskFlags();
1483 virtual CPLErr CreateMaskBand(
int nFlagsIn);
1484 virtual bool IsMaskBand()
const;
1488 GetVirtualMemAuto(
GDALRWFlag eRWFlag,
int *pnPixelSpace,
1492 int GetDataCoverageStatus(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
1493 int nMaskFlagStop = 0,
1494 double *pdfDataPct =
nullptr);
1496 std::shared_ptr<GDALMDArray> AsMDArray()
const;
1522 void EnablePixelTypeSignedByteWarning(
bool b)
1523 #ifndef GDAL_COMPILATION
1524 CPL_WARN_DEPRECATED(
"Do not use that method outside of GDAL!")
1548 ~GDALAllValidMaskBand()
override;
1563 double *pdfMean,
double *pdfStdDev,
1564 GDALProgressFunc,
void *pProgressData)
override;
1574 double dfNoDataValue = 0;
1575 int64_t nNoDataValueInt64 = 0;
1576 uint64_t nNoDataValueUInt64 = 0;
1589 ~GDALNoDataMaskBand()
override;
1600 static bool IsNoDataInRange(
double dfNoDataValue,
GDALDataType eDataType);
1609 double *padfNodataValues;
1618 ~GDALNoDataValuesMaskBand()
override;
1649 ~GDALRescaledAlphaBand()
override;
1700 const char *pszDomain =
"")
override;
1705 GDALDataset *Create(
const char *pszName,
int nXSize,
int nYSize,
int nBands,
1710 CreateMultiDimensional(
const char *pszName,
1714 CPLErr Delete(
const char *pszName);
1715 CPLErr Rename(
const char *pszNewName,
const char *pszOldName);
1716 CPLErr CopyFiles(
const char *pszNewName,
const char *pszOldName);
1720 GDALProgressFunc pfnProgress,
1731 GDALDataset *(*pfnCreate)(
const char *pszName,
int nXSize,
int nYSize,
1733 char **papszOptions);
1737 char **papszOptions);
1740 const char *pszName,
CSLConstList papszRootGroupOptions,
1743 CPLErr (*pfnDelete)(
const char *pszName);
1746 GDALProgressFunc pfnProgress,
1747 void *pProgressData);
1764 CPLErr (*pfnRename)(
const char *pszNewName,
const char *pszOldName);
1765 CPLErr (*pfnCopyFiles)(
const char *pszNewName,
const char *pszOldName);
1772 char **papszOptions);
1782 GDALProgressFunc pfnProgress,
1785 static CPLErr DefaultCreateCopyMultiDimensional(
1788 void *pProgressData);
1794 GDALProgressFunc pfnProgress,
1795 void *pProgressData);
1797 static CPLErr QuietDelete(
const char *pszName,
1801 static CPLErr DefaultRename(
const char *pszNewName,
const char *pszOldName);
1802 static CPLErr DefaultCopyFiles(
const char *pszNewName,
1803 const char *pszOldName);
1841 std::map<CPLString, GDALDriver *> oMapNameToDrivers{};
1842 std::string m_osDriversIniPath{};
1846 return (iDriver >= 0 && iDriver < nDrivers) ? papoDrivers[iDriver]
1850 GDALDriver *GetDriverByName_unlocked(
const char *pszName)
const
1852 auto oIter = oMapNameToDrivers.find(
CPLString(pszName).toupper());
1853 return oIter == oMapNameToDrivers.end() ? nullptr : oIter->second;
1856 static char **GetSearchPaths(
const char *pszGDAL_DRIVER_PATH);
1858 static void CleanupPythonDrivers();
1866 int GetDriverCount(
void)
const;
1874 void AutoLoadDrivers();
1875 void AutoSkipDrivers();
1876 void ReorderDrivers();
1878 static void AutoLoadPythonDrivers();
2021 GetNextUpdatedRegion(
double dfTimeout,
int *pnBufXOff,
int *pnBufYOff,
2022 int *pnBufXSize,
int *pnBufYSize) = 0;
2023 virtual int LockBuffer(
double dfTimeout = -1.0);
2024 virtual void UnlockBuffer();
2058 Create(
const std::string &osName,
size_t nTotalSize,
2059 std::vector<std::unique_ptr<GDALEDTComponent>> &&components);
2061 CreateString(
size_t nMaxStringLength = 0,
2068 return !(operator==(other));
2096 return m_eNumericDT;
2117 return m_aoComponents;
2137 return m_nMaxStringLength;
2142 bool NeedsFreeDynamicMemory()
const;
2144 void FreeDynamicMemory(
void *pBuffer)
const;
2149 static bool CopyValues(
const void *pSrc,
2153 GPtrDiff_t nDstStrideInElts,
size_t nValues);
2160 const std::string &osName,
size_t nTotalSize,
2161 std::vector<std::unique_ptr<GDALEDTComponent>> &&components);
2163 std::string m_osName{};
2167 std::vector<std::unique_ptr<GDALEDTComponent>> m_aoComponents{};
2169 size_t m_nMaxStringLength = 0;
2219 std::string m_osName;
2236 std::shared_ptr<GDALAttribute>
2237 GetAttributeFromAttributes(
const std::string &osName)
const;
2242 virtual std::shared_ptr<GDALAttribute>
2243 GetAttribute(
const std::string &osName)
const;
2245 virtual std::vector<std::shared_ptr<GDALAttribute>>
2246 GetAttributes(
CSLConstList papszOptions =
nullptr)
const;
2248 virtual std::shared_ptr<GDALAttribute>
2249 CreateAttribute(
const std::string &osName,
2250 const std::vector<GUInt64> &anDimensions,
2275 std::string m_osName{};
2276 std::string m_osFullName{};
2278 GDALGroup(
const std::string &osParentName,
const std::string &osName);
2281 GetInnerMostGroup(
const std::string &osPathOrArrayOrDim,
2282 std::shared_ptr<GDALGroup> &curGroupHolder,
2283 std::string &osLastPart)
const;
2304 return m_osFullName;
2307 virtual std::vector<std::string>
2308 GetMDArrayNames(
CSLConstList papszOptions =
nullptr)
const;
2309 virtual std::shared_ptr<GDALMDArray>
2310 OpenMDArray(
const std::string &osName,
2313 virtual std::vector<std::string>
2314 GetGroupNames(
CSLConstList papszOptions =
nullptr)
const;
2315 virtual std::shared_ptr<GDALGroup>
2316 OpenGroup(
const std::string &osName,
2319 virtual std::vector<std::string>
2320 GetVectorLayerNames(
CSLConstList papszOptions =
nullptr)
const;
2322 OpenVectorLayer(
const std::string &osName,
2325 virtual std::vector<std::shared_ptr<GDALDimension>>
2326 GetDimensions(
CSLConstList papszOptions =
nullptr)
const;
2328 virtual std::shared_ptr<GDALGroup>
2329 CreateGroup(
const std::string &osName,
CSLConstList papszOptions =
nullptr);
2331 virtual std::shared_ptr<GDALDimension>
2332 CreateDimension(
const std::string &osName,
const std::string &osType,
2333 const std::string &osDirection,
GUInt64 nSize,
2336 virtual std::shared_ptr<GDALMDArray> CreateMDArray(
2337 const std::string &osName,
2338 const std::vector<std::shared_ptr<GDALDimension>> &aoDimensions,
2342 GUInt64 GetTotalCopyCost()
const;
2344 virtual bool CopyFrom(
const std::shared_ptr<GDALGroup> &poDstRootGroup,
2346 const std::shared_ptr<GDALGroup> &poSrcGroup,
2347 bool bStrict,
GUInt64 &nCurCost,
2349 GDALProgressFunc pfnProgress,
void *pProgressData,
2354 std::shared_ptr<GDALMDArray>
2355 OpenMDArrayFromFullname(
const std::string &osFullName,
2358 std::shared_ptr<GDALMDArray>
2359 ResolveMDArray(
const std::string &osName,
const std::string &osStartingPath,
2362 std::shared_ptr<GDALGroup>
2363 OpenGroupFromFullname(
const std::string &osFullName,
2366 std::shared_ptr<GDALDimension>
2367 OpenDimensionFromFullname(
const std::string &osFullName)
const;
2369 virtual void ClearStatistics();
2372 static constexpr
GUInt64 COPY_COST = 1000;
2389 std::string m_osName{};
2390 std::string m_osFullName{};
2391 std::weak_ptr<GDALAbstractMDArray> m_pSelf{};
2394 const std::string &osName);
2396 void SetSelf(std::weak_ptr<GDALAbstractMDArray>
self)
2401 bool CheckReadWriteParams(
const GUInt64 *arrayStartIdx,
const size_t *count,
2402 const GInt64 *&arrayStep,
2406 const void *buffer_alloc_start,
2407 size_t buffer_alloc_size,
2408 std::vector<GInt64> &tmp_arrayStep,
2409 std::vector<GPtrDiff_t> &tmp_bufferStride)
const;
2412 IRead(
const GUInt64 *arrayStartIdx,
2413 const size_t *count,
2417 void *pDstBuffer)
const = 0;
2420 IWrite(
const GUInt64 *arrayStartIdx,
2421 const size_t *count,
2447 return m_osFullName;
2450 GUInt64 GetTotalElementsCount()
const;
2452 virtual size_t GetDimensionCount()
const;
2454 virtual const std::vector<std::shared_ptr<GDALDimension>> &
2455 GetDimensions()
const = 0;
2459 virtual std::vector<GUInt64> GetBlockSize()
const;
2461 virtual std::vector<size_t>
2462 GetProcessingChunkSize(
size_t nMaxChunkMemory)
const;
2480 typedef bool (*FuncProcessPerChunkType)(
2482 const GUInt64 *chunkArrayStartIdx,
2483 const size_t *chunkCount,
2489 virtual bool ProcessPerChunk(
const GUInt64 *arrayStartIdx,
2490 const GUInt64 *count,
const size_t *chunkSize,
2491 FuncProcessPerChunkType pfnFunc,
2495 Read(
const GUInt64 *arrayStartIdx,
2496 const size_t *count,
2500 const void *pDstBufferAllocStart =
nullptr,
2501 size_t nDstBufferAllocSize = 0)
const;
2504 Write(
const GUInt64 *arrayStartIdx,
2505 const size_t *count,
2509 const void *pSrcBufferAllocStart =
nullptr,
2510 size_t nSrcBufferAllocSize = 0);
2588 mutable std::string m_osCachedVal{};
2592 GDALAttribute(
const std::string &osParentName,
const std::string &osName);
2596 std::vector<GUInt64> GetDimensionsSize()
const;
2599 const char *ReadAsString()
const;
2600 int ReadAsInt()
const;
2601 double ReadAsDouble()
const;
2603 std::vector<int> ReadAsIntArray()
const;
2604 std::vector<double> ReadAsDoubleArray()
const;
2607 bool Write(
const void *pabyValue,
size_t nLen);
2608 bool Write(
const char *);
2612 bool Write(
const double *,
size_t);
2615 static constexpr
GUInt64 COPY_COST = 100;
2624 class CPL_DLL GDALAttributeString final :
public GDALAttribute
2626 std::vector<std::shared_ptr<GDALDimension>> m_dims{};
2628 std::string m_osValue;
2633 void *pDstBuffer)
const override;
2636 GDALAttributeString(
const std::string &osParentName,
2637 const std::string &osName,
const std::string &osValue,
2640 const std::vector<std::shared_ptr<GDALDimension>> &
2652 class CPL_DLL GDALAttributeNumeric final :
public GDALAttribute
2654 std::vector<std::shared_ptr<GDALDimension>> m_dims{};
2657 double m_dfValue = 0;
2658 std::vector<GUInt32> m_anValuesUInt32{};
2663 void *pDstBuffer)
const override;
2666 GDALAttributeNumeric(
const std::string &osParentName,
2667 const std::string &osName,
double dfValue);
2668 GDALAttributeNumeric(
const std::string &osParentName,
2669 const std::string &osName,
int nValue);
2670 GDALAttributeNumeric(
const std::string &osParentName,
2671 const std::string &osName,
2672 const std::vector<GUInt32> &anValues);
2674 const std::vector<std::shared_ptr<GDALDimension>> &
2700 friend class GDALMDArrayResampled;
2701 std::shared_ptr<GDALMDArray>
2702 GetView(
const std::vector<GUInt64> &indices)
const;
2704 inline std::shared_ptr<GDALMDArray>
2705 atInternal(std::vector<GUInt64> &indices)
const
2707 return GetView(indices);
2710 template <
typename... GUInt64VarArg>
2712 inline std::shared_ptr<GDALMDArray>
2713 atInternal(std::vector<GUInt64> &indices,
GUInt64 idx,
2714 GUInt64VarArg... tail)
const
2716 indices.push_back(idx);
2717 return atInternal(indices, tail...);
2720 mutable bool m_bHasTriedCachedArray =
false;
2721 mutable std::shared_ptr<GDALMDArray> m_poCachedArray{};
2725 GDALMDArray(
const std::string &osParentName,
const std::string &osName);
2727 virtual bool IAdviseRead(
const GUInt64 *arrayStartIdx,
const size_t *count,
2730 virtual bool IsCacheable()
const
2735 virtual bool SetStatistics(
bool bApproxStats,
double dfMin,
double dfMax,
2736 double dfMean,
double dfStdDev,
2739 static std::string MassageName(
const std::string &inputName);
2741 std::shared_ptr<GDALGroup>
2742 GetCacheRootGroup(
bool bCanCreate, std::string &osCacheFilenameOut)
const;
2745 bool IsTransposedRequest(
const size_t *count,
2749 bool ReadForTransposedRequest(
const GUInt64 *arrayStartIdx,
2750 const size_t *count,
const GInt64 *arrayStep,
2753 void *pDstBuffer)
const;
2757 GUInt64 GetTotalCopyCost()
const;
2760 bool bStrict,
GUInt64 &nCurCost,
2762 GDALProgressFunc pfnProgress,
void *pProgressData);
2765 virtual bool IsWritable()
const = 0;
2775 virtual const std::string &GetFilename()
const = 0;
2779 virtual const std::string &GetUnit()
const;
2781 virtual bool SetUnit(
const std::string &osUnit);
2785 virtual std::shared_ptr<OGRSpatialReference> GetSpatialRef()
const;
2787 virtual const void *GetRawNoDataValue()
const;
2789 double GetNoDataValueAsDouble(
bool *pbHasNoData =
nullptr)
const;
2791 int64_t GetNoDataValueAsInt64(
bool *pbHasNoData =
nullptr)
const;
2793 uint64_t GetNoDataValueAsUInt64(
bool *pbHasNoData =
nullptr)
const;
2795 virtual bool SetRawNoDataValue(
const void *pRawNoData);
2798 bool SetNoDataValue(
int nNoData)
2800 return SetNoDataValue(
static_cast<int64_t
>(nNoData));
2804 bool SetNoDataValue(
double dfNoData);
2806 bool SetNoDataValue(int64_t nNoData);
2808 bool SetNoDataValue(uint64_t nNoData);
2810 virtual bool Resize(
const std::vector<GUInt64> &anNewDimSizes,
2813 virtual double GetOffset(
bool *pbHasOffset =
nullptr,
2816 virtual double GetScale(
bool *pbHasScale =
nullptr,
2819 virtual bool SetOffset(
double dfOffset,
2822 virtual bool SetScale(
double dfScale,
2825 std::shared_ptr<GDALMDArray> GetView(
const std::string &viewExpr)
const;
2827 std::shared_ptr<GDALMDArray> operator[](
const std::string &fieldName)
const;
2840 template <
typename... GUInt64VarArg>
2843 std::shared_ptr<GDALMDArray>
at(
GUInt64 idx, GUInt64VarArg... tail)
const
2845 std::vector<GUInt64> indices;
2846 indices.push_back(idx);
2847 return atInternal(indices, tail...);
2850 virtual std::shared_ptr<GDALMDArray>
2851 Transpose(
const std::vector<int> &anMapNewAxisToOldAxis)
const;
2853 std::shared_ptr<GDALMDArray> GetUnscaled()
const;
2855 virtual std::shared_ptr<GDALMDArray>
2858 std::shared_ptr<GDALMDArray>
2859 GetResampled(
const std::vector<std::shared_ptr<GDALDimension>> &apoNewDims,
2864 std::shared_ptr<GDALMDArray>
2865 GetGridded(
const std::string &osGridOptions,
2866 const std::shared_ptr<GDALMDArray> &poXArray =
nullptr,
2867 const std::shared_ptr<GDALMDArray> &poYArray =
nullptr,
2870 virtual GDALDataset *AsClassicDataset(
size_t iXDim,
size_t iYDim)
const;
2872 virtual CPLErr GetStatistics(
bool bApproxOK,
bool bForce,
double *pdfMin,
2873 double *pdfMax,
double *pdfMean,
2874 double *padfStdDev,
GUInt64 *pnValidCount,
2875 GDALProgressFunc pfnProgress,
2876 void *pProgressData);
2878 virtual bool ComputeStatistics(
bool bApproxOK,
double *pdfMin,
2879 double *pdfMax,
double *pdfMean,
2880 double *pdfStdDev,
GUInt64 *pnValidCount,
2881 GDALProgressFunc,
void *pProgressData);
2883 virtual void ClearStatistics();
2885 virtual std::vector<std::shared_ptr<GDALMDArray>>
2886 GetCoordinateVariables()
const;
2888 bool AdviseRead(
const GUInt64 *arrayStartIdx,
const size_t *count,
2891 bool IsRegularlySpaced(
double &dfStart,
double &dfIncrement)
const;
2893 bool GuessGeoTransform(
size_t nDimX,
size_t nDimY,
bool bPixelIsPoint,
2894 double adfGeoTransform[6])
const;
2900 const size_t *count,
2904 const void *pDstBufferAllocStart =
nullptr,
2905 size_t nDstBufferAllocSize = 0) const override final;
2908 static constexpr
GUInt64 COPY_COST = 1000;
2910 bool CopyFromAllExceptValues(const
GDALMDArray *poSrcArray,
bool bStrict,
2912 GDALProgressFunc pfnProgress,
2913 void *pProgressData);
2919 : m_nStartIdx(nStartIdx), m_nIncr(nIncr)
2926 std::string m_osFieldName{};
2931 m_mapDimIdxToParentDimIdx{};
2936 virtual std::shared_ptr<GDALMDArray>
2937 GetView(
const std::string &viewExpr,
bool bRenameDimensions,
2938 std::vector<ViewSpec> &viewSpecs)
const;
2944 size_t iDimX,
size_t iDimY,
2945 const GUInt64 *arrayStartIdx,
const size_t *count,
2957 class CPL_DLL GDALMDArrayRegularlySpaced :
public GDALMDArray
2960 double m_dfIncrement;
2961 double m_dfOffsetInIncrement;
2963 std::vector<std::shared_ptr<GDALDimension>> m_dims;
2964 std::vector<std::shared_ptr<GDALAttribute>> m_attributes{};
2965 std::string m_osEmptyFilename{};
2970 void *pDstBuffer)
const override;
2973 GDALMDArrayRegularlySpaced(
const std::string &osParentName,
2974 const std::string &osName,
2975 const std::shared_ptr<GDALDimension> &poDim,
2976 double dfStart,
double dfIncrement,
2977 double dfOffsetInIncrement);
2979 static std::shared_ptr<GDALMDArrayRegularlySpaced>
2980 Create(
const std::string &osParentName,
const std::string &osName,
2981 const std::shared_ptr<GDALDimension> &poDim,
double dfStart,
2982 double dfIncrement,
double dfOffsetInIncrement);
2991 return m_osEmptyFilename;
2994 const std::vector<std::shared_ptr<GDALDimension>> &
2999 std::vector<std::shared_ptr<GDALAttribute>>
3002 void AddAttribute(
const std::shared_ptr<GDALAttribute> &poAttr);
3025 GDALDimension(
const std::string &osParentName,
const std::string &osName,
3026 const std::string &osType,
const std::string &osDirection,
3047 return m_osFullName;
3073 return m_osDirection;
3085 virtual std::shared_ptr<GDALMDArray> GetIndexingVariable()
const;
3088 SetIndexingVariable(std::shared_ptr<GDALMDArray> poIndexingVariable);
3092 std::string m_osName;
3093 std::string m_osFullName;
3094 std::string m_osType;
3095 std::string m_osDirection;
3105 class CPL_DLL GDALDimensionWeakIndexingVar :
public GDALDimension
3107 std::weak_ptr<GDALMDArray> m_poIndexingVariable{};
3110 GDALDimensionWeakIndexingVar(
const std::string &osParentName,
3111 const std::string &osName,
3112 const std::string &osType,
3113 const std::string &osDirection,
GUInt64 nSize);
3118 std::shared_ptr<GDALMDArray> poIndexingVariable)
override;
3120 void SetSize(
GUInt64 nNewSize);
3129 struct GDALAntiRecursionStruct;
3130 class GDALAntiRecursionGuard
3132 GDALAntiRecursionStruct *m_psAntiRecursionStruct;
3133 std::string m_osIdentifier;
3136 GDALAntiRecursionGuard(
const GDALAntiRecursionGuard &) =
delete;
3137 GDALAntiRecursionGuard &operator=(
const GDALAntiRecursionGuard &) =
delete;
3140 explicit GDALAntiRecursionGuard(
const std::string &osIdentifier);
3141 GDALAntiRecursionGuard(
const GDALAntiRecursionGuard &other,
3142 const std::string &osIdentifier);
3143 ~GDALAntiRecursionGuard();
3144 int GetCallDepth()
const
3170 std::string m_osName{};
3171 std::string m_osLeftTableName{};
3172 std::string m_osRightTableName{};
3175 std::string m_osMappingTableName{};
3176 std::vector<std::string> m_osListLeftTableFields{};
3177 std::vector<std::string> m_osListRightTableFields{};
3178 std::vector<std::string> m_osListLeftMappingTableFields{};
3179 std::vector<std::string> m_osListRightMappingTableFields{};
3181 std::string m_osForwardPathLabel{};
3182 std::string m_osBackwardPathLabel{};
3183 std::string m_osRelatedTableType{};
3196 const std::string &osLeftTableName,
3197 const std::string &osRightTableName,
3200 : m_osName(osName), m_osLeftTableName(osLeftTableName),
3201 m_osRightTableName(osRightTableName), m_eCardinality(eCardinality)
3214 return m_eCardinality;
3223 return m_osLeftTableName;
3230 return m_osRightTableName;
3239 return m_osMappingTableName;
3248 m_osMappingTableName = osName;
3259 return m_osListLeftTableFields;
3270 return m_osListRightTableFields;
3281 m_osListLeftTableFields = osListFields;
3292 m_osListRightTableFields = osListFields;
3303 return m_osListLeftMappingTableFields;
3314 return m_osListRightMappingTableFields;
3325 m_osListLeftMappingTableFields = osListFields;
3337 m_osListRightMappingTableFields = osListFields;
3375 return m_osForwardPathLabel;
3395 m_osForwardPathLabel = osLabel;
3415 return m_osBackwardPathLabel;
3435 m_osBackwardPathLabel = osLabel;
3450 return m_osRelatedTableType;
3465 m_osRelatedTableType = osType;
3489 CPLErr CPL_DLL GDALRegenerateOverviewsMultiBand(
3492 const char *pszResampling, GDALProgressFunc pfnProgress,
3495 typedef CPLErr (*GDALResampleFunction)(
3496 double dfXRatioDstToSrc,
double dfYRatioDstToSrc,
double dfSrcXDelta,
3497 double dfSrcYDelta,
GDALDataType eWrkDataType,
const void *pChunk,
3498 const GByte *pabyChunkNodataMask,
int nChunkXOff,
int nChunkXSize,
3499 int nChunkYOff,
int nChunkYSize,
int nDstXOff,
int nDstXOff2,
int nDstYOff,
3501 GDALDataType *peDstBufferDataType,
const char *pszResampling,
3502 int bHasNoData,
float fNoDataValue,
GDALColorTable *poColorTable,
3505 GDALResampleFunction GDALGetResampleFunction(
const char *pszResampling,
3508 GDALDataType GDALGetOvrWorkDataType(
const char *pszResampling,
3514 HFAAuxBuildOverviews(
const char *pszOvrFilename,
GDALDataset *poParentDS,
3515 GDALDataset **ppoDS,
int nBands,
const int *panBandList,
3516 int nNewOverviews,
const int *panNewOverviewList,
3517 const char *pszResampling, GDALProgressFunc pfnProgress,
3520 CPLErr CPL_DLL GTIFFBuildOverviews(
const char *pszFilename,
int nBands,
3522 int nOverviews,
const int *panOverviewList,
3523 const char *pszResampling,
3524 GDALProgressFunc pfnProgress,
3525 void *pProgressData,
3528 int CPL_DLL GDALBandGetBestOverviewLevel(
GDALRasterBand *poBand,
int &nXOff,
3529 int &nYOff,
int &nXSize,
int &nYSize,
3530 int nBufXSize,
int nBufYSize)
3531 CPL_WARN_DEPRECATED(
"Use GDALBandGetBestOverviewLevel2 instead");
3532 int CPL_DLL GDALBandGetBestOverviewLevel2(
GDALRasterBand *poBand,
int &nXOff,
3533 int &nYOff,
int &nXSize,
int &nYSize,
3534 int nBufXSize,
int nBufYSize,
3537 int CPL_DLL GDALOvLevelAdjust(
int nOvLevel,
int nXSize)
3538 CPL_WARN_DEPRECATED(
"Use GDALOvLevelAdjust2 instead");
3539 int CPL_DLL GDALOvLevelAdjust2(
int nOvLevel,
int nXSize,
int nYSize);
3540 int CPL_DLL GDALComputeOvFactor(
int nOvrXSize,
int nRasterXSize,
int nOvrYSize,
3543 GDALDataset CPL_DLL *GDALFindAssociatedAuxFile(
const char *pszBasefile,
3551 int CPL_DLL GDALCheckDatasetDimensions(
int nXSize,
int nYSize);
3552 int CPL_DLL GDALCheckBandCount(
int nBands,
int bIsZeroAllowed);
3558 int CPL_DLL GDALReadWorldFile2(
const char *pszBaseFilename,
3559 const char *pszExtension,
3560 double *padfGeoTransform,
3561 char **papszSiblingFiles,
3562 char **ppszWorldFileNameOut);
3563 int GDALReadTabFile2(
const char *pszBaseFilename,
double *padfGeoTransform,
3564 char **ppszWKT,
int *pnGCPCount,
GDAL_GCP **ppasGCPs,
3565 char **papszSiblingFiles,
char **ppszTabFileNameOut);
3572 void GDALNullifyOpenDatasetsList();
3573 CPLMutex **GDALGetphDMMutex();
3574 CPLMutex **GDALGetphDLMutex();
3575 void GDALNullifyProxyPoolSingleton();
3576 void GDALSetResponsiblePIDForCurrentThread(
GIntBig responsiblePID);
3577 GIntBig GDALGetResponsiblePIDForCurrentThread();
3579 CPLString GDALFindAssociatedFile(
const char *pszBasename,
const char *pszExt,
3582 CPLErr CPL_DLL EXIFExtractMetadata(
char **&papszMetadata,
void *fpL,
3583 int nOffset,
int bSwabflag,
int nTIFFHEADER,
3584 int &nExifOffset,
int &nInterOffset,
3588 const char *
const *papszOptionOptions);
3589 int GDALValidateOptions(
const char *pszOptionList,
3590 const char *
const *papszOptionsToValidate,
3591 const char *pszErrorMessageOptionType,
3592 const char *pszErrorMessageContainerName);
3598 int nXSize,
int nYSize,
int nBufXSize,
3602 bool bThisLevelOnly);
3607 template <
class T>
inline bool ARE_REAL_EQUAL(T fVal1, T fVal2,
int ulp = 2)
3609 return fVal1 == fVal2 ||
3610 std::abs(fVal1 - fVal2) < std::numeric_limits<float>::epsilon() *
3611 std::abs(fVal1 + fVal2) * ulp;
3614 double GDALAdjustNoDataCloseToFloatMax(
double dfVal);
3616 #define DIV_ROUND_UP(a, b) (((a) % (b)) == 0 ? ((a) / (b)) : (((a) / (b)) + 1))
3620 #define GDALSTAT_APPROX_NUMSAMPLES 2500
3625 void GDALDeserializeGCPListFromXML(
CPLXMLNode *psGCPList,
3626 GDAL_GCP **ppasGCPList,
int *pnGCPCount,
3629 void GDALSerializeOpenOptionsToXML(
CPLXMLNode *psParentNode,
3630 char **papszOpenOptions);
3631 char **GDALDeserializeOpenOptionsFromXML(
CPLXMLNode *psParentNode);
3633 int GDALCanFileAcceptSidecarFile(
const char *pszFilename);
3635 bool GDALCanReliablyUseSiblingFileList(
const char *pszFilename);
3637 bool CPL_DLL GDALIsDriverDeprecatedForGDAL35StillEnabled(
3638 const char *pszDriverName,
const char *pszExtraMsg =
"");
3645 } GDALBufferSampleFormat;
3647 bool CPL_DLL GDALBufferHasOnlyNoData(
const void *pBuffer,
double dfNoDataValue,
3648 size_t nWidth,
size_t nHeight,
3649 size_t nLineStride,
size_t nComponents,
3651 GDALBufferSampleFormat nSampleFormat);
3656 double CPL_DLL GDALGetNoDataValueCastToDouble(int64_t nVal);
3657 double CPL_DLL GDALGetNoDataValueCastToDouble(uint64_t nVal);
3662 void CPL_DLL GDALEnablePixelTypeSignedByteWarning(
GDALRasterBandH hBand,
3665 std::string CPL_DLL GDALGetCompressionFormatForJPEG(
VSILFILE *fp);
3666 std::string CPL_DLL GDALGetCompressionFormatForJPEG(
const void *pBuffer,
3667 size_t nBufferSize);
@ GDAL_IDENTIFY_UNKNOWN
Identify could not determine if the file is recognized or not by the probed driver.
Definition: gdal_priv.h:1671
void SetRelatedTableType(const std::string &osType)
Sets the type string of the related table.
Definition: gdal_priv.h:3463
const std::string & GetFullName() const
Return the full name.
Definition: gdal_priv.h:3045
#define CPL_PRINT_FUNC_FORMAT(format_idx, arg_idx)
Tag a function to have printf() formatting.
Definition: cpl_port.h:959
@ GDAL_IDENTIFY_FALSE
Identify determined the file is not recognized by the probed driver.
Definition: gdal_priv.h:1673
VSILFILE * fpL
Pointer to the file.
Definition: gdal_priv.h:303
size_t GetSize() const
Return data type size in bytes.
Definition: gdal_priv.h:2126
virtual bool SetIndexingVariable(std::shared_ptr< GDALMDArray > poIndexingVariable)
Set the variable that is used to index the dimension.
Definition: gdalmultidim.cpp:8834
int GDALGetDataTypeSizeBytes(GDALDataType)
Get data type size in bytes.
Definition: gdal_misc.cpp:336
const std::string & GetFullName() const
Return the full name of the group.
Definition: gdal_priv.h:2302
virtual GDALMaskValueRange GetMaskValueRange() const
Returns the range of values that a mask band can take.
Definition: gdalrasterband.cpp:7535
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:205
int GetYOffset() const
Return y offset.
Definition: gdal_priv.h:1938
Class used to represent potentially complex data types.
Definition: gdal_priv.h:2047
int GetYSize() const
Return the height of the block.
Definition: gdal_priv.h:1055
std::input_iterator_tag iterator_category
iterator_category
Definition: gdal_priv.h:771
GUIntBig GUInt64
Unsigned 64 bit integer type.
Definition: cpl_port.h:258
Class for dataset open functions.
Definition: gdal_priv.h:276
Layer iterator.
Definition: gdal_priv.h:760
virtual CPLErr ComputeStatistics(int bApproxOK, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev, GDALProgressFunc, void *pProgressData)
Compute image statistics.
Definition: gdalrasterband.cpp:5578
int GetPixelSpace() const
Return pixel spacing.
Definition: gdal_priv.h:2001
const std::string & GetFullName() const
Return the name of an array or attribute.
Definition: gdal_priv.h:2445
GPtrDiff_t GetBlockSize() const
Return the block size in bytes.
Definition: gdal_priv.h:1076
Class for a component of a compound extended data type.
Definition: gdal_priv.h:2181
constexpr GDALSuggestedBlockAccessPattern GSBAP_RANDOM
Random access to blocks is efficient.
Definition: gdal_priv.h:1255
int GetBandCount() const
Return band count.
Definition: gdal_priv.h:1987
virtual bool IsMaskBand() const
Returns whether a band is a mask band.
Definition: gdalrasterband.cpp:7484
constexpr GDALSuggestedBlockAccessPattern GSBAP_UNKNOWN
Unknown, or no particular read order is suggested.
Definition: gdal_priv.h:1252
const std::string & GetLeftTableName() const
Get the name of the left (or base/origin) table in the relationship.
Definition: gdal_priv.h:3221
OGRLayer::FeatureIterator begin(OGRLayer *poLayer)
Return begin of feature iterator.
Definition: ogrsf_frmts.h:364
GDALDatasetH GDALOpenEx(const char *pszFilename, unsigned int nOpenFlags, const char *const *papszAllowedDrivers, const char *const *papszOpenOptions, const char *const *papszSiblingFiles)
Open a raster or vector file as a GDALDataset.
Definition: gdaldataset.cpp:3370
void difference_type
difference_type
Definition: gdal_priv.h:768
virtual bool IsWritable() const =0
Return whether an array is writable.
This class represents a style table.
Definition: ogr_featurestyle.h:84
void SetForwardPathLabel(const std::string &osLabel)
Sets the label of the forward path for the relationship.
Definition: gdal_priv.h:3393
@ GEDTC_NUMERIC
Numeric value.
Definition: gdal.h:323
String list class designed around our use of C "char**" string lists.
Definition: cpl_string.h:437
Class used as a session object for asynchronous requests.
Definition: gdal_priv.h:1894
@ GDT_Unknown
Definition: gdal.h:65
const char *const * papszAllowedDrivers
Allowed drivers (NULL for all)
Definition: gdal_priv.h:311
GDALRelationship(const std::string &osName, const std::string &osLeftTableName, const std::string &osRightTableName, GDALRelationshipCardinality eCardinality=GDALRelationshipCardinality::GRC_ONE_TO_MANY)
Constructor for a relationship between two tables.
Definition: gdal_priv.h:3195
@ GMVR_0_AND_255_ONLY
Definition: gdal_priv.h:1245
GDALExtendedDataTypeClass GetClass() const
Return type class.
Definition: gdal_priv.h:2084
@ GRT_ASSOCIATION
Association relationship.
Definition: gdal.h:1909
const std::string & GetRightTableName() const
Get the name of the right (or related/destination) table in the relationship.
Definition: gdal_priv.h:3228
int GetBufferYSize() const
Return buffer height.
Definition: gdal_priv.h:1973
Format specific driver.
Definition: gdal_priv.h:1693
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:166
Abstract class, implemented by GDALAttribute and GDALMDArray.
Definition: gdal_priv.h:2385
Class returned by GetBands() that act as a container for raster bands.
Definition: gdal_priv.h:496
std::shared_ptr< GDALMDArray > at(GUInt64 idx, GUInt64VarArg... tail) const
Return a view of the array using integer indexing.
Definition: gdal_priv.h:2843
void * GDALColorTableH
Opaque type used for the C bindings of the C++ GDALColorTable class.
Definition: gdal.h:300
int GetLineSpace() const
Return line spacing.
Definition: gdal_priv.h:2008
void * GetDataRef(void)
Return the data buffer.
Definition: gdal_priv.h:1069
int nOpenFlags
Open flags.
Definition: gdal_priv.h:295
char ** papszOpenOptions
Open options.
Definition: gdal_priv.h:290
virtual CPLErr SetMetadataItem(const char *pszName, const char *pszValue, const char *pszDomain="")
Set single metadata item.
Definition: gdalmajorobject.cpp:385
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:334
Color tuple.
Definition: gdal.h:1729
const std::string & GetName() const
Return the name.
Definition: gdal_priv.h:3036
virtual const std::vector< std::shared_ptr< GDALDimension > > & GetDimensions() const =0
Return the dimensions of an attribute/array.
GDALColorInterp
Definition: gdal.h:226
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:72
Convenient string class based on std::string.
Definition: cpl_string.h:311
A single raster band (or channel).
Definition: gdal_priv.h:1269
GIntBig GInt64
Signed 64 bit integer type.
Definition: cpl_port.h:256
const std::vector< std::string > & GetRightTableFields() const
Get the names of the participating fields from the right table in the relationship.
Definition: gdal_priv.h:3268
GDALIdentifyEnum
Enumeration used by GDALDriver::pfnIdentify().
Definition: gdal_priv.h:1667
int GetBandSpace() const
Return band spacing.
Definition: gdal_priv.h:2015
@ GMVR_0_AND_1_ONLY
Definition: gdal_priv.h:1244
virtual std::vector< std::shared_ptr< GDALAttribute > > GetAttributes(CSLConstList papszOptions=nullptr) const
Return the list of attributes contained in a GDALMDArray or GDALGroup.
Definition: gdalmultidim.cpp:271
int GPtrDiff_t
Integer type large enough to hold the difference between 2 addresses.
Definition: cpl_port.h:276
const std::string & GetDirection() const
Return the axis direction.
Definition: gdal_priv.h:3071
void SetType(GDALRelationshipType eType)
Sets the type of the relationship.
Definition: gdal_priv.h:3353
CPLErr GDALClose(GDALDatasetH)
Close GDAL dataset.
Definition: gdaldataset.cpp:3800
GDALDataType GetBufferType() const
Return buffer data type.
Definition: gdal_priv.h:1980
GDALExtendedDataTypeClass
Enumeration giving the class of a GDALExtendedDataType.
Definition: gdal.h:320
GDALMaskValueRange
Range of values found in a mask band.
Definition: gdal_priv.h:1240
const GByte * data() const
Return pointer to the start of data.
Definition: gdal_priv.h:2553
GDALDataType
Definition: gdal.h:63
Document node structure.
Definition: cpl_minixml.h:69
std::unique_ptr< OGRFeature, OGRFeatureUniquePtrDeleter > OGRFeatureUniquePtr
Unique pointer type for OGRFeature.
Definition: ogr_feature.h:1287
static GDALRelationship * FromHandle(GDALRelationshipH hRelationship)
Convert a GDALRelationshipH to a GDALRelationship*.
Definition: gdal_priv.h:3477
virtual const char * GetMetadataItem(const char *pszName, const char *pszDomain="")
Fetch single metadata item.
Definition: gdalmajorobject.cpp:341
const std::string & GetName() const
Return the name of an array or attribute.
Definition: gdal_priv.h:2435
A single raster block in the block cache.
Definition: gdal_priv.h:972
void * GDALMajorObjectH
Opaque type used for the C bindings of the C++ GDALMajorObject class.
Definition: gdal.h:288
Store the raw result of an attribute value, which might contain dynamically allocated structures (lik...
Definition: gdal_priv.h:2523
Class modeling a named container of GDALAttribute, GDALMDArray, OGRLayer or other GDALGroup.
Definition: gdal_priv.h:2271
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:347
char ** GetOpenOptions()
Return open options.
Definition: gdal_priv.h:644
static GDALMajorObject * FromHandle(GDALMajorObjectH hMajorObject)
Convert a GDALMajorObjectH to a GDALMajorObject*.
Definition: gdal_priv.h:181
size_t size() const
Return the size in bytes of the raw result.
Definition: gdal_priv.h:2558
Interface used to get a single GDALAttribute or a set of GDALAttribute.
Definition: gdal_priv.h:2233
Definition of a table relationship.
Definition: gdal_priv.h:3166
int bStatOK
Whether stat()'ing the file was successful.
Definition: gdal_priv.h:298
GDALRelationshipType GetType() const
Get the type of the relationship.
Definition: gdal_priv.h:3344
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:315
Class for managing the registration of file format drivers.
Definition: gdal_priv.h:1837
void * GDALRelationshipH
Opaque type used for the C bindings of the C++ GDALRelationship class.
Definition: gdal.h:312
const std::string & GetForwardPathLabel() const
Get the label of the forward path for the relationship.
Definition: gdal_priv.h:3373
Class modeling a multi-dimensional array.
Definition: gdal_priv.h:2697
GByte * pabyHeader
Buffer with first bytes of the file.
Definition: gdal_priv.h:308
int GetYSize() const
Return height.
Definition: gdal_priv.h:1952
GDALAccess eAccess
Access flag.
Definition: gdal_priv.h:293
virtual GDALRasterBand * GetMaskBand()
Return the mask band associated with the band.
Definition: gdalrasterband.cpp:7018
GDALDataType GetNumericDataType() const
Return numeric data type (only valid when GetClass() == GEDTC_NUMERIC)
Definition: gdal_priv.h:2094
static GDALExtendedDataType CreateString(size_t nMaxStringLength=0, GDALExtendedDataTypeSubType eSubType=GEDTST_NONE)
Return a new GDALExtendedDataType of class GEDTC_STRING.
Definition: gdalmultidim.cpp:8562
@ GRC_ONE_TO_MANY
One-to-many.
Definition: gdal.h:1893
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1195
int CPLErrorNum
Error number.
Definition: cpl_error.h:95
unsigned long long GUIntBig
Large unsigned integer type (generally 64-bit unsigned integer type).
Definition: cpl_port.h:238
static GDALDataset * Open(const char *pszFilename, unsigned int nOpenFlags=0, const char *const *papszAllowedDrivers=nullptr, const char *const *papszOpenOptions=nullptr, const char *const *papszSiblingFiles=nullptr)
Definition: gdal_priv.h:700
@ GDT_Float64
Definition: gdal.h:75
GDALExtendedDataTypeSubType GetSubType() const
Return subtype.
Definition: gdal_priv.h:2105
int DropLock(void)
Decrement the lock count.
Definition: gdal_priv.h:1016
const std::string & GetBackwardPathLabel() const
Get the label of the backward path for the relationship.
Definition: gdal_priv.h:3413
const std::vector< std::string > & GetLeftTableFields() const
Get the names of the participating fields from the left table in the relationship.
Definition: gdal_priv.h:3257
int bIsDirectory
Whether the file is a directory.
Definition: gdal_priv.h:300
const std::string & GetType() const
Return the axis type.
Definition: gdal_priv.h:3058
Ground Control Point.
Definition: gdal.h:1036
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:319
virtual CPLErr IReadBlock(int nBlockXOff, int nBlockYOff, void *pData)=0
Class modeling a a dimension / axis used to index multidimensional arrays.
Definition: gdal_priv.h:3021
@ GEDTST_NONE
None.
Definition: gdal.h:336
void SetBackwardPathLabel(const std::string &osLabel)
Sets the label of the backward path for the relationship.
Definition: gdal_priv.h:3433
GDALRelationshipCardinality GetCardinality() const
Get the cardinality of the relationship.
Definition: gdal_priv.h:3212
#define CPL_NULL_TERMINATED
Null terminated variadic.
Definition: cpl_port.h:947
constexpr GDALSuggestedBlockAccessPattern GSBAP_BOTTOM_TO_TOP
Reading by strips from bottom to top is the most efficient.
Definition: gdal_priv.h:1261
const std::vector< std::unique_ptr< GDALEDTComponent > > & GetComponents() const
Return the components of the data type (only valid when GetClass() == GEDTC_COMPOUND)
Definition: gdal_priv.h:2115
virtual const GDALExtendedDataType & GetDataType() const =0
Return the data type of an attribute/array.
constexpr GDALSuggestedBlockAccessPattern GSBAP_LARGEST_CHUNK_POSSIBLE
Reading the largest chunk from the raster is the most efficient (can be combined with above values).
Definition: gdal_priv.h:1265
Object returned by GetFeatures() iterators.
Definition: gdal_priv.h:712
GDALDataset * GetGDALDataset()
Return dataset.
Definition: gdal_priv.h:1924
static GDALDatasetH ToHandle(GDALDataset *poDS)
Convert a GDALDataset* to a GDALDatasetH.
Definition: gdal_priv.h:684
void SetRightTableFields(const std::vector< std::string > &osListFields)
Sets the names of the participating fields from the right table in the relationship.
Definition: gdal_priv.h:3290
struct CPLVirtualMem CPLVirtualMem
Opaque type that represents a virtual memory mapping.
Definition: cpl_virtualmem.h:62
virtual bool Read(const GUInt64 *arrayStartIdx, const size_t *count, const GInt64 *arrayStep, const GPtrDiff_t *bufferStride, const GDALExtendedDataType &bufferDataType, void *pDstBuffer, const void *pDstBufferAllocStart=nullptr, size_t nDstBufferAllocSize=0) const
Read part or totality of a multidimensional array or attribute.
Definition: gdalmultidim.cpp:1890
Virtual file handle.
Definition: cpl_vsi_virtual.h:61
virtual CPLErr SetMetadata(char **papszMetadata, const char *pszDomain="")
Set metadata.
Definition: gdalmajorobject.cpp:290
virtual int CloseDependentDatasets()
Drop references to any other datasets referenced by this dataset.
Definition: gdaldataset.cpp:4190
void(* GDALQueryLoggerFunc)(const char *pszSQL, const char *pszError, int64_t lNumRecords, int64_t lExecutionTimeMilliseconds, void *pQueryLoggerArg)
Type of functions to pass to GDALDatasetSetQueryLoggerFunc.
Definition: gdal.h:1262
static GDALColorTableH ToHandle(GDALColorTable *poCT)
Convert a GDALColorTable* to a GDALRasterBandH.
Definition: gdal_priv.h:1146
int AddLock(void)
Increment the lock count.
Definition: gdal_priv.h:1011
virtual CPLErr CreateMaskBand(int nFlagsIn)
Adds a mask band to the dataset.
Definition: gdaldataset.cpp:3179
void SetLeftTableFields(const std::vector< std::string > &osListFields)
Sets the names of the participating fields from the left table in the relationship.
Definition: gdal_priv.h:3279
Definition of a field domain.
Definition: ogr_feature.h:1341
GIntBig GSpacing
Type to express pixel, line or band spacing.
Definition: gdal.h:315
GUIntBig vsi_l_offset
Type for a file offset.
Definition: cpl_vsi.h:146
bool operator!=(const GDALExtendedDataType &other) const
Non-equality operator.
Definition: gdal_priv.h:2066
GUInt64 GetSize() const
Return the size, that is the number of values along the dimension.
Definition: gdal_priv.h:3080
GDALAccess
Definition: gdal.h:124
OGRLayer::FeatureIterator end(OGRLayer *poLayer)
Return end of feature iterator.
Definition: ogrsf_frmts.h:372
GDALAsyncStatusType
status of the asynchronous stream
Definition: gdal.h:110
size_t GetOffset() const
Return the offset (in bytes) of the component in the compound data type.
Definition: gdal_priv.h:2204
static GDALDriver * FromHandle(GDALDriverH hDriver)
Convert a GDALDriverH to a GDALDriver*.
Definition: gdal_priv.h:1817
const GByte & operator[](size_t idx) const
Return byte at specified index.
Definition: gdal_priv.h:2548
@ GDAL_IDENTIFY_TRUE
Identify determined the file is recognized by the probed driver.
Definition: gdal_priv.h:1675
int OGRErr
Type for a OGR error.
Definition: ogr_core.h:378
const std::string & GetMappingTableName() const
Get the name of the mapping table for many-to-many relationships.
Definition: gdal_priv.h:3237
@ GA_ReadOnly
Definition: gdal.h:126
virtual std::shared_ptr< GDALMDArray > GetIndexingVariable() const
Return the variable that is used to index the dimension (if there is one).
Definition: gdalmultidim.cpp:8813
int GetXSize() const
Return width.
Definition: gdal_priv.h:1945
int GetDirty() const
Return the dirty flag.
Definition: gdal_priv.h:1062
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:235
const std::vector< std::string > & GetLeftMappingTableFields() const
Get the names of the mapping table fields which correspond to the participating fields from the left ...
Definition: gdal_priv.h:3301
const std::vector< std::string > & GetRightMappingTableFields() const
Get the names of the mapping table fields which correspond to the participating fields from the right...
Definition: gdal_priv.h:3312
void pointer
pointer
Definition: gdal_priv.h:769
int GetBufferXSize() const
Return buffer width.
Definition: gdal_priv.h:1966
int nHeaderBytes
Number of bytes in pabyHeader.
Definition: gdal_priv.h:306
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:406
static GDALDriverH ToHandle(GDALDriver *poDriver)
Convert a GDALDriver* to a GDALDriverH.
Definition: gdal_priv.h:1809
void static GDALRasterBandH ToHandle(GDALRasterBand *poBand)
Convert a GDALRasterBand* to a GDALRasterBandH.
Definition: gdal_priv.h:1506
int GetYOff() const
Return the y offset of the top-left corner of the block.
Definition: gdal_priv.h:1041
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition: cpl_port.h:985
GDALAccess GetAccess() const
Return access mode.
Definition: gdal_priv.h:631
void SetMappingTableName(const std::string &osName)
Sets the name of the mapping table for many-to-many relationships.
Definition: gdal_priv.h:3246
A simple feature, including geometry and attributes.
Definition: ogr_feature.h:669
virtual const std::string & GetFilename() const =0
Return the filename that contains that array.
GDALRWFlag
Definition: gdal.h:131
const std::string & GetName() const
Get the name of the relationship.
Definition: gdal_priv.h:3206
void SetLeftMappingTableFields(const std::vector< std::string > &osListFields)
Sets the names of the mapping table fields which correspond to the participating fields from the left...
Definition: gdal_priv.h:3323
Class returned by GetFeatures() that act as a container for vector features.
Definition: gdal_priv.h:814
static GDALRelationshipH ToHandle(GDALRelationship *poRelationship)
Convert a GDALRelationship* to a GDALRelationshipH.
Definition: gdal_priv.h:3470
int GDALSuggestedBlockAccessPattern
Suggested/most efficient access pattern to blocks.
Definition: gdal_priv.h:1249
CPLErr BuildOverviews(const char *, int, const int *, int, const int *, GDALProgressFunc, void *, CSLConstList papszOptions)
Build raster overview(s)
Definition: gdaldataset.cpp:1977
Object with metadata.
Definition: gdal_priv.h:137
bool Write(const GUInt64 *arrayStartIdx, const size_t *count, const GInt64 *arrayStep, const GPtrDiff_t *bufferStride, const GDALExtendedDataType &bufferDataType, const void *pSrcBuffer, const void *pSrcBufferAllocStart=nullptr, size_t nSrcBufferAllocSize=0)
Write part or totality of a multidimensional array or attribute.
Definition: gdalmultidim.cpp:1993
virtual CPLErr IRasterIO(GDALRWFlag, int, int, int, int, void *, int, int, GDALDataType, GSpacing, GSpacing, GDALRasterIOExtraArg *psExtraArg)
Read/write a region of image data for this band.
Definition: rasterio.cpp:206
CPLErr
Error category.
Definition: cpl_error.h:52
Class modeling an attribute that has a name, a value and a type, and is typically used to describe a ...
Definition: gdal_priv.h:2586
const GDALExtendedDataType & GetType() const
Return the data type of the component.
Definition: gdal_priv.h:2213
char * pszFilename
Filename.
Definition: gdal_priv.h:288
static GDALColorTable * FromHandle(GDALColorTableH hCT)
Convert a GDALColorTableH to a GDALColorTable*.
Definition: gdal_priv.h:1154
@ GDT_Byte
Definition: gdal.h:66
@ GPI_RGB
Definition: gdal.h:255
GDALExtendedDataTypeSubType
Enumeration giving the subtype of a GDALExtendedDataType.
Definition: gdal.h:333
std::unique_ptr< GDALDataset, GDALDatasetUniquePtrDeleter > GDALDatasetUniquePtr
Unique pointer type for GDALDataset.
Definition: gdal_priv.h:962
virtual int GetMaskFlags()
Return the status flags of the mask band associated with the band.
Definition: gdalrasterband.cpp:7343
GDALRIOResampleAlg
RasterIO() resampling method.
Definition: gdal.h:142
GDALDriverManager * GetGDALDriverManager(void)
Fetch the global GDAL driver manager.
Definition: gdaldrivermanager.cpp:102
Definition: gdal_rat.h:47
int GetXOffset() const
Return x offset.
Definition: gdal_priv.h:1931
size_t GetMaxStringLength() const
Return the maximum length of a string in bytes.
Definition: gdal_priv.h:2135
GDALRelationshipCardinality
Cardinality of relationship.
Definition: gdal.h:1888
GDALRasterBand * GetBand()
Accessor to source GDALRasterBand object.
Definition: gdal_priv.h:1087
Class returned by GetLayers() that acts as a range of layers.
Definition: gdal_priv.h:747
int GetXOff() const
Return the x offset of the top-left corner of the block.
Definition: gdal_priv.h:1034
GDALDataType GetDataType() const
Return the data type.
Definition: gdal_priv.h:1027
static GDALDataset * FromHandle(GDALDatasetH hDS)
Convert a GDALDatasetH to a GDALDataset*.
Definition: gdal_priv.h:692
GDALPaletteInterp
Definition: gdal.h:252
static GDALExtendedDataType Create(GDALDataType eType)
Return a new GDALExtendedDataType of class GEDTC_NUMERIC.
Definition: gdalmultidim.cpp:8497
static GDALMajorObjectH ToHandle(GDALMajorObject *poMajorObject)
Convert a GDALMajorObject* to a GDALMajorObjectH.
Definition: gdal_priv.h:173
void * GDALRasterBandH
Opaque type used for the C bindings of the C++ GDALRasterBand class.
Definition: gdal.h:294
const std::string & GetName() const
Return the name of the group.
Definition: gdal_priv.h:2293
void SetRightMappingTableFields(const std::vector< std::string > &osListFields)
Sets the names of the mapping table fields which correspond to the participating fields from the righ...
Definition: gdal_priv.h:3335
@ wkbUnknown
unknown type, non-standard
Definition: ogr_core.h:408
void * GetBuffer()
Return buffer.
Definition: gdal_priv.h:1959
const std::string & GetName() const
Return type name.
Definition: gdal_priv.h:2075
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition: cpl_port.h:1051
const std::string & GetName() const
Return the name.
Definition: gdal_priv.h:2195
int GetXSize() const
Return the width of the block.
Definition: gdal_priv.h:1048
void * GDALDatasetH
Opaque type used for the C bindings of the C++ GDALDataset class.
Definition: gdal.h:291
static GDALRasterBand * FromHandle(GDALRasterBandH hBand)
Convert a GDALRasterBandH to a GDALRasterBand*.
Definition: gdal_priv.h:1514
A color table / palette.
Definition: gdal_priv.h:1120
int * GetBandMap()
Return band map.
Definition: gdal_priv.h:1994
constexpr GDALSuggestedBlockAccessPattern GSBAP_TOP_TO_BOTTOM
Reading by strips from top to bottom is the most efficient.
Definition: gdal_priv.h:1258
void * GDALDriverH
Opaque type used for the C bindings of the C++ GDALDriver class.
Definition: gdal.h:297
const std::string & GetRelatedTableType() const
Get the type string of the related table.
Definition: gdal_priv.h:3448
GDALRelationshipType
Type of relationship.
Definition: gdal.h:1904