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"
63 #include "gdalsubdatasetinfo.h"
68 #include "cpl_multiproc.h"
69 #include "cpl_atomic_ops.h"
85 #define GMO_VALID 0x0001
86 #define GMO_IGNORE_UNIMPLEMENTED 0x0002
87 #define GMO_SUPPORT_MD 0x0004
88 #define GMO_SUPPORT_MDMD 0x0008
89 #define GMO_MD_DIRTY 0x0010
90 #define GMO_PAM_CLASS 0x0020
98 class CPL_DLL GDALMultiDomainMetadata
101 char **papszDomainList;
105 GDALMultiDomainMetadata();
106 ~GDALMultiDomainMetadata();
108 int XMLInit(
CPLXMLNode *psMetadata,
int bMerge);
111 char **GetDomainList()
113 return papszDomainList;
116 char **GetMetadata(
const char *pszDomain =
"");
117 CPLErr SetMetadata(
char **papszMetadata,
const char *pszDomain =
"");
118 const char *GetMetadataItem(
const char *pszName,
119 const char *pszDomain =
"");
120 CPLErr SetMetadataItem(
const char *pszName,
const char *pszValue,
121 const char *pszDomain =
"");
144 GDALMultiDomainMetadata oMDMD{};
148 char **BuildMetadataDomainList(
char **papszList,
int bCheckNonEmpty,
155 int GetMOFlags()
const;
156 void SetMOFlags(
int nFlagsIn);
158 virtual const char *GetDescription()
const;
159 virtual void SetDescription(
const char *);
161 virtual char **GetMetadataDomainList();
163 virtual char **GetMetadata(
const char *pszDomain =
"");
164 virtual CPLErr SetMetadata(
char **papszMetadata,
165 const char *pszDomain =
"");
166 virtual const char *GetMetadataItem(
const char *pszName,
167 const char *pszDomain =
"");
168 virtual CPLErr SetMetadataItem(
const char *pszName,
const char *pszValue,
169 const char *pszDomain =
"");
193 class CPL_DLL GDALDefaultOverviews
204 bool bCheckedForMask;
213 bool bCheckedForOverviews;
217 char **papszInitSiblingFiles;
220 GDALDefaultOverviews();
221 ~GDALDefaultOverviews();
223 void Initialize(
GDALDataset *poDSIn,
const char *pszName =
nullptr,
224 char **papszSiblingFiles =
nullptr,
int bNameIsOVR = FALSE);
226 void TransferSiblingFiles(
char **papszSiblingFiles);
234 int GetOverviewCount(
int nBand);
238 int nOverviews,
const int *panOverviewList,
239 int nBands,
const int *panBandList,
240 GDALProgressFunc pfnProgress,
void *pProgressData,
243 CPLErr BuildOverviewsSubDataset(
const char *pszPhysicalFile,
244 const char *pszResampling,
int nOverviews,
245 const int *panOverviewList,
int nBands,
246 const int *panBandList,
247 GDALProgressFunc pfnProgress,
257 int GetMaskFlags(
int nBand);
259 int HaveMaskFile(
char **papszSiblings =
nullptr,
260 const char *pszBasename =
nullptr);
262 char **GetSiblingFiles()
264 return papszInitSiblingFiles;
279 bool bHasGotSiblingFiles;
280 char **papszSiblingFiles;
281 int nHeaderBytesTried;
285 const char *
const *papszSiblingFiles =
nullptr);
314 int TryToIngest(
int nBytes);
315 char **GetSiblingFiles();
316 char **StealSiblingFiles();
317 bool AreSiblingFilesLoaded()
const;
332 class swq_select_parse_options;
336 typedef struct GDALSQLParseInfo GDALSQLParseInfo;
340 #ifdef GDAL_COMPILATION
341 #define OPTIONAL_OUTSIDE_GDAL(val)
343 #define OPTIONAL_OUTSIDE_GDAL(val) = val
351 GDALOpenEx(
const char *pszFilename,
unsigned int nOpenFlags,
352 const char *
const *papszAllowedDrivers,
353 const char *
const *papszOpenOptions,
354 const char *
const *papszSiblingFiles);
358 friend class GDALDefaultOverviews;
359 friend class GDALProxyDataset;
362 CPL_INTERNAL
void AddToDatasetOpenList();
364 CPL_INTERNAL
void UnregisterFromSharedDataset();
366 CPL_INTERNAL
static void ReportErrorV(
const char *pszDSName,
368 const char *fmt, va_list args);
376 int nRasterXSize = 512;
377 int nRasterYSize = 512;
381 static constexpr
int OPEN_FLAGS_CLOSED = -1;
386 bool bForceCachedIO =
false;
387 bool bShared =
false;
388 bool bIsInternal =
true;
389 bool bSuppressOnClose =
false;
391 mutable std::map<std::string, std::unique_ptr<OGRFieldDomain>>
392 m_oMapFieldDomains{};
397 void RasterInitialize(
int,
int);
399 void SetBand(
int nNewBand, std::unique_ptr<GDALRasterBand> poBand);
401 GDALDefaultOverviews oOvManager{};
403 virtual CPLErr IBuildOverviews(
const char *,
int,
const int *,
int,
404 const int *, GDALProgressFunc,
void *,
413 BlockBasedRasterIO(
GDALRWFlag,
int,
int,
int,
int,
void *,
int,
int,
416 CPLErr BlockBasedFlushCache(
bool bAtClosing);
419 BandBasedRasterIO(
GDALRWFlag eRWFlag,
int nXOff,
int nYOff,
int nXSize,
420 int nYSize,
void *pData,
int nBufXSize,
int nBufYSize,
427 RasterIOResampled(
GDALRWFlag eRWFlag,
int nXOff,
int nYOff,
int nXSize,
428 int nYSize,
void *pData,
int nBufXSize,
int nBufYSize,
434 CPLErr ValidateRasterIOOrAdviseReadParameters(
435 const char *pszCallingFunc,
int *pbStopProcessingOnCENone,
int nXOff,
436 int nYOff,
int nXSize,
int nYSize,
int nBufXSize,
int nBufYSize,
437 int nBandCount,
int *panBandMap);
440 int nXSize,
int nYSize,
void *pData,
441 int nBufXSize,
int nBufYSize,
443 int *panBandMap,
GSpacing nPixelSpace,
447 void ShareLockWithParentDataset(
GDALDataset *poParentDataset);
451 void CleanupPostFileClosing();
453 virtual int CloseDependentDatasets();
455 int ValidateLayerCreationOptions(
const char *
const *papszLCO);
457 char **papszOpenOptions =
nullptr;
464 void LeaveReadWrite();
467 void TemporarilyDropReadWriteLock();
468 void ReacquireReadWriteLock();
470 void DisableReadWriteMutex();
475 bool IsAllBands(
int nBandCount,
const int *panBandList)
const;
483 int GetRasterXSize();
484 int GetRasterYSize();
485 int GetRasterCount();
495 void *poQueryLoggerArgIn);
508 class CPL_DLL Iterator
511 std::unique_ptr<Private> m_poPrivate;
515 Iterator(
const Iterator &oOther);
517 Iterator(Iterator &&oOther) noexcept;
521 Iterator &operator++();
522 bool operator!=(
const Iterator &it)
const;
526 const Iterator
begin()
const;
528 const Iterator
end()
const;
538 virtual CPLErr FlushCache(
bool bAtClosing =
false);
540 virtual GIntBig GetEstimatedRAMUsage();
546 const char *GetProjectionRef(
void)
const;
547 CPLErr SetProjection(
const char *pszProjection);
549 virtual CPLErr GetGeoTransform(
double *padfTransform);
550 virtual CPLErr SetGeoTransform(
double *padfTransform);
554 virtual void *GetInternalHandle(
const char *pszHandleName);
556 virtual char **GetFileList(
void);
558 virtual const char *GetDriverName();
561 virtual int GetGCPCount();
567 const char *GetGCPProjection();
569 const char *pszGCPProjection);
571 virtual CPLErr AdviseRead(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
573 int nBandCount,
int *panBandList,
574 char **papszOptions);
576 virtual CPLErr CreateMaskBand(
int nFlagsIn);
579 BeginAsyncReader(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
void *pBuf,
581 int nBandCount,
int *panBandMap,
int nPixelSpace,
582 int nLineSpace,
int nBandSpace,
char **papszOptions);
586 struct RawBinaryLayout
588 enum class Interleaving
595 std::string osRawFilename{};
596 Interleaving eInterleaving = Interleaving::UNKNOWN;
598 bool bLittleEndianOrder =
false;
606 virtual bool GetRawBinaryLayout(RawBinaryLayout &);
613 OPTIONAL_OUTSIDE_GDAL(
nullptr)
617 virtual CPLStringList GetCompressionFormats(
int nXOff,
int nYOff,
618 int nXSize,
int nYSize,
620 const int *panBandList);
621 virtual CPLErr ReadCompressedData(
const char *pszFormat,
int nXOff,
622 int nYOff,
int nXSize,
int nYSize,
623 int nBands,
const int *panBandList,
624 void **ppBuffer,
size_t *pnBufferSize,
625 char **ppszDetailedFormat);
639 int GetShared()
const;
642 void MarkSuppressOnClose();
649 return papszOpenOptions;
652 static GDALDataset **GetOpenDatasets(
int *pnDatasetCount);
654 CPLErr BuildOverviews(
const char *,
int,
const int *,
int,
const int *,
655 GDALProgressFunc,
void *,
658 OPTIONAL_OUTSIDE_GDAL(
nullptr)
666 static
void ReportError(const
char *pszDSName,
CPLErr eErrClass,
671 char **GetMetadata(
const char *pszDomain =
"")
override;
675 CPLErr SetMetadata(
char **papszMetadata,
const char *pszDomain)
override;
676 CPLErr SetMetadataItem(
const char *pszName,
const char *pszValue,
677 const char *pszDomain)
override;
680 char **GetMetadataDomainList()
override;
682 virtual void ClearStatistics();
704 unsigned int nOpenFlags = 0,
705 const char *
const *papszAllowedDrivers =
nullptr,
706 const char *
const *papszOpenOptions =
nullptr,
707 const char *
const *papszSiblingFiles =
nullptr)
709 return FromHandle(
GDALOpenEx(pszFilename, nOpenFlags,
710 papszAllowedDrivers, papszOpenOptions,
726 void SetEnableOverviews(
bool bEnable);
729 bool AreOverviewsEnabled()
const;
734 Private *m_poPrivate;
736 CPL_INTERNAL
OGRLayer *BuildLayerFromSelectInfo(
737 swq_select *psSelectInfo,
OGRGeometry *poSpatialFilter,
738 const char *pszDialect, swq_select_parse_options *poSelectParseOptions);
742 virtual int GetLayerCount();
743 virtual OGRLayer *GetLayer(
int iLayer);
745 virtual bool IsLayerPrivate(
int iLayer)
const;
766 std::unique_ptr<Private> m_poPrivate;
774 std::input_iterator_tag;
800 OGRLayer *operator[](
size_t iLayer);
801 OGRLayer *operator[](
const char *pszLayername);
806 virtual OGRLayer *GetLayerByName(
const char *);
807 virtual OGRErr DeleteLayer(
int iLayer);
809 virtual void ResetReading();
811 double *pdfProgressPct,
812 GDALProgressFunc pfnProgress,
813 void *pProgressData);
826 class CPL_DLL Iterator
829 std::unique_ptr<Private> m_poPrivate;
833 Iterator(
const Iterator &oOther);
835 Iterator(Iterator &&oOther) noexcept;
839 Iterator &operator++();
840 bool operator!=(
const Iterator &it)
const;
844 const Iterator
begin()
const;
846 const Iterator
end()
const;
851 virtual int TestCapability(
const char *);
853 virtual std::vector<std::string>
854 GetFieldDomainNames(
CSLConstList papszOptions =
nullptr)
const;
856 virtual const OGRFieldDomain *GetFieldDomain(
const std::string &name)
const;
858 virtual bool AddFieldDomain(std::unique_ptr<OGRFieldDomain> &&domain,
859 std::string &failureReason);
861 virtual bool DeleteFieldDomain(
const std::string &name,
862 std::string &failureReason);
864 virtual bool UpdateFieldDomain(std::unique_ptr<OGRFieldDomain> &&domain,
865 std::string &failureReason);
867 virtual std::vector<std::string>
868 GetRelationshipNames(
CSLConstList papszOptions =
nullptr)
const;
871 GetRelationship(
const std::string &name)
const;
874 AddRelationship(std::unique_ptr<GDALRelationship> &&relationship,
875 std::string &failureReason);
877 virtual bool DeleteRelationship(
const std::string &name,
878 std::string &failureReason);
881 UpdateRelationship(std::unique_ptr<GDALRelationship> &&relationship,
882 std::string &failureReason);
888 char **papszOptions =
nullptr);
891 virtual void SetStyleTableDirectly(
OGRStyleTable *poStyleTable);
895 virtual OGRLayer *ExecuteSQL(
const char *pszStatement,
897 const char *pszDialect);
898 virtual void ReleaseResultSet(
OGRLayer *poResultsSet);
899 virtual OGRErr AbortSQL();
901 int GetRefCount()
const;
902 int GetSummaryRefCount()
const;
905 virtual OGRErr StartTransaction(
int bForce = FALSE);
906 virtual OGRErr CommitTransaction();
907 virtual OGRErr RollbackTransaction();
909 virtual std::shared_ptr<GDALGroup> GetRootGroup()
const;
912 static int IsGenericSQLDialect(
const char *pszDialect);
916 BuildParseInfo(swq_select *psSelectInfo,
917 swq_select_parse_options *poSelectParseOptions);
918 static void DestroyParseInfo(GDALSQLParseInfo *psParseInfo);
920 const char *pszDialect,
921 swq_select_parse_options *poSelectParseOptions);
930 OGRErr ProcessSQLCreateIndex(
const char *);
931 OGRErr ProcessSQLDropIndex(
const char *);
932 OGRErr ProcessSQLDropTable(
const char *);
933 OGRErr ProcessSQLAlterTableAddColumn(
const char *);
934 OGRErr ProcessSQLAlterTableDropColumn(
const char *);
935 OGRErr ProcessSQLAlterTableAlterColumn(
const char *);
936 OGRErr ProcessSQLAlterTableRenameColumn(
const char *);
940 friend class GDALProxyPoolDataset;
948 struct CPL_DLL GDALDatasetUniquePtrDeleter
963 std::unique_ptr<GDALDataset, GDALDatasetUniquePtrDeleter>;
975 friend class GDALAbstractBandBlockCache;
980 volatile int nLockCount;
997 CPL_INTERNAL
void Detach_unlocked(
void);
998 CPL_INTERNAL
void Touch_unlocked(
void);
1000 CPL_INTERNAL
void RecycleFor(
int nXOffIn,
int nYOffIn);
1007 CPLErr Internalize(
void);
1009 void MarkDirty(
void);
1010 void MarkClean(
void);
1014 return CPLAtomicInc(&nLockCount);
1019 return CPLAtomicDec(&nLockCount);
1079 return static_cast<GPtrDiff_t>(nXSize) * nYSize *
1084 int DropLockForRemovalFromStorage();
1093 static void FlushDirtyBlocks();
1094 static int FlushCacheBlock(
int bDirtyBlocksOnly = FALSE);
1095 static void Verify();
1097 static void EnterDisableDirtyBlockFlush();
1098 static void LeaveDisableDirtyBlockFlush();
1103 static void DumpAll();
1108 CPL_INTERNAL
static void DestroyRBMutex();
1125 std::vector<GDALColorEntry> aoEntries{};
1136 int GetColorEntryCount()
const;
1142 bool IsIdentity()
const;
1170 class GDALAbstractBandBlockCache
1173 CPLLock *hSpinLock =
nullptr;
1177 CPLCond *hCond =
nullptr;
1178 CPLMutex *hCondMutex =
nullptr;
1179 volatile int nKeepAliveCounter = 0;
1181 volatile int m_nDirtyBlocks = 0;
1188 int m_nInitialDirtyBlocksInFlushCache = 0;
1189 int m_nLastTick = -1;
1190 bool m_bWriteDirtyBlocks =
true;
1192 void FreeDanglingBlocks();
1193 void UnreferenceBlockBase();
1195 void StartDirtyBlockFlushingLog();
1196 void UpdateDirtyBlockFlushingLog();
1197 void EndDirtyBlockFlushingLog();
1201 virtual ~GDALAbstractBandBlockCache();
1205 void IncDirtyBlocks(
int nInc);
1206 void WaitCompletionPendingTasks();
1207 void DisableDirtyBlockWriting()
1209 m_bWriteDirtyBlocks =
false;
1211 bool HasDirtyBlocks()
const
1213 return m_nDirtyBlocks > 0;
1216 virtual bool Init() = 0;
1217 virtual bool IsInitOK() = 0;
1218 virtual CPLErr FlushCache() = 0;
1221 int nYBlockYOff) = 0;
1223 virtual CPLErr FlushBlock(
int nXBlockOff,
int nYBlockOff,
1224 int bWriteDirtyBlock) = 0;
1227 GDALAbstractBandBlockCache *
1229 GDALAbstractBandBlockCache *
1273 friend class GDALArrayBandBlockCache;
1274 friend class GDALHashSetBandBlockCache;
1278 CPLErr eFlushBlockErr = CE_None;
1279 GDALAbstractBandBlockCache *poBandBlockCache =
nullptr;
1281 CPL_INTERNAL
void SetFlushBlockErr(
CPLErr eErr);
1283 CPL_INTERNAL
void IncDirtyBlocks(
int nInc);
1290 int nRasterXSize = 0;
1291 int nRasterYSize = 0;
1297 int nBlockXSize = -1;
1298 int nBlockYSize = -1;
1299 int nBlocksPerRow = 0;
1300 int nBlocksPerColumn = 0;
1302 int nBlockReads = 0;
1303 int bForceCachedIO = 0;
1306 bool bOwnMask =
false;
1307 bool m_bEnablePixelTypeSignedByteWarning =
1311 void InvalidateMaskBand();
1313 friend class GDALProxyRasterBand;
1314 friend class GDALDefaultOverviews;
1317 RasterIOResampled(
GDALRWFlag,
int,
int,
int,
int,
void *,
int,
int,
1322 void LeaveReadWrite();
1329 virtual CPLErr IReadBlock(
int nBlockXOff,
int nBlockYOff,
void *pData) = 0;
1330 virtual CPLErr IWriteBlock(
int nBlockXOff,
int nBlockYOff,
void *pData);
1337 virtual int IGetDataCoverageStatus(
int nXOff,
int nYOff,
int nXSize,
1338 int nYSize,
int nMaskFlagStop,
1339 double *pdfDataPct);
1342 OverviewRasterIO(
GDALRWFlag,
int,
int,
int,
int,
void *,
int,
int,
1347 int nXSize,
int nYSize,
void *pData,
1348 int nBufXSize,
int nBufYSize,
1353 int InitBlockInfo();
1357 bool HasBlockCache()
const
1359 return poBandBlockCache !=
nullptr;
1362 bool HasDirtyBlocks()
const
1364 return poBandBlockCache && poBandBlockCache->HasDirtyBlocks();
1380 void GetBlockSize(
int *,
int *);
1381 CPLErr GetActualBlockSize(
int,
int,
int *,
int *);
1384 GetSuggestedBlockAccessPattern()
const;
1391 #ifndef DOXYGEN_SKIP
1392 OPTIONAL_OUTSIDE_GDAL(
nullptr)
1400 GetLockedBlockRef(
int nXBlockOff,
int nYBlockOff,
1402 GDALRasterBlock *TryGetLockedBlockRef(
int nXBlockOff,
int nYBlockYOff)
1404 CPLErr FlushBlock(
int,
int,
int bWriteDirtyBlock = TRUE);
1408 unsigned char *pTranslationTable =
nullptr,
1409 int *pApproximateMatching =
nullptr);
1413 virtual CPLErr FlushCache(
bool bAtClosing =
false);
1414 virtual char **GetCategoryNames();
1415 virtual double GetNoDataValue(
int *pbSuccess =
nullptr);
1416 virtual int64_t GetNoDataValueAsInt64(
int *pbSuccess =
nullptr);
1417 virtual uint64_t GetNoDataValueAsUInt64(
int *pbSuccess =
nullptr);
1418 virtual double GetMinimum(
int *pbSuccess =
nullptr);
1419 virtual double GetMaximum(
int *pbSuccess =
nullptr);
1420 virtual double GetOffset(
int *pbSuccess =
nullptr);
1421 virtual double GetScale(
int *pbSuccess =
nullptr);
1422 virtual const char *GetUnitType();
1425 virtual CPLErr Fill(
double dfRealValue,
double dfImaginaryValue = 0);
1427 virtual CPLErr SetCategoryNames(
char **papszNames);
1428 virtual CPLErr SetNoDataValue(
double dfNoData);
1429 virtual CPLErr SetNoDataValueAsInt64(int64_t nNoData);
1430 virtual CPLErr SetNoDataValueAsUInt64(uint64_t nNoData);
1431 virtual CPLErr DeleteNoDataValue();
1434 virtual CPLErr SetOffset(
double dfNewOffset);
1435 virtual CPLErr SetScale(
double dfNewScale);
1436 virtual CPLErr SetUnitType(
const char *pszNewValue);
1438 virtual CPLErr GetStatistics(
int bApproxOK,
int bForce,
double *pdfMin,
1439 double *pdfMax,
double *pdfMean,
1440 double *padfStdDev);
1441 virtual CPLErr ComputeStatistics(
int bApproxOK,
double *pdfMin,
1442 double *pdfMax,
double *pdfMean,
1443 double *pdfStdDev, GDALProgressFunc,
1444 void *pProgressData);
1445 virtual CPLErr SetStatistics(
double dfMin,
double dfMax,
double dfMean,
1447 virtual CPLErr ComputeRasterMinMax(
int,
double *);
1453 const char *pszDomain)
override;
1456 const char *pszDomain =
"")
override;
1458 virtual int HasArbitraryOverviews();
1459 virtual int GetOverviewCount();
1462 virtual CPLErr BuildOverviews(
const char *pszResampling,
int nOverviews,
1463 const int *panOverviewList,
1464 GDALProgressFunc pfnProgress,
1465 void *pProgressData,
1468 virtual CPLErr AdviseRead(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
1469 int nBufXSize,
int nBufYSize,
1472 virtual CPLErr GetHistogram(
double dfMin,
double dfMax,
int nBuckets,
1473 GUIntBig *panHistogram,
int bIncludeOutOfRange,
1474 int bApproxOK, GDALProgressFunc,
1475 void *pProgressData);
1477 virtual CPLErr GetDefaultHistogram(
double *pdfMin,
double *pdfMax,
1478 int *pnBuckets,
GUIntBig **ppanHistogram,
1479 int bForce, GDALProgressFunc,
1480 void *pProgressData);
1481 virtual CPLErr SetDefaultHistogram(
double dfMin,
double dfMax,
int nBuckets,
1488 virtual int GetMaskFlags();
1489 virtual CPLErr CreateMaskBand(
int nFlagsIn);
1490 virtual bool IsMaskBand()
const;
1494 GetVirtualMemAuto(
GDALRWFlag eRWFlag,
int *pnPixelSpace,
1498 int GetDataCoverageStatus(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
1499 int nMaskFlagStop = 0,
1500 double *pdfDataPct =
nullptr);
1502 std::shared_ptr<GDALMDArray> AsMDArray()
const;
1528 void EnablePixelTypeSignedByteWarning(
bool b)
1529 #ifndef GDAL_COMPILATION
1530 CPL_WARN_DEPRECATED(
"Do not use that method outside of GDAL!")
1554 ~GDALAllValidMaskBand()
override;
1569 double *pdfMean,
double *pdfStdDev,
1570 GDALProgressFunc,
void *pProgressData)
override;
1580 double m_dfNoDataValue = 0;
1581 int64_t m_nNoDataValueInt64 = 0;
1582 uint64_t m_nNoDataValueUInt64 = 0;
1595 explicit GDALNoDataMaskBand(
GDALRasterBand *,
double dfNoDataValue);
1596 ~GDALNoDataMaskBand()
override;
1607 static bool IsNoDataInRange(
double dfNoDataValue,
GDALDataType eDataType);
1616 double *padfNodataValues;
1625 ~GDALNoDataValuesMaskBand()
override;
1656 ~GDALRescaledAlphaBand()
override;
1707 const char *pszDomain =
"")
override;
1712 GDALDataset *Create(
const char *pszName,
int nXSize,
int nYSize,
int nBands,
1717 CreateMultiDimensional(
const char *pszName,
1721 CPLErr Delete(
const char *pszName);
1722 CPLErr Rename(
const char *pszNewName,
const char *pszOldName);
1723 CPLErr CopyFiles(
const char *pszNewName,
const char *pszOldName);
1727 GDALProgressFunc pfnProgress,
1730 bool CanVectorTranslateFrom(
const char *pszDestName,
1733 char ***ppapszFailureReasons);
1736 VectorTranslateFrom(
const char *pszDestName,
GDALDataset *poSourceDS,
1738 GDALProgressFunc pfnProgress,
1753 GDALDataset *(*pfnCreate)(
const char *pszName,
int nXSize,
int nYSize,
1755 char **papszOptions) =
nullptr;
1759 char **papszOptions) =
nullptr;
1762 const char *pszName,
CSLConstList papszRootGroupOptions,
1765 CPLErr (*pfnDelete)(
const char *pszName) =
nullptr;
1768 GDALProgressFunc pfnProgress,
1769 void *pProgressData) =
nullptr;
1771 void *pDriverData =
nullptr;
1773 void (*pfnUnloadDriver)(
GDALDriver *) =
nullptr;
1786 CPLErr (*pfnRename)(
const char *pszNewName,
1787 const char *pszOldName) =
nullptr;
1788 CPLErr (*pfnCopyFiles)(
const char *pszNewName,
1789 const char *pszOldName) =
nullptr;
1797 char **papszOptions) =
nullptr;
1798 CPLErr (*pfnDeleteDataSource)(
GDALDriver *,
const char *pszName) =
nullptr;
1804 bool (*pfnCanVectorTranslateFrom)(
1807 char ***ppapszFailureReasons) =
nullptr;
1816 GDALProgressFunc pfnProgress,
void *pProgressData) =
nullptr;
1833 GDALProgressFunc pfnProgress,
1836 static CPLErr DefaultCreateCopyMultiDimensional(
1839 void *pProgressData);
1845 GDALProgressFunc pfnProgress,
1846 void *pProgressData);
1848 static CPLErr QuietDelete(
const char *pszName,
1852 static CPLErr DefaultRename(
const char *pszNewName,
const char *pszOldName);
1853 static CPLErr DefaultCopyFiles(
const char *pszNewName,
1854 const char *pszOldName);
1895 std::map<CPLString, GDALDriver *> oMapNameToDrivers{};
1896 std::string m_osDriversIniPath{};
1900 return (iDriver >= 0 && iDriver < nDrivers) ? papoDrivers[iDriver]
1904 GDALDriver *GetDriverByName_unlocked(
const char *pszName)
const
1906 auto oIter = oMapNameToDrivers.find(
CPLString(pszName).toupper());
1907 return oIter == oMapNameToDrivers.end() ? nullptr : oIter->second;
1910 static char **GetSearchPaths(
const char *pszGDAL_DRIVER_PATH);
1912 static void CleanupPythonDrivers();
1920 int GetDriverCount(
void)
const;
1928 void AutoLoadDrivers();
1929 void AutoSkipDrivers();
1930 void ReorderDrivers();
1931 static CPLErr LoadPlugin(
const char *name);
1933 static void AutoLoadPythonDrivers();
2076 GetNextUpdatedRegion(
double dfTimeout,
int *pnBufXOff,
int *pnBufYOff,
2077 int *pnBufXSize,
int *pnBufYSize) = 0;
2078 virtual int LockBuffer(
double dfTimeout = -1.0);
2079 virtual void UnlockBuffer();
2114 Create(
const std::string &osName,
size_t nTotalSize,
2115 std::vector<std::unique_ptr<GDALEDTComponent>> &&components);
2117 CreateString(
size_t nMaxStringLength = 0,
2124 return !(operator==(other));
2152 return m_eNumericDT;
2173 return m_aoComponents;
2193 return m_nMaxStringLength;
2198 bool NeedsFreeDynamicMemory()
const;
2200 void FreeDynamicMemory(
void *pBuffer)
const;
2205 static bool CopyValues(
const void *pSrc,
2209 GPtrDiff_t nDstStrideInElts,
size_t nValues);
2216 const std::string &osName,
size_t nTotalSize,
2217 std::vector<std::unique_ptr<GDALEDTComponent>> &&components);
2219 std::string m_osName{};
2223 std::vector<std::unique_ptr<GDALEDTComponent>> m_aoComponents{};
2225 size_t m_nMaxStringLength = 0;
2275 std::string m_osName;
2292 std::shared_ptr<GDALAttribute>
2293 GetAttributeFromAttributes(
const std::string &osName)
const;
2298 virtual std::shared_ptr<GDALAttribute>
2299 GetAttribute(
const std::string &osName)
const;
2301 virtual std::vector<std::shared_ptr<GDALAttribute>>
2302 GetAttributes(
CSLConstList papszOptions =
nullptr)
const;
2304 virtual std::shared_ptr<GDALAttribute>
2305 CreateAttribute(
const std::string &osName,
2306 const std::vector<GUInt64> &anDimensions,
2310 virtual bool DeleteAttribute(
const std::string &osName,
2334 std::string m_osName{};
2337 std::string m_osFullName{};
2341 const std::string m_osContext{};
2343 std::weak_ptr<GDALGroup> m_pSelf{};
2346 bool m_bValid =
true;
2348 GDALGroup(
const std::string &osParentName,
const std::string &osName,
2349 const std::string &osContext = std::string());
2352 GetInnerMostGroup(
const std::string &osPathOrArrayOrDim,
2353 std::shared_ptr<GDALGroup> &curGroupHolder,
2354 std::string &osLastPart)
const;
2356 void BaseRename(
const std::string &osNewName);
2358 bool CheckValidAndErrorOutIfNot()
const;
2360 void SetSelf(
const std::shared_ptr<GDALGroup> &
self)
2365 virtual void NotifyChildrenOfRenaming()
2369 virtual void NotifyChildrenOfDeletion()
2392 return m_osFullName;
2395 virtual std::vector<std::string>
2396 GetMDArrayNames(
CSLConstList papszOptions =
nullptr)
const;
2397 virtual std::shared_ptr<GDALMDArray>
2398 OpenMDArray(
const std::string &osName,
2401 virtual std::vector<std::string>
2402 GetGroupNames(
CSLConstList papszOptions =
nullptr)
const;
2403 virtual std::shared_ptr<GDALGroup>
2404 OpenGroup(
const std::string &osName,
2407 virtual std::vector<std::string>
2408 GetVectorLayerNames(
CSLConstList papszOptions =
nullptr)
const;
2410 OpenVectorLayer(
const std::string &osName,
2413 virtual std::vector<std::shared_ptr<GDALDimension>>
2414 GetDimensions(
CSLConstList papszOptions =
nullptr)
const;
2416 virtual std::shared_ptr<GDALGroup>
2417 CreateGroup(
const std::string &osName,
CSLConstList papszOptions =
nullptr);
2419 virtual bool DeleteGroup(
const std::string &osName,
2422 virtual std::shared_ptr<GDALDimension>
2423 CreateDimension(
const std::string &osName,
const std::string &osType,
2424 const std::string &osDirection,
GUInt64 nSize,
2427 virtual std::shared_ptr<GDALMDArray> CreateMDArray(
2428 const std::string &osName,
2429 const std::vector<std::shared_ptr<GDALDimension>> &aoDimensions,
2433 virtual bool DeleteMDArray(
const std::string &osName,
2436 GUInt64 GetTotalCopyCost()
const;
2438 virtual bool CopyFrom(
const std::shared_ptr<GDALGroup> &poDstRootGroup,
2440 const std::shared_ptr<GDALGroup> &poSrcGroup,
2441 bool bStrict,
GUInt64 &nCurCost,
2443 GDALProgressFunc pfnProgress,
void *pProgressData,
2448 std::shared_ptr<GDALMDArray>
2449 OpenMDArrayFromFullname(
const std::string &osFullName,
2452 std::shared_ptr<GDALMDArray>
2453 ResolveMDArray(
const std::string &osName,
const std::string &osStartingPath,
2456 std::shared_ptr<GDALGroup>
2457 OpenGroupFromFullname(
const std::string &osFullName,
2460 std::shared_ptr<GDALDimension>
2461 OpenDimensionFromFullname(
const std::string &osFullName)
const;
2463 virtual void ClearStatistics();
2465 virtual bool Rename(
const std::string &osNewName);
2467 std::shared_ptr<GDALGroup>
2468 SubsetDimensionFromSelection(
const std::string &osSelection)
const;
2471 virtual void ParentRenamed(
const std::string &osNewParentFullName);
2473 virtual void Deleted();
2475 virtual void ParentDeleted();
2477 const std::string &GetContext()
const
2484 static constexpr
GUInt64 COPY_COST = 1000;
2501 std::string m_osName{};
2504 std::string m_osFullName{};
2505 std::weak_ptr<GDALAbstractMDArray> m_pSelf{};
2508 bool m_bValid =
true;
2511 const std::string &osName);
2513 void SetSelf(
const std::shared_ptr<GDALAbstractMDArray> &
self)
2518 bool CheckValidAndErrorOutIfNot()
const;
2520 bool CheckReadWriteParams(
const GUInt64 *arrayStartIdx,
const size_t *count,
2521 const GInt64 *&arrayStep,
2525 const void *buffer_alloc_start,
2526 size_t buffer_alloc_size,
2527 std::vector<GInt64> &tmp_arrayStep,
2528 std::vector<GPtrDiff_t> &tmp_bufferStride)
const;
2531 IRead(
const GUInt64 *arrayStartIdx,
2532 const size_t *count,
2536 void *pDstBuffer)
const = 0;
2539 IWrite(
const GUInt64 *arrayStartIdx,
2540 const size_t *count,
2545 void BaseRename(
const std::string &osNewName);
2547 virtual void NotifyChildrenOfRenaming()
2551 virtual void NotifyChildrenOfDeletion()
2576 return m_osFullName;
2579 GUInt64 GetTotalElementsCount()
const;
2581 virtual size_t GetDimensionCount()
const;
2583 virtual const std::vector<std::shared_ptr<GDALDimension>> &
2584 GetDimensions()
const = 0;
2588 virtual std::vector<GUInt64> GetBlockSize()
const;
2590 virtual std::vector<size_t>
2591 GetProcessingChunkSize(
size_t nMaxChunkMemory)
const;
2609 typedef bool (*FuncProcessPerChunkType)(
2611 const GUInt64 *chunkArrayStartIdx,
2612 const size_t *chunkCount,
2618 virtual bool ProcessPerChunk(
const GUInt64 *arrayStartIdx,
2619 const GUInt64 *count,
const size_t *chunkSize,
2620 FuncProcessPerChunkType pfnFunc,
2624 Read(
const GUInt64 *arrayStartIdx,
2625 const size_t *count,
2629 const void *pDstBufferAllocStart =
nullptr,
2630 size_t nDstBufferAllocSize = 0)
const;
2633 Write(
const GUInt64 *arrayStartIdx,
2634 const size_t *count,
2638 const void *pSrcBufferAllocStart =
nullptr,
2639 size_t nSrcBufferAllocSize = 0);
2641 virtual bool Rename(
const std::string &osNewName);
2644 virtual void Deleted();
2646 virtual void ParentDeleted();
2648 virtual void ParentRenamed(
const std::string &osNewParentFullName);
2727 mutable std::string m_osCachedVal{};
2731 GDALAttribute(
const std::string &osParentName,
const std::string &osName);
2735 std::vector<GUInt64> GetDimensionsSize()
const;
2738 const char *ReadAsString()
const;
2739 int ReadAsInt()
const;
2740 double ReadAsDouble()
const;
2742 std::vector<int> ReadAsIntArray()
const;
2743 std::vector<double> ReadAsDoubleArray()
const;
2746 bool Write(
const void *pabyValue,
size_t nLen);
2747 bool Write(
const char *);
2751 bool Write(
const double *,
size_t);
2754 static constexpr
GUInt64 COPY_COST = 100;
2763 class CPL_DLL GDALAttributeString final :
public GDALAttribute
2765 std::vector<std::shared_ptr<GDALDimension>> m_dims{};
2767 std::string m_osValue;
2772 void *pDstBuffer)
const override;
2775 GDALAttributeString(
const std::string &osParentName,
2776 const std::string &osName,
const std::string &osValue,
2779 const std::vector<std::shared_ptr<GDALDimension>> &
2791 class CPL_DLL GDALAttributeNumeric final :
public GDALAttribute
2793 std::vector<std::shared_ptr<GDALDimension>> m_dims{};
2796 double m_dfValue = 0;
2797 std::vector<GUInt32> m_anValuesUInt32{};
2802 void *pDstBuffer)
const override;
2805 GDALAttributeNumeric(
const std::string &osParentName,
2806 const std::string &osName,
double dfValue);
2807 GDALAttributeNumeric(
const std::string &osParentName,
2808 const std::string &osName,
int nValue);
2809 GDALAttributeNumeric(
const std::string &osParentName,
2810 const std::string &osName,
2811 const std::vector<GUInt32> &anValues);
2813 const std::vector<std::shared_ptr<GDALDimension>> &
2839 friend class GDALMDArrayResampled;
2840 std::shared_ptr<GDALMDArray>
2841 GetView(
const std::vector<GUInt64> &indices)
const;
2843 inline std::shared_ptr<GDALMDArray>
2844 atInternal(std::vector<GUInt64> &indices)
const
2846 return GetView(indices);
2849 template <
typename... GUInt64VarArg>
2851 inline std::shared_ptr<GDALMDArray>
2852 atInternal(std::vector<GUInt64> &indices,
GUInt64 idx,
2853 GUInt64VarArg... tail)
const
2855 indices.push_back(idx);
2856 return atInternal(indices, tail...);
2861 const std::string m_osContext{};
2863 mutable bool m_bHasTriedCachedArray =
false;
2864 mutable std::shared_ptr<GDALMDArray> m_poCachedArray{};
2868 GDALMDArray(
const std::string &osParentName,
const std::string &osName,
2869 const std::string &osContext = std::string());
2871 virtual bool IAdviseRead(
const GUInt64 *arrayStartIdx,
const size_t *count,
2874 virtual bool IsCacheable()
const
2879 virtual bool SetStatistics(
bool bApproxStats,
double dfMin,
double dfMax,
2880 double dfMean,
double dfStdDev,
2883 static std::string MassageName(
const std::string &inputName);
2885 std::shared_ptr<GDALGroup>
2886 GetCacheRootGroup(
bool bCanCreate, std::string &osCacheFilenameOut)
const;
2889 bool IsTransposedRequest(
const size_t *count,
2893 bool ReadForTransposedRequest(
const GUInt64 *arrayStartIdx,
2894 const size_t *count,
const GInt64 *arrayStep,
2897 void *pDstBuffer)
const;
2899 bool IsStepOneContiguousRowMajorOrderedSameDataType(
2900 const size_t *count,
const GInt64 *arrayStep,
2906 bool ReadUsingContiguousIRead(
const GUInt64 *arrayStartIdx,
2907 const size_t *count,
const GInt64 *arrayStep,
2910 void *pDstBuffer)
const;
2912 static std::shared_ptr<GDALMDArray>
2913 CreateGLTOrthorectified(
const std::shared_ptr<GDALMDArray> &poParent,
2914 const std::shared_ptr<GDALMDArray> &poGLTX,
2915 const std::shared_ptr<GDALMDArray> &poGLTY,
2916 int nGLTIndexOffset,
2917 const std::vector<double> &adfGeoTransform);
2922 GUInt64 GetTotalCopyCost()
const;
2925 bool bStrict,
GUInt64 &nCurCost,
2927 GDALProgressFunc pfnProgress,
void *pProgressData);
2930 virtual bool IsWritable()
const = 0;
2940 virtual const std::string &GetFilename()
const = 0;
2944 virtual const std::string &GetUnit()
const;
2946 virtual bool SetUnit(
const std::string &osUnit);
2950 virtual std::shared_ptr<OGRSpatialReference> GetSpatialRef()
const;
2952 virtual const void *GetRawNoDataValue()
const;
2954 double GetNoDataValueAsDouble(
bool *pbHasNoData =
nullptr)
const;
2956 int64_t GetNoDataValueAsInt64(
bool *pbHasNoData =
nullptr)
const;
2958 uint64_t GetNoDataValueAsUInt64(
bool *pbHasNoData =
nullptr)
const;
2960 virtual bool SetRawNoDataValue(
const void *pRawNoData);
2963 bool SetNoDataValue(
int nNoData)
2965 return SetNoDataValue(
static_cast<int64_t
>(nNoData));
2969 bool SetNoDataValue(
double dfNoData);
2971 bool SetNoDataValue(int64_t nNoData);
2973 bool SetNoDataValue(uint64_t nNoData);
2975 virtual bool Resize(
const std::vector<GUInt64> &anNewDimSizes,
2978 virtual double GetOffset(
bool *pbHasOffset =
nullptr,
2981 virtual double GetScale(
bool *pbHasScale =
nullptr,
2984 virtual bool SetOffset(
double dfOffset,
2987 virtual bool SetScale(
double dfScale,
2990 std::shared_ptr<GDALMDArray> GetView(
const std::string &viewExpr)
const;
2992 std::shared_ptr<GDALMDArray> operator[](
const std::string &fieldName)
const;
3005 template <
typename... GUInt64VarArg>
3008 std::shared_ptr<GDALMDArray>
at(
GUInt64 idx, GUInt64VarArg... tail)
const
3010 std::vector<GUInt64> indices;
3011 indices.push_back(idx);
3012 return atInternal(indices, tail...);
3015 virtual std::shared_ptr<GDALMDArray>
3016 Transpose(
const std::vector<int> &anMapNewAxisToOldAxis)
const;
3018 std::shared_ptr<GDALMDArray> GetUnscaled(
3019 double dfOverriddenScale = std::numeric_limits<double>::quiet_NaN(),
3020 double dfOverriddenOffset = std::numeric_limits<double>::quiet_NaN(),
3021 double dfOverriddenDstNodata =
3022 std::numeric_limits<double>::quiet_NaN())
const;
3024 virtual std::shared_ptr<GDALMDArray>
3027 virtual std::shared_ptr<GDALMDArray>
3028 GetResampled(
const std::vector<std::shared_ptr<GDALDimension>> &apoNewDims,
3033 std::shared_ptr<GDALMDArray>
3034 GetGridded(
const std::string &osGridOptions,
3035 const std::shared_ptr<GDALMDArray> &poXArray =
nullptr,
3036 const std::shared_ptr<GDALMDArray> &poYArray =
nullptr,
3040 AsClassicDataset(
size_t iXDim,
size_t iYDim,
3041 const std::shared_ptr<GDALGroup> &poRootGroup =
nullptr,
3044 virtual CPLErr GetStatistics(
bool bApproxOK,
bool bForce,
double *pdfMin,
3045 double *pdfMax,
double *pdfMean,
3046 double *padfStdDev,
GUInt64 *pnValidCount,
3047 GDALProgressFunc pfnProgress,
3048 void *pProgressData);
3050 virtual bool ComputeStatistics(
bool bApproxOK,
double *pdfMin,
3051 double *pdfMax,
double *pdfMean,
3052 double *pdfStdDev,
GUInt64 *pnValidCount,
3053 GDALProgressFunc,
void *pProgressData,
3056 virtual void ClearStatistics();
3058 virtual std::vector<std::shared_ptr<GDALMDArray>>
3059 GetCoordinateVariables()
const;
3061 bool AdviseRead(
const GUInt64 *arrayStartIdx,
const size_t *count,
3064 bool IsRegularlySpaced(
double &dfStart,
double &dfIncrement)
const;
3066 bool GuessGeoTransform(
size_t nDimX,
size_t nDimY,
bool bPixelIsPoint,
3067 double adfGeoTransform[6])
const;
3073 const size_t *count,
3077 const void *pDstBufferAllocStart =
nullptr,
3078 size_t nDstBufferAllocSize = 0) const override final;
3080 virtual std::shared_ptr<
GDALGroup> GetRootGroup() const;
3083 static constexpr
GUInt64 COPY_COST = 1000;
3085 bool CopyFromAllExceptValues(const
GDALMDArray *poSrcArray,
bool bStrict,
3087 GDALProgressFunc pfnProgress,
3088 void *pProgressData);
3094 : m_nStartIdx(nStartIdx), m_nIncr(nIncr)
3101 std::string m_osFieldName{};
3106 m_mapDimIdxToParentDimIdx{};
3111 virtual std::shared_ptr<GDALMDArray>
3112 GetView(
const std::string &viewExpr,
bool bRenameDimensions,
3113 std::vector<ViewSpec> &viewSpecs)
const;
3115 const std::string &GetContext()
const
3124 size_t iDimX,
size_t iDimY,
3125 const GUInt64 *arrayStartIdx,
const size_t *count,
3137 class CPL_DLL GDALMDArrayRegularlySpaced :
public GDALMDArray
3140 double m_dfIncrement;
3141 double m_dfOffsetInIncrement;
3143 std::vector<std::shared_ptr<GDALDimension>> m_dims;
3144 std::vector<std::shared_ptr<GDALAttribute>> m_attributes{};
3145 std::string m_osEmptyFilename{};
3150 void *pDstBuffer)
const override;
3153 GDALMDArrayRegularlySpaced(
const std::string &osParentName,
3154 const std::string &osName,
3155 const std::shared_ptr<GDALDimension> &poDim,
3156 double dfStart,
double dfIncrement,
3157 double dfOffsetInIncrement);
3159 static std::shared_ptr<GDALMDArrayRegularlySpaced>
3160 Create(
const std::string &osParentName,
const std::string &osName,
3161 const std::shared_ptr<GDALDimension> &poDim,
double dfStart,
3162 double dfIncrement,
double dfOffsetInIncrement);
3171 return m_osEmptyFilename;
3174 const std::vector<std::shared_ptr<GDALDimension>> &
3179 std::vector<std::shared_ptr<GDALAttribute>>
3182 void AddAttribute(
const std::shared_ptr<GDALAttribute> &poAttr);
3205 GDALDimension(
const std::string &osParentName,
const std::string &osName,
3206 const std::string &osType,
const std::string &osDirection,
3227 return m_osFullName;
3253 return m_osDirection;
3265 virtual std::shared_ptr<GDALMDArray> GetIndexingVariable()
const;
3268 SetIndexingVariable(std::shared_ptr<GDALMDArray> poIndexingVariable);
3270 virtual bool Rename(
const std::string &osNewName);
3273 virtual void ParentRenamed(
const std::string &osNewParentFullName);
3275 virtual void ParentDeleted();
3280 std::string m_osName;
3281 std::string m_osFullName;
3282 std::string m_osType;
3283 std::string m_osDirection;
3286 void BaseRename(
const std::string &osNewName);
3296 class CPL_DLL GDALDimensionWeakIndexingVar :
public GDALDimension
3298 std::weak_ptr<GDALMDArray> m_poIndexingVariable{};
3301 GDALDimensionWeakIndexingVar(
const std::string &osParentName,
3302 const std::string &osName,
3303 const std::string &osType,
3304 const std::string &osDirection,
GUInt64 nSize);
3309 std::shared_ptr<GDALMDArray> poIndexingVariable)
override;
3311 void SetSize(
GUInt64 nNewSize);
3320 struct GDALAntiRecursionStruct;
3321 class GDALAntiRecursionGuard
3323 GDALAntiRecursionStruct *m_psAntiRecursionStruct;
3324 std::string m_osIdentifier;
3327 GDALAntiRecursionGuard(
const GDALAntiRecursionGuard &) =
delete;
3328 GDALAntiRecursionGuard &operator=(
const GDALAntiRecursionGuard &) =
delete;
3331 explicit GDALAntiRecursionGuard(
const std::string &osIdentifier);
3332 GDALAntiRecursionGuard(
const GDALAntiRecursionGuard &other,
3333 const std::string &osIdentifier);
3334 ~GDALAntiRecursionGuard();
3335 int GetCallDepth()
const
3361 std::string m_osName{};
3362 std::string m_osLeftTableName{};
3363 std::string m_osRightTableName{};
3366 std::string m_osMappingTableName{};
3367 std::vector<std::string> m_osListLeftTableFields{};
3368 std::vector<std::string> m_osListRightTableFields{};
3369 std::vector<std::string> m_osListLeftMappingTableFields{};
3370 std::vector<std::string> m_osListRightMappingTableFields{};
3372 std::string m_osForwardPathLabel{};
3373 std::string m_osBackwardPathLabel{};
3374 std::string m_osRelatedTableType{};
3387 const std::string &osLeftTableName,
3388 const std::string &osRightTableName,
3391 : m_osName(osName), m_osLeftTableName(osLeftTableName),
3392 m_osRightTableName(osRightTableName), m_eCardinality(eCardinality)
3405 return m_eCardinality;
3414 return m_osLeftTableName;
3421 return m_osRightTableName;
3430 return m_osMappingTableName;
3439 m_osMappingTableName = osName;
3450 return m_osListLeftTableFields;
3461 return m_osListRightTableFields;
3472 m_osListLeftTableFields = osListFields;
3483 m_osListRightTableFields = osListFields;
3494 return m_osListLeftMappingTableFields;
3505 return m_osListRightMappingTableFields;
3516 m_osListLeftMappingTableFields = osListFields;
3528 m_osListRightMappingTableFields = osListFields;
3566 return m_osForwardPathLabel;
3586 m_osForwardPathLabel = osLabel;
3606 return m_osBackwardPathLabel;
3626 m_osBackwardPathLabel = osLabel;
3641 return m_osRelatedTableType;
3656 m_osRelatedTableType = osType;
3680 CPLErr CPL_DLL GDALRegenerateOverviewsMultiBand(
3683 const char *pszResampling, GDALProgressFunc pfnProgress,
3686 typedef CPLErr (*GDALResampleFunction)(
3687 double dfXRatioDstToSrc,
double dfYRatioDstToSrc,
double dfSrcXDelta,
3688 double dfSrcYDelta,
GDALDataType eWrkDataType,
const void *pChunk,
3689 const GByte *pabyChunkNodataMask,
int nChunkXOff,
int nChunkXSize,
3690 int nChunkYOff,
int nChunkYSize,
int nDstXOff,
int nDstXOff2,
int nDstYOff,
3692 GDALDataType *peDstBufferDataType,
const char *pszResampling,
3693 bool bHasNoData,
double dfNoDataValue,
GDALColorTable *poColorTable,
3696 GDALResampleFunction GDALGetResampleFunction(
const char *pszResampling,
3699 GDALDataType GDALGetOvrWorkDataType(
const char *pszResampling,
3705 HFAAuxBuildOverviews(
const char *pszOvrFilename,
GDALDataset *poParentDS,
3706 GDALDataset **ppoDS,
int nBands,
const int *panBandList,
3707 int nNewOverviews,
const int *panNewOverviewList,
3708 const char *pszResampling, GDALProgressFunc pfnProgress,
3711 CPLErr CPL_DLL GTIFFBuildOverviews(
const char *pszFilename,
int nBands,
3713 int nOverviews,
const int *panOverviewList,
3714 const char *pszResampling,
3715 GDALProgressFunc pfnProgress,
3716 void *pProgressData,
3719 int CPL_DLL GDALBandGetBestOverviewLevel(
GDALRasterBand *poBand,
int &nXOff,
3720 int &nYOff,
int &nXSize,
int &nYSize,
3721 int nBufXSize,
int nBufYSize)
3722 CPL_WARN_DEPRECATED(
"Use GDALBandGetBestOverviewLevel2 instead");
3723 int CPL_DLL GDALBandGetBestOverviewLevel2(
GDALRasterBand *poBand,
int &nXOff,
3724 int &nYOff,
int &nXSize,
int &nYSize,
3725 int nBufXSize,
int nBufYSize,
3728 int CPL_DLL GDALOvLevelAdjust(
int nOvLevel,
int nXSize)
3729 CPL_WARN_DEPRECATED(
"Use GDALOvLevelAdjust2 instead");
3730 int CPL_DLL GDALOvLevelAdjust2(
int nOvLevel,
int nXSize,
int nYSize);
3731 int CPL_DLL GDALComputeOvFactor(
int nOvrXSize,
int nRasterXSize,
int nOvrYSize,
3734 GDALDataset CPL_DLL *GDALFindAssociatedAuxFile(
const char *pszBasefile,
3742 int CPL_DLL GDALCheckDatasetDimensions(
int nXSize,
int nYSize);
3743 int CPL_DLL GDALCheckBandCount(
int nBands,
int bIsZeroAllowed);
3749 int CPL_DLL GDALReadWorldFile2(
const char *pszBaseFilename,
3750 const char *pszExtension,
3751 double *padfGeoTransform,
3752 char **papszSiblingFiles,
3753 char **ppszWorldFileNameOut);
3754 int GDALReadTabFile2(
const char *pszBaseFilename,
double *padfGeoTransform,
3755 char **ppszWKT,
int *pnGCPCount,
GDAL_GCP **ppasGCPs,
3756 char **papszSiblingFiles,
char **ppszTabFileNameOut);
3763 void GDALNullifyOpenDatasetsList();
3764 CPLMutex **GDALGetphDMMutex();
3765 CPLMutex **GDALGetphDLMutex();
3766 void GDALNullifyProxyPoolSingleton();
3767 void GDALSetResponsiblePIDForCurrentThread(
GIntBig responsiblePID);
3768 GIntBig GDALGetResponsiblePIDForCurrentThread();
3770 CPLString GDALFindAssociatedFile(
const char *pszBasename,
const char *pszExt,
3773 CPLErr CPL_DLL EXIFExtractMetadata(
char **&papszMetadata,
void *fpL,
3774 int nOffset,
int bSwabflag,
int nTIFFHEADER,
3775 int &nExifOffset,
int &nInterOffset,
3779 const char *
const *papszOptionOptions);
3780 int GDALValidateOptions(
const char *pszOptionList,
3781 const char *
const *papszOptionsToValidate,
3782 const char *pszErrorMessageOptionType,
3783 const char *pszErrorMessageContainerName);
3789 int nXSize,
int nYSize,
int nBufXSize,
3793 bool bThisLevelOnly);
3798 template <
class T>
inline bool ARE_REAL_EQUAL(T fVal1, T fVal2,
int ulp = 2)
3800 return fVal1 == fVal2 ||
3801 std::abs(fVal1 - fVal2) < std::numeric_limits<float>::epsilon() *
3802 std::abs(fVal1 + fVal2) * ulp;
3805 double GDALAdjustNoDataCloseToFloatMax(
double dfVal);
3807 #define DIV_ROUND_UP(a, b) (((a) % (b)) == 0 ? ((a) / (b)) : (((a) / (b)) + 1))
3811 #define GDALSTAT_APPROX_NUMSAMPLES 2500
3816 void GDALDeserializeGCPListFromXML(
CPLXMLNode *psGCPList,
3817 GDAL_GCP **ppasGCPList,
int *pnGCPCount,
3820 void GDALSerializeOpenOptionsToXML(
CPLXMLNode *psParentNode,
3821 char **papszOpenOptions);
3822 char **GDALDeserializeOpenOptionsFromXML(
CPLXMLNode *psParentNode);
3824 int GDALCanFileAcceptSidecarFile(
const char *pszFilename);
3826 bool GDALCanReliablyUseSiblingFileList(
const char *pszFilename);
3828 bool CPL_DLL GDALIsDriverDeprecatedForGDAL39StillEnabled(
3829 const char *pszDriverName,
const char *pszExtraMsg =
"");
3836 } GDALBufferSampleFormat;
3838 bool CPL_DLL GDALBufferHasOnlyNoData(
const void *pBuffer,
double dfNoDataValue,
3839 size_t nWidth,
size_t nHeight,
3840 size_t nLineStride,
size_t nComponents,
3842 GDALBufferSampleFormat nSampleFormat);
3847 double CPL_DLL GDALGetNoDataValueCastToDouble(int64_t nVal);
3848 double CPL_DLL GDALGetNoDataValueCastToDouble(uint64_t nVal);
3853 void CPL_DLL GDALEnablePixelTypeSignedByteWarning(
GDALRasterBandH hBand,
3856 std::string CPL_DLL GDALGetCompressionFormatForJPEG(
VSILFILE *fp);
3857 std::string CPL_DLL GDALGetCompressionFormatForJPEG(
const void *pBuffer,
3858 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:1678
void SetRelatedTableType(const std::string &osType)
Sets the type string of the related table.
Definition: gdal_priv.h:3654
const std::string & GetFullName() const
Return the full name.
Definition: gdal_priv.h:3225
#define CPL_PRINT_FUNC_FORMAT(format_idx, arg_idx)
Tag a function to have printf() formatting.
Definition: cpl_port.h:950
@ GDAL_IDENTIFY_FALSE
Identify determined the file is not recognized by the probed driver.
Definition: gdal_priv.h:1680
VSILFILE * fpL
Pointer to the file.
Definition: gdal_priv.h:304
size_t GetSize() const
Return data type size in bytes.
Definition: gdal_priv.h:2182
virtual bool SetIndexingVariable(std::shared_ptr< GDALMDArray > poIndexingVariable)
Set the variable that is used to index the dimension.
Definition: gdalmultidim.cpp:10163
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:2390
virtual GDALMaskValueRange GetMaskValueRange() const
Returns the range of values that a mask band can take.
Definition: gdalrasterband.cpp:7569
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:196
int GetYOffset() const
Return y offset.
Definition: gdal_priv.h:1993
Class used to represent potentially complex data types.
Definition: gdal_priv.h:2102
int GetYSize() const
Return the height of the block.
Definition: gdal_priv.h:1056
std::input_iterator_tag iterator_category
iterator_category
Definition: gdal_priv.h:774
GUIntBig GUInt64
Unsigned 64 bit integer type.
Definition: cpl_port.h:249
Class for dataset open functions.
Definition: gdal_priv.h:277
Layer iterator.
Definition: gdal_priv.h:763
virtual CPLErr ComputeStatistics(int bApproxOK, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev, GDALProgressFunc, void *pProgressData)
Compute image statistics.
Definition: gdalrasterband.cpp:5612
int GetPixelSpace() const
Return pixel spacing.
Definition: gdal_priv.h:2056
const std::string & GetFullName() const
Return the name of an array or attribute.
Definition: gdal_priv.h:2574
GPtrDiff_t GetBlockSize() const
Return the block size in bytes.
Definition: gdal_priv.h:1077
Class for a component of a compound extended data type.
Definition: gdal_priv.h:2237
constexpr GDALSuggestedBlockAccessPattern GSBAP_RANDOM
Random access to blocks is efficient.
Definition: gdal_priv.h:1256
int GetBandCount() const
Return band count.
Definition: gdal_priv.h:2042
virtual bool IsMaskBand() const
Returns whether a band is a mask band.
Definition: gdalrasterband.cpp:7518
constexpr GDALSuggestedBlockAccessPattern GSBAP_UNKNOWN
Unknown, or no particular read order is suggested.
Definition: gdal_priv.h:1253
const std::string & GetLeftTableName() const
Get the name of the left (or base/origin) table in the relationship.
Definition: gdal_priv.h:3412
OGRLayer::FeatureIterator begin(OGRLayer *poLayer)
Return begin of feature iterator.
Definition: ogrsf_frmts.h:411
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:3467
void difference_type
difference_type
Definition: gdal_priv.h:771
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:3584
@ 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:1949
@ GDT_Unknown
Definition: gdal.h:65
const char *const * papszAllowedDrivers
Allowed drivers (NULL for all)
Definition: gdal_priv.h:312
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:3386
@ GMVR_0_AND_255_ONLY
Definition: gdal_priv.h:1246
GDALExtendedDataTypeClass GetClass() const
Return type class.
Definition: gdal_priv.h:2140
@ GRT_ASSOCIATION
Association relationship.
Definition: gdal.h:1989
const std::string & GetRightTableName() const
Get the name of the right (or related/destination) table in the relationship.
Definition: gdal_priv.h:3419
int GetBufferYSize() const
Return buffer height.
Definition: gdal_priv.h:2028
Format specific driver.
Definition: gdal_priv.h:1700
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:2497
Class returned by GetBands() that act as a container for raster bands.
Definition: gdal_priv.h:499
std::shared_ptr< GDALMDArray > at(GUInt64 idx, GUInt64VarArg... tail) const
Return a view of the array using integer indexing.
Definition: gdal_priv.h:3008
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:2063
void * GetDataRef(void)
Return the data buffer.
Definition: gdal_priv.h:1070
int nOpenFlags
Open flags.
Definition: gdal_priv.h:296
char ** papszOpenOptions
Open options.
Definition: gdal_priv.h:291
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:1809
const std::string & GetName() const
Return the name.
Definition: gdal_priv.h:3216
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:73
Convenient string class based on std::string.
Definition: cpl_string.h:311
A single raster band (or channel).
Definition: gdal_priv.h:1270
GIntBig GInt64
Signed 64 bit integer type.
Definition: cpl_port.h:247
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:3459
GDALIdentifyEnum
Enumeration used by GDALDriver::pfnIdentify().
Definition: gdal_priv.h:1674
int GetBandSpace() const
Return band spacing.
Definition: gdal_priv.h:2070
@ GMVR_0_AND_1_ONLY
Definition: gdal_priv.h:1245
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:269
int GPtrDiff_t
Integer type large enough to hold the difference between 2 addresses.
Definition: cpl_port.h:267
const std::string & GetDirection() const
Return the axis direction.
Definition: gdal_priv.h:3251
void SetType(GDALRelationshipType eType)
Sets the type of the relationship.
Definition: gdal_priv.h:3544
CPLErr GDALClose(GDALDatasetH)
Close GDAL dataset.
Definition: gdaldataset.cpp:3882
GDALDataType GetBufferType() const
Return buffer data type.
Definition: gdal_priv.h:2035
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:1241
const GByte * data() const
Return pointer to the start of data.
Definition: gdal_priv.h:2692
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:1301
static GDALRelationship * FromHandle(GDALRelationshipH hRelationship)
Convert a GDALRelationshipH to a GDALRelationship*.
Definition: gdal_priv.h:3668
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:2564
A single raster block in the block cache.
Definition: gdal_priv.h:973
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:2662
Class modeling a named container of GDALAttribute, GDALMDArray, OGRLayer or other GDALGroup.
Definition: gdal_priv.h:2330
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:348
char ** GetOpenOptions()
Return open options.
Definition: gdal_priv.h:647
static GDALMajorObject * FromHandle(GDALMajorObjectH hMajorObject)
Convert a GDALMajorObjectH to a GDALMajorObject*.
Definition: gdal_priv.h:182
size_t size() const
Return the size in bytes of the raw result.
Definition: gdal_priv.h:2697
Interface used to get a single GDALAttribute or a set of GDALAttribute.
Definition: gdal_priv.h:2289
Definition of a table relationship.
Definition: gdal_priv.h:3357
int bStatOK
Whether stat()'ing the file was successful.
Definition: gdal_priv.h:299
GDALRelationshipType GetType() const
Get the type of the relationship.
Definition: gdal_priv.h:3535
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:306
Class for managing the registration of file format drivers.
Definition: gdal_priv.h:1891
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:3564
Class modeling a multi-dimensional array.
Definition: gdal_priv.h:2836
GByte * pabyHeader
Buffer with first bytes of the file.
Definition: gdal_priv.h:309
int GetYSize() const
Return height.
Definition: gdal_priv.h:2007
GDALAccess eAccess
Access flag.
Definition: gdal_priv.h:294
virtual GDALRasterBand * GetMaskBand()
Return the mask band associated with the band.
Definition: gdalrasterband.cpp:7052
GDALDataType GetNumericDataType() const
Return numeric data type (only valid when GetClass() == GEDTC_NUMERIC)
Definition: gdal_priv.h:2150
static GDALExtendedDataType CreateString(size_t nMaxStringLength=0, GDALExtendedDataTypeSubType eSubType=GEDTST_NONE)
Return a new GDALExtendedDataType of class GEDTC_STRING.
Definition: gdalmultidim.cpp:9891
@ GRC_ONE_TO_MANY
One-to-many.
Definition: gdal.h:1973
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1178
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:229
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:703
@ GDT_Float64
Definition: gdal.h:75
GDALExtendedDataTypeSubType GetSubType() const
Return subtype.
Definition: gdal_priv.h:2161
int DropLock(void)
Decrement the lock count.
Definition: gdal_priv.h:1017
const std::string & GetBackwardPathLabel() const
Get the label of the backward path for the relationship.
Definition: gdal_priv.h:3604
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:3448
int bIsDirectory
Whether the file is a directory.
Definition: gdal_priv.h:301
const std::string & GetType() const
Return the axis type.
Definition: gdal_priv.h:3238
Ground Control Point.
Definition: gdal.h:1051
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:310
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:3201
@ 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:3624
GDALRelationshipCardinality GetCardinality() const
Get the cardinality of the relationship.
Definition: gdal_priv.h:3403
#define CPL_NULL_TERMINATED
Null terminated variadic.
Definition: cpl_port.h:938
constexpr GDALSuggestedBlockAccessPattern GSBAP_BOTTOM_TO_TOP
Reading by strips from bottom to top is the most efficient.
Definition: gdal_priv.h:1262
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:2171
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:1266
Object returned by GetFeatures() iterators.
Definition: gdal_priv.h:715
GDALDataset * GetGDALDataset()
Return dataset.
Definition: gdal_priv.h:1979
static GDALDatasetH ToHandle(GDALDataset *poDS)
Convert a GDALDataset* to a GDALDatasetH.
Definition: gdal_priv.h:687
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:3481
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:2132
Virtual file handle.
Definition: cpl_vsi_virtual.h:62
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:4272
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:1277
static GDALColorTableH ToHandle(GDALColorTable *poCT)
Convert a GDALColorTable* to a GDALRasterBandH.
Definition: gdal_priv.h:1147
int AddLock(void)
Increment the lock count.
Definition: gdal_priv.h:1012
virtual CPLErr CreateMaskBand(int nFlagsIn)
Adds a mask band to the dataset.
Definition: gdaldataset.cpp:3238
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:3470
Definition of a field domain.
Definition: ogr_feature.h:1355
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:2122
GUInt64 GetSize() const
Return the size, that is the number of values along the dimension.
Definition: gdal_priv.h:3260
GDALAccess
Definition: gdal.h:124
OGRLayer::FeatureIterator end(OGRLayer *poLayer)
Return end of feature iterator.
Definition: ogrsf_frmts.h:419
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:2260
static GDALDriver * FromHandle(GDALDriverH hDriver)
Convert a GDALDriverH to a GDALDriver*.
Definition: gdal_priv.h:1871
const GByte & operator[](size_t idx) const
Return byte at specified index.
Definition: gdal_priv.h:2687
@ GDAL_IDENTIFY_TRUE
Identify determined the file is recognized by the probed driver.
Definition: gdal_priv.h:1682
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:3428
@ 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:10142
int GetXSize() const
Return width.
Definition: gdal_priv.h:2000
int GetDirty() const
Return the dirty flag.
Definition: gdal_priv.h:1063
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:226
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:3492
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:3503
void pointer
pointer
Definition: gdal_priv.h:772
int GetBufferXSize() const
Return buffer width.
Definition: gdal_priv.h:2021
int nHeaderBytes
Number of bytes in pabyHeader.
Definition: gdal_priv.h:307
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:1863
void static GDALRasterBandH ToHandle(GDALRasterBand *poBand)
Convert a GDALRasterBand* to a GDALRasterBandH.
Definition: gdal_priv.h:1512
int GetYOff() const
Return the y offset of the top-left corner of the block.
Definition: gdal_priv.h:1042
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition: cpl_port.h:976
GDALAccess GetAccess() const
Return access mode.
Definition: gdal_priv.h:634
void SetMappingTableName(const std::string &osName)
Sets the name of the mapping table for many-to-many relationships.
Definition: gdal_priv.h:3437
A simple feature, including geometry and attributes.
Definition: ogr_feature.h:680
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:3397
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:3514
Class returned by GetFeatures() that act as a container for vector features.
Definition: gdal_priv.h:817
static GDALRelationshipH ToHandle(GDALRelationship *poRelationship)
Convert a GDALRelationship* to a GDALRelationshipH.
Definition: gdal_priv.h:3661
int GDALSuggestedBlockAccessPattern
Suggested/most efficient access pattern to blocks.
Definition: gdal_priv.h:1250
CPLErr BuildOverviews(const char *, int, const int *, int, const int *, GDALProgressFunc, void *, CSLConstList papszOptions)
Build raster overview(s)
Definition: gdaldataset.cpp:2017
Object with metadata.
Definition: gdal_priv.h:138
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:2235
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:207
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:2725
const GDALExtendedDataType & GetType() const
Return the data type of the component.
Definition: gdal_priv.h:2269
char * pszFilename
Filename.
Definition: gdal_priv.h:289
static GDALColorTable * FromHandle(GDALColorTableH hCT)
Convert a GDALColorTableH to a GDALColorTable*.
Definition: gdal_priv.h:1155
@ 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:963
virtual int GetMaskFlags()
Return the status flags of the mask band associated with the band.
Definition: gdalrasterband.cpp:7377
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:1986
size_t GetMaxStringLength() const
Return the maximum length of a string in bytes.
Definition: gdal_priv.h:2191
GDALRelationshipCardinality
Cardinality of relationship.
Definition: gdal.h:1968
GDALRasterBand * GetBand()
Accessor to source GDALRasterBand object.
Definition: gdal_priv.h:1088
Class returned by GetLayers() that acts as a range of layers.
Definition: gdal_priv.h:750
int GetXOff() const
Return the x offset of the top-left corner of the block.
Definition: gdal_priv.h:1035
GDALDataType GetDataType() const
Return the data type.
Definition: gdal_priv.h:1028
static GDALDataset * FromHandle(GDALDatasetH hDS)
Convert a GDALDatasetH to a GDALDataset*.
Definition: gdal_priv.h:695
GDALPaletteInterp
Definition: gdal.h:252
static GDALExtendedDataType Create(GDALDataType eType)
Return a new GDALExtendedDataType of class GEDTC_NUMERIC.
Definition: gdalmultidim.cpp:9826
The GDALSubdatasetInfo abstract class provides methods to extract and manipulate subdataset informati...
Definition: gdalsubdatasetinfo.h:41
static GDALMajorObjectH ToHandle(GDALMajorObject *poMajorObject)
Convert a GDALMajorObject* to a GDALMajorObjectH.
Definition: gdal_priv.h:174
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:2381
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:3526
@ wkbUnknown
unknown type, non-standard
Definition: ogr_core.h:408
void * GetBuffer()
Return buffer.
Definition: gdal_priv.h:2014
const std::string & GetName() const
Return type name.
Definition: gdal_priv.h:2131
#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:1042
const std::string & GetName() const
Return the name.
Definition: gdal_priv.h:2251
int GetXSize() const
Return the width of the block.
Definition: gdal_priv.h:1049
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:1520
A color table / palette.
Definition: gdal_priv.h:1121
int * GetBandMap()
Return band map.
Definition: gdal_priv.h:2049
constexpr GDALSuggestedBlockAccessPattern GSBAP_TOP_TO_BOTTOM
Reading by strips from top to bottom is the most efficient.
Definition: gdal_priv.h:1259
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:3639
GDALRelationshipType
Type of relationship.
Definition: gdal.h:1984