32#ifndef GDAL_PRIV_H_INCLUDED
33#define GDAL_PRIV_H_INCLUDED
50class GDALProxyDataset;
51class 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
97class 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 =
"");
192class 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);
229 int CloseDependentDatasets();
233 int GetOverviewCount(
int nBand);
236 CPLErr BuildOverviews(
const char *pszBasename,
const char *pszResampling,
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,
254 CPLErr CreateMaskBand(
int nFlags,
int nBand = -1);
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;
331class swq_select_parse_options;
335typedef 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;
381 bool bForceCachedIO =
false;
382 bool bShared =
false;
383 bool bIsInternal =
true;
384 bool bSuppressOnClose =
false;
386 mutable std::map<std::string, std::unique_ptr<OGRFieldDomain>>
387 m_oMapFieldDomains{};
392 void RasterInitialize(
int,
int);
395 GDALDefaultOverviews oOvManager{};
397 virtual CPLErr IBuildOverviews(
const char *,
int,
const int *,
int,
398 const int *, GDALProgressFunc,
void *,
407 BlockBasedRasterIO(
GDALRWFlag,
int,
int,
int,
int,
void *,
int,
int,
410 void BlockBasedFlushCache(
bool bAtClosing);
413 BandBasedRasterIO(
GDALRWFlag eRWFlag,
int nXOff,
int nYOff,
int nXSize,
414 int nYSize,
void *pData,
int nBufXSize,
int nBufYSize,
421 RasterIOResampled(
GDALRWFlag eRWFlag,
int nXOff,
int nYOff,
int nXSize,
422 int nYSize,
void *pData,
int nBufXSize,
int nBufYSize,
428 CPLErr ValidateRasterIOOrAdviseReadParameters(
429 const char *pszCallingFunc,
int *pbStopProcessingOnCENone,
int nXOff,
430 int nYOff,
int nXSize,
int nYSize,
int nBufXSize,
int nBufYSize,
431 int nBandCount,
int *panBandMap);
434 int nXSize,
int nYSize,
void *pData,
435 int nBufXSize,
int nBufYSize,
437 int *panBandMap,
GSpacing nPixelSpace,
441 void ShareLockWithParentDataset(
GDALDataset *poParentDataset);
445 void CleanupPostFileClosing();
447 virtual int CloseDependentDatasets();
449 int ValidateLayerCreationOptions(
const char *
const *papszLCO);
451 char **papszOpenOptions =
nullptr;
458 void LeaveReadWrite();
461 void TemporarilyDropReadWriteLock();
462 void ReacquireReadWriteLock();
464 void DisableReadWriteMutex();
473 int GetRasterXSize();
474 int GetRasterYSize();
475 int GetRasterCount();
489 class CPL_DLL Iterator
492 std::unique_ptr<Private> m_poPrivate;
496 Iterator(
const Iterator &oOther);
498 Iterator(Iterator &&oOther)
noexcept;
502 Iterator &operator++();
503 bool operator!=(
const Iterator &it)
const;
507 const Iterator
begin()
const;
509 const Iterator
end()
const;
519 virtual void FlushCache(
bool bAtClosing =
false);
525 const char *GetProjectionRef(
void)
const;
526 CPLErr SetProjection(
const char *pszProjection);
528 virtual CPLErr GetGeoTransform(
double *padfTransform);
529 virtual CPLErr SetGeoTransform(
double *padfTransform);
533 virtual void *GetInternalHandle(
const char *pszHandleName);
535 virtual char **GetFileList(
void);
537 virtual const char *GetDriverName();
540 virtual int GetGCPCount();
546 const char *GetGCPProjection();
548 const char *pszGCPProjection);
550 virtual CPLErr AdviseRead(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
552 int nBandCount,
int *panBandList,
553 char **papszOptions);
555 virtual CPLErr CreateMaskBand(
int nFlagsIn);
558 BeginAsyncReader(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
void *pBuf,
560 int nBandCount,
int *panBandMap,
int nPixelSpace,
561 int nLineSpace,
int nBandSpace,
char **papszOptions);
565 struct RawBinaryLayout
567 enum class Interleaving
574 std::string osRawFilename{};
575 Interleaving eInterleaving = Interleaving::UNKNOWN;
577 bool bLittleEndianOrder =
false;
585 virtual bool GetRawBinaryLayout(RawBinaryLayout &);
592 OPTIONAL_OUTSIDE_GDAL(
nullptr)
608 int GetShared()
const;
611 void MarkSuppressOnClose();
618 return papszOpenOptions;
621 static GDALDataset **GetOpenDatasets(
int *pnDatasetCount);
623 CPLErr BuildOverviews(
const char *,
int,
const int *,
int,
const int *,
624 GDALProgressFunc,
void *,
627 OPTIONAL_OUTSIDE_GDAL(
nullptr)
635 static
void ReportError(const
char *pszDSName,
CPLErr eErrClass,
640 char **GetMetadata(
const char *pszDomain =
"")
override;
646 const char *pszDomain)
override;
649 char **GetMetadataDomainList()
override;
651 virtual void ClearStatistics();
673 unsigned int nOpenFlags = 0,
674 const char *
const *papszAllowedDrivers =
nullptr,
675 const char *
const *papszOpenOptions =
nullptr,
676 const char *
const *papszSiblingFiles =
nullptr)
678 return FromHandle(
GDALOpenEx(pszFilename, nOpenFlags,
679 papszAllowedDrivers, papszOpenOptions,
695 void SetEnableOverviews(
bool bEnable);
698 bool AreOverviewsEnabled()
const;
703 Private *m_poPrivate;
705 CPL_INTERNAL
OGRLayer *BuildLayerFromSelectInfo(
706 swq_select *psSelectInfo,
OGRGeometry *poSpatialFilter,
707 const char *pszDialect, swq_select_parse_options *poSelectParseOptions);
711 virtual int GetLayerCount();
712 virtual OGRLayer *GetLayer(
int iLayer);
714 virtual bool IsLayerPrivate(
int iLayer)
const;
735 std::unique_ptr<Private> m_poPrivate;
743 std::input_iterator_tag;
769 OGRLayer *operator[](
size_t iLayer);
770 OGRLayer *operator[](
const char *pszLayername);
775 virtual OGRLayer *GetLayerByName(
const char *);
776 virtual OGRErr DeleteLayer(
int iLayer);
778 virtual void ResetReading();
780 double *pdfProgressPct,
781 GDALProgressFunc pfnProgress,
782 void *pProgressData);
795 class CPL_DLL Iterator
798 std::unique_ptr<Private> m_poPrivate;
802 Iterator(
const Iterator &oOther);
804 Iterator(Iterator &&oOther)
noexcept;
808 Iterator &operator++();
809 bool operator!=(
const Iterator &it)
const;
813 const Iterator
begin()
const;
815 const Iterator
end()
const;
820 virtual int TestCapability(
const char *);
822 virtual std::vector<std::string>
823 GetFieldDomainNames(
CSLConstList papszOptions =
nullptr)
const;
825 virtual const OGRFieldDomain *GetFieldDomain(
const std::string &name)
const;
827 virtual bool AddFieldDomain(std::unique_ptr<OGRFieldDomain> &&domain,
828 std::string &failureReason);
830 virtual bool DeleteFieldDomain(
const std::string &name,
831 std::string &failureReason);
833 virtual bool UpdateFieldDomain(std::unique_ptr<OGRFieldDomain> &&domain,
834 std::string &failureReason);
836 virtual std::vector<std::string>
837 GetRelationshipNames(
CSLConstList papszOptions =
nullptr)
const;
840 GetRelationship(
const std::string &name)
const;
843 AddRelationship(std::unique_ptr<GDALRelationship> &&relationship,
844 std::string &failureReason);
846 virtual bool DeleteRelationship(
const std::string &name,
847 std::string &failureReason);
850 UpdateRelationship(std::unique_ptr<GDALRelationship> &&relationship,
851 std::string &failureReason);
853 virtual OGRLayer *CreateLayer(
const char *pszName,
856 char **papszOptions =
nullptr);
858 char **papszOptions =
nullptr);
861 virtual void SetStyleTableDirectly(
OGRStyleTable *poStyleTable);
865 virtual OGRLayer *ExecuteSQL(
const char *pszStatement,
867 const char *pszDialect);
868 virtual void ReleaseResultSet(
OGRLayer *poResultsSet);
869 virtual OGRErr AbortSQL();
871 int GetRefCount()
const;
872 int GetSummaryRefCount()
const;
875 virtual OGRErr StartTransaction(
int bForce = FALSE);
876 virtual OGRErr CommitTransaction();
877 virtual OGRErr RollbackTransaction();
879 virtual std::shared_ptr<GDALGroup> GetRootGroup()
const;
882 static int IsGenericSQLDialect(
const char *pszDialect);
886 BuildParseInfo(swq_select *psSelectInfo,
887 swq_select_parse_options *poSelectParseOptions);
888 static void DestroyParseInfo(GDALSQLParseInfo *psParseInfo);
890 const char *pszDialect,
891 swq_select_parse_options *poSelectParseOptions);
895 virtual OGRLayer *ICreateLayer(
const char *pszName,
898 char **papszOptions =
nullptr);
901 OGRErr ProcessSQLCreateIndex(
const char *);
902 OGRErr ProcessSQLDropIndex(
const char *);
903 OGRErr ProcessSQLDropTable(
const char *);
904 OGRErr ProcessSQLAlterTableAddColumn(
const char *);
905 OGRErr ProcessSQLAlterTableDropColumn(
const char *);
906 OGRErr ProcessSQLAlterTableAlterColumn(
const char *);
907 OGRErr ProcessSQLAlterTableRenameColumn(
const char *);
911 friend class GDALProxyPoolDataset;
919struct CPL_DLL GDALDatasetUniquePtrDeleter
934 std::unique_ptr<GDALDataset, GDALDatasetUniquePtrDeleter>;
946 friend class GDALAbstractBandBlockCache;
951 volatile int nLockCount;
968 CPL_INTERNAL
void Detach_unlocked(
void);
969 CPL_INTERNAL
void Touch_unlocked(
void);
971 CPL_INTERNAL
void RecycleFor(
int nXOffIn,
int nYOffIn);
980 void MarkDirty(
void);
981 void MarkClean(
void);
985 return CPLAtomicInc(&nLockCount);
990 return CPLAtomicDec(&nLockCount);
1050 return static_cast<GPtrDiff_t>(nXSize) * nYSize *
1055 int DropLockForRemovalFromStorage();
1064 static void FlushDirtyBlocks();
1065 static int FlushCacheBlock(
int bDirtyBlocksOnly = FALSE);
1066 static void Verify();
1068 static void EnterDisableDirtyBlockFlush();
1069 static void LeaveDisableDirtyBlockFlush();
1074 static void DumpAll();
1079 CPL_INTERNAL
static void DestroyRBMutex();
1096 std::vector<GDALColorEntry> aoEntries{};
1107 int GetColorEntryCount()
const;
1113 bool IsIdentity()
const;
1141class GDALAbstractBandBlockCache
1144 CPLLock *hSpinLock =
nullptr;
1148 CPLCond *hCond =
nullptr;
1149 CPLMutex *hCondMutex =
nullptr;
1150 volatile int nKeepAliveCounter = 0;
1152 volatile int m_nDirtyBlocks = 0;
1159 int m_nInitialDirtyBlocksInFlushCache = 0;
1160 int m_nLastTick = -1;
1161 bool m_bWriteDirtyBlocks =
true;
1163 void FreeDanglingBlocks();
1164 void UnreferenceBlockBase();
1166 void StartDirtyBlockFlushingLog();
1167 void UpdateDirtyBlockFlushingLog();
1168 void EndDirtyBlockFlushingLog();
1172 virtual ~GDALAbstractBandBlockCache();
1176 void IncDirtyBlocks(
int nInc);
1177 void WaitCompletionPendingTasks();
1178 void DisableDirtyBlockWriting()
1180 m_bWriteDirtyBlocks =
false;
1183 virtual bool Init() = 0;
1184 virtual bool IsInitOK() = 0;
1185 virtual CPLErr FlushCache() = 0;
1188 int nYBlockYOff) = 0;
1190 virtual CPLErr FlushBlock(
int nXBlockOff,
int nYBlockOff,
1191 int bWriteDirtyBlock) = 0;
1194GDALAbstractBandBlockCache *
1196GDALAbstractBandBlockCache *
1240 friend class GDALArrayBandBlockCache;
1241 friend class GDALHashSetBandBlockCache;
1245 CPLErr eFlushBlockErr = CE_None;
1246 GDALAbstractBandBlockCache *poBandBlockCache =
nullptr;
1248 CPL_INTERNAL
void SetFlushBlockErr(
CPLErr eErr);
1250 CPL_INTERNAL
void IncDirtyBlocks(
int nInc);
1257 int nRasterXSize = 0;
1258 int nRasterYSize = 0;
1264 int nBlockXSize = -1;
1265 int nBlockYSize = -1;
1266 int nBlocksPerRow = 0;
1267 int nBlocksPerColumn = 0;
1269 int nBlockReads = 0;
1270 int bForceCachedIO = 0;
1273 bool bOwnMask =
false;
1276 void InvalidateMaskBand();
1278 friend class GDALProxyRasterBand;
1279 friend class GDALDefaultOverviews;
1282 RasterIOResampled(
GDALRWFlag,
int,
int,
int,
int,
void *,
int,
int,
1287 void LeaveReadWrite();
1294 virtual CPLErr IWriteBlock(
int nBlockXOff,
int nBlockYOff,
void *pData);
1301 virtual int IGetDataCoverageStatus(
int nXOff,
int nYOff,
int nXSize,
1302 int nYSize,
int nMaskFlagStop,
1303 double *pdfDataPct);
1306 OverviewRasterIO(
GDALRWFlag,
int,
int,
int,
int,
void *,
int,
int,
1311 int nXSize,
int nYSize,
void *pData,
1312 int nBufXSize,
int nBufYSize,
1317 int InitBlockInfo();
1334 void GetBlockSize(
int *,
int *);
1335 CPLErr GetActualBlockSize(
int,
int,
int *,
int *);
1338 GetSuggestedBlockAccessPattern()
const;
1346 OPTIONAL_OUTSIDE_GDAL(
nullptr)
1354 GetLockedBlockRef(
int nXBlockOff,
int nYBlockOff,
1356 GDALRasterBlock *TryGetLockedBlockRef(
int nXBlockOff,
int nYBlockYOff)
1358 CPLErr FlushBlock(
int,
int,
int bWriteDirtyBlock = TRUE);
1362 unsigned char *pTranslationTable =
nullptr,
1363 int *pApproximateMatching =
nullptr);
1367 virtual CPLErr FlushCache(
bool bAtClosing =
false);
1368 virtual char **GetCategoryNames();
1369 virtual double GetNoDataValue(
int *pbSuccess =
nullptr);
1370 virtual int64_t GetNoDataValueAsInt64(
int *pbSuccess =
nullptr);
1371 virtual uint64_t GetNoDataValueAsUInt64(
int *pbSuccess =
nullptr);
1372 virtual double GetMinimum(
int *pbSuccess =
nullptr);
1373 virtual double GetMaximum(
int *pbSuccess =
nullptr);
1374 virtual double GetOffset(
int *pbSuccess =
nullptr);
1375 virtual double GetScale(
int *pbSuccess =
nullptr);
1376 virtual const char *GetUnitType();
1379 virtual CPLErr Fill(
double dfRealValue,
double dfImaginaryValue = 0);
1381 virtual CPLErr SetCategoryNames(
char **papszNames);
1382 virtual CPLErr SetNoDataValue(
double dfNoData);
1383 virtual CPLErr SetNoDataValueAsInt64(int64_t nNoData);
1384 virtual CPLErr SetNoDataValueAsUInt64(uint64_t nNoData);
1385 virtual CPLErr DeleteNoDataValue();
1388 virtual CPLErr SetOffset(
double dfNewOffset);
1389 virtual CPLErr SetScale(
double dfNewScale);
1390 virtual CPLErr SetUnitType(
const char *pszNewValue);
1392 virtual CPLErr GetStatistics(
int bApproxOK,
int bForce,
double *pdfMin,
1393 double *pdfMax,
double *pdfMean,
1394 double *padfStdDev);
1395 virtual CPLErr ComputeStatistics(
int bApproxOK,
double *pdfMin,
1396 double *pdfMax,
double *pdfMean,
1397 double *pdfStdDev, GDALProgressFunc,
1398 void *pProgressData);
1399 virtual CPLErr SetStatistics(
double dfMin,
double dfMax,
double dfMean,
1401 virtual CPLErr ComputeRasterMinMax(
int,
double *);
1407 const char *pszDomain)
override;
1410 virtual int HasArbitraryOverviews();
1411 virtual int GetOverviewCount();
1414 virtual CPLErr BuildOverviews(
const char *pszResampling,
int nOverviews,
1415 const int *panOverviewList,
1416 GDALProgressFunc pfnProgress,
1417 void *pProgressData,
1420 virtual CPLErr AdviseRead(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
1421 int nBufXSize,
int nBufYSize,
1424 virtual CPLErr GetHistogram(
double dfMin,
double dfMax,
int nBuckets,
1425 GUIntBig *panHistogram,
int bIncludeOutOfRange,
1426 int bApproxOK, GDALProgressFunc,
1427 void *pProgressData);
1429 virtual CPLErr GetDefaultHistogram(
double *pdfMin,
double *pdfMax,
1430 int *pnBuckets,
GUIntBig **ppanHistogram,
1431 int bForce, GDALProgressFunc,
1432 void *pProgressData);
1433 virtual CPLErr SetDefaultHistogram(
double dfMin,
double dfMax,
int nBuckets,
1440 virtual int GetMaskFlags();
1441 virtual CPLErr CreateMaskBand(
int nFlagsIn);
1442 virtual bool IsMaskBand()
const;
1446 GetVirtualMemAuto(
GDALRWFlag eRWFlag,
int *pnPixelSpace,
1450 int GetDataCoverageStatus(
int nXOff,
int nYOff,
int nXSize,
int nYSize,
1451 int nMaskFlagStop = 0,
1452 double *pdfDataPct =
nullptr);
1454 std::shared_ptr<GDALMDArray> AsMDArray()
const;
1489 CPLErr IReadBlock(
int,
int,
void *)
override;
1495 ~GDALAllValidMaskBand()
override;
1498 int GetMaskFlags()
override;
1500 bool IsMaskBand()
const override
1509 CPLErr ComputeStatistics(
int bApproxOK,
double *pdfMin,
double *pdfMax,
1510 double *pdfMean,
double *pdfStdDev,
1511 GDALProgressFunc,
void *pProgressData)
override;
1521 double dfNoDataValue = 0;
1522 int64_t nNoDataValueInt64 = 0;
1523 uint64_t nNoDataValueUInt64 = 0;
1529 CPLErr IReadBlock(
int,
int,
void *)
override;
1536 ~GDALNoDataMaskBand()
override;
1538 bool IsMaskBand()
const override
1547 static bool IsNoDataInRange(
double dfNoDataValue,
GDALDataType eDataType);
1556 double *padfNodataValues;
1561 CPLErr IReadBlock(
int,
int,
void *)
override;
1565 ~GDALNoDataValuesMaskBand()
override;
1567 bool IsMaskBand()
const override
1596 ~GDALRescaledAlphaBand()
override;
1646 CPLErr SetMetadataItem(
const char *pszName,
const char *pszValue,
1647 const char *pszDomain =
"")
override;
1652 GDALDataset *Create(
const char *pszName,
int nXSize,
int nYSize,
int nBands,
1657 CreateMultiDimensional(
const char *pszName,
1661 CPLErr Delete(
const char *pszName);
1662 CPLErr Rename(
const char *pszNewName,
const char *pszOldName);
1663 CPLErr CopyFiles(
const char *pszNewName,
const char *pszOldName);
1667 GDALProgressFunc pfnProgress,
1678 GDALDataset *(*pfnCreate)(
const char *pszName,
int nXSize,
int nYSize,
1680 char **papszOptions);
1684 char **papszOptions);
1687 const char *pszName,
CSLConstList papszRootGroupOptions,
1690 CPLErr (*pfnDelete)(
const char *pszName);
1693 GDALProgressFunc pfnProgress,
1694 void *pProgressData);
1711 CPLErr (*pfnRename)(
const char *pszNewName,
const char *pszOldName);
1712 CPLErr (*pfnCopyFiles)(
const char *pszNewName,
const char *pszOldName);
1719 char **papszOptions);
1729 GDALProgressFunc pfnProgress,
1732 static CPLErr DefaultCreateCopyMultiDimensional(
1735 void *pProgressData);
1741 GDALProgressFunc pfnProgress,
1742 void *pProgressData);
1744 static CPLErr QuietDelete(
const char *pszName,
1748 static CPLErr DefaultRename(
const char *pszNewName,
const char *pszOldName);
1749 static CPLErr DefaultCopyFiles(
const char *pszNewName,
1750 const char *pszOldName);
1788 std::map<CPLString, GDALDriver *> oMapNameToDrivers{};
1789 std::string m_osDriversIniPath{};
1793 return (iDriver >= 0 && iDriver < nDrivers) ? papoDrivers[iDriver]
1797 GDALDriver *GetDriverByName_unlocked(
const char *pszName)
const
1799 auto oIter = oMapNameToDrivers.find(
CPLString(pszName).toupper());
1800 return oIter == oMapNameToDrivers.end() ? nullptr : oIter->second;
1803 static char **GetSearchPaths(
const char *pszGDAL_DRIVER_PATH);
1805 static void CleanupPythonDrivers();
1813 int GetDriverCount(
void)
const;
1821 void AutoLoadDrivers();
1822 void AutoSkipDrivers();
1823 void ReorderDrivers();
1825 static void AutoLoadPythonDrivers();
1969 int *pnBufXSize,
int *pnBufYSize) = 0;
1970 virtual int LockBuffer(
double dfTimeout = -1.0);
1971 virtual void UnlockBuffer();
2005 Create(
const std::string &osName,
size_t nTotalSize,
2006 std::vector<std::unique_ptr<GDALEDTComponent>> &&components);
2008 CreateString(
size_t nMaxStringLength = 0,
2015 return !(operator==(other));
2043 return m_eNumericDT;
2064 return m_aoComponents;
2084 return m_nMaxStringLength;
2089 bool NeedsFreeDynamicMemory()
const;
2091 void FreeDynamicMemory(
void *pBuffer)
const;
2096 static bool CopyValues(
const void *pSrc,
2100 GPtrDiff_t nDstStrideInElts,
size_t nValues);
2107 const std::string &osName,
size_t nTotalSize,
2108 std::vector<std::unique_ptr<GDALEDTComponent>> &&components);
2110 std::string m_osName{};
2114 std::vector<std::unique_ptr<GDALEDTComponent>> m_aoComponents{};
2116 size_t m_nMaxStringLength = 0;
2166 std::string m_osName;
2183 std::shared_ptr<GDALAttribute>
2184 GetAttributeFromAttributes(
const std::string &osName)
const;
2189 virtual std::shared_ptr<GDALAttribute>
2190 GetAttribute(
const std::string &osName)
const;
2192 virtual std::vector<std::shared_ptr<GDALAttribute>>
2193 GetAttributes(
CSLConstList papszOptions =
nullptr)
const;
2195 virtual std::shared_ptr<GDALAttribute>
2196 CreateAttribute(
const std::string &osName,
2197 const std::vector<GUInt64> &anDimensions,
2222 std::string m_osName{};
2223 std::string m_osFullName{};
2225 GDALGroup(
const std::string &osParentName,
const std::string &osName);
2228 GetInnerMostGroup(
const std::string &osPathOrArrayOrDim,
2229 std::shared_ptr<GDALGroup> &curGroupHolder,
2230 std::string &osLastPart)
const;
2251 return m_osFullName;
2254 virtual std::vector<std::string>
2255 GetMDArrayNames(
CSLConstList papszOptions =
nullptr)
const;
2256 virtual std::shared_ptr<GDALMDArray>
2257 OpenMDArray(
const std::string &osName,
2260 virtual std::vector<std::string>
2261 GetGroupNames(
CSLConstList papszOptions =
nullptr)
const;
2262 virtual std::shared_ptr<GDALGroup>
2263 OpenGroup(
const std::string &osName,
2266 virtual std::vector<std::string>
2267 GetVectorLayerNames(
CSLConstList papszOptions =
nullptr)
const;
2269 OpenVectorLayer(
const std::string &osName,
2272 virtual std::vector<std::shared_ptr<GDALDimension>>
2273 GetDimensions(
CSLConstList papszOptions =
nullptr)
const;
2275 virtual std::shared_ptr<GDALGroup>
2276 CreateGroup(
const std::string &osName,
CSLConstList papszOptions =
nullptr);
2278 virtual std::shared_ptr<GDALDimension>
2279 CreateDimension(
const std::string &osName,
const std::string &osType,
2280 const std::string &osDirection,
GUInt64 nSize,
2283 virtual std::shared_ptr<GDALMDArray> CreateMDArray(
2284 const std::string &osName,
2285 const std::vector<std::shared_ptr<GDALDimension>> &aoDimensions,
2289 GUInt64 GetTotalCopyCost()
const;
2291 virtual bool CopyFrom(
const std::shared_ptr<GDALGroup> &poDstRootGroup,
2293 const std::shared_ptr<GDALGroup> &poSrcGroup,
2294 bool bStrict,
GUInt64 &nCurCost,
2296 GDALProgressFunc pfnProgress,
void *pProgressData,
2301 std::shared_ptr<GDALMDArray>
2302 OpenMDArrayFromFullname(
const std::string &osFullName,
2305 std::shared_ptr<GDALMDArray>
2306 ResolveMDArray(
const std::string &osName,
const std::string &osStartingPath,
2309 std::shared_ptr<GDALGroup>
2310 OpenGroupFromFullname(
const std::string &osFullName,
2313 std::shared_ptr<GDALDimension>
2314 OpenDimensionFromFullname(
const std::string &osFullName)
const;
2316 virtual void ClearStatistics();
2319 static constexpr GUInt64 COPY_COST = 1000;
2336 std::string m_osName{};
2337 std::string m_osFullName{};
2338 std::weak_ptr<GDALAbstractMDArray> m_pSelf{};
2341 const std::string &osName);
2343 void SetSelf(std::weak_ptr<GDALAbstractMDArray> self)
2348 bool CheckReadWriteParams(
const GUInt64 *arrayStartIdx,
const size_t *count,
2349 const GInt64 *&arrayStep,
2353 const void *buffer_alloc_start,
2354 size_t buffer_alloc_size,
2355 std::vector<GInt64> &tmp_arrayStep,
2356 std::vector<GPtrDiff_t> &tmp_bufferStride)
const;
2359 IRead(
const GUInt64 *arrayStartIdx,
2360 const size_t *count,
2364 void *pDstBuffer)
const = 0;
2367 IWrite(
const GUInt64 *arrayStartIdx,
2368 const size_t *count,
2394 return m_osFullName;
2397 GUInt64 GetTotalElementsCount()
const;
2399 virtual size_t GetDimensionCount()
const;
2401 virtual const std::vector<std::shared_ptr<GDALDimension>> &
2406 virtual std::vector<GUInt64> GetBlockSize()
const;
2408 virtual std::vector<size_t>
2409 GetProcessingChunkSize(
size_t nMaxChunkMemory)
const;
2427 typedef bool (*FuncProcessPerChunkType)(
2429 const GUInt64 *chunkArrayStartIdx,
2430 const size_t *chunkCount,
2436 virtual bool ProcessPerChunk(
const GUInt64 *arrayStartIdx,
2437 const GUInt64 *count,
const size_t *chunkSize,
2438 FuncProcessPerChunkType pfnFunc,
2442 Read(
const GUInt64 *arrayStartIdx,
2443 const size_t *count,
2447 const void *pDstBufferAllocStart =
nullptr,
2448 size_t nDstBufferAllocSize = 0)
const;
2451 Write(
const GUInt64 *arrayStartIdx,
2452 const size_t *count,
2456 const void *pSrcBufferAllocStart =
nullptr,
2457 size_t nSrcBufferAllocSize = 0);
2535 mutable std::string m_osCachedVal{};
2539 GDALAttribute(
const std::string &osParentName,
const std::string &osName);
2543 std::vector<GUInt64> GetDimensionsSize()
const;
2546 const char *ReadAsString()
const;
2547 int ReadAsInt()
const;
2548 double ReadAsDouble()
const;
2550 std::vector<int> ReadAsIntArray()
const;
2551 std::vector<double> ReadAsDoubleArray()
const;
2554 bool Write(
const void *pabyValue,
size_t nLen);
2555 bool Write(
const char *);
2559 bool Write(
const double *,
size_t);
2562 static constexpr GUInt64 COPY_COST = 100;
2571class CPL_DLL GDALAttributeString final :
public GDALAttribute
2573 std::vector<std::shared_ptr<GDALDimension>> m_dims{};
2575 std::string m_osValue;
2580 void *pDstBuffer)
const override;
2583 GDALAttributeString(
const std::string &osParentName,
2584 const std::string &osName,
const std::string &osValue,
2587 const std::vector<std::shared_ptr<GDALDimension>> &
2588 GetDimensions()
const override;
2599class CPL_DLL GDALAttributeNumeric final :
public GDALAttribute
2601 std::vector<std::shared_ptr<GDALDimension>> m_dims{};
2604 double m_dfValue = 0;
2605 std::vector<GUInt32> m_anValuesUInt32{};
2610 void *pDstBuffer)
const override;
2613 GDALAttributeNumeric(
const std::string &osParentName,
2614 const std::string &osName,
double dfValue);
2615 GDALAttributeNumeric(
const std::string &osParentName,
2616 const std::string &osName,
int nValue);
2617 GDALAttributeNumeric(
const std::string &osParentName,
2618 const std::string &osName,
2619 const std::vector<GUInt32> &anValues);
2621 const std::vector<std::shared_ptr<GDALDimension>> &
2622 GetDimensions()
const override;
2647 friend class GDALMDArrayResampled;
2648 std::shared_ptr<GDALMDArray>
2649 GetView(
const std::vector<GUInt64> &indices)
const;
2651 inline std::shared_ptr<GDALMDArray>
2652 atInternal(std::vector<GUInt64> &indices)
const
2654 return GetView(indices);
2657 template <
typename... GUInt64VarArg>
2659 inline std::shared_ptr<GDALMDArray>
2660 atInternal(std::vector<GUInt64> &indices,
GUInt64 idx,
2661 GUInt64VarArg... tail)
const
2663 indices.push_back(idx);
2664 return atInternal(indices, tail...);
2667 mutable bool m_bHasTriedCachedArray =
false;
2668 mutable std::shared_ptr<GDALMDArray> m_poCachedArray{};
2672 GDALMDArray(
const std::string &osParentName,
const std::string &osName);
2674 virtual bool IAdviseRead(
const GUInt64 *arrayStartIdx,
const size_t *count,
2677 virtual bool IsCacheable()
const
2682 virtual bool SetStatistics(
bool bApproxStats,
double dfMin,
double dfMax,
2683 double dfMean,
double dfStdDev,
2686 static std::string MassageName(
const std::string &inputName);
2688 std::shared_ptr<GDALGroup>
2689 GetCacheRootGroup(
bool bCanCreate, std::string &osCacheFilenameOut)
const;
2692 bool IsTransposedRequest(
const size_t *count,
2696 bool ReadForTransposedRequest(
const GUInt64 *arrayStartIdx,
2697 const size_t *count,
const GInt64 *arrayStep,
2700 void *pDstBuffer)
const;
2704 GUInt64 GetTotalCopyCost()
const;
2707 bool bStrict,
GUInt64 &nCurCost,
2709 GDALProgressFunc pfnProgress,
void *pProgressData);
2726 virtual const std::string &GetUnit()
const;
2728 virtual bool SetUnit(
const std::string &osUnit);
2732 virtual std::shared_ptr<OGRSpatialReference> GetSpatialRef()
const;
2734 virtual const void *GetRawNoDataValue()
const;
2736 double GetNoDataValueAsDouble(
bool *pbHasNoData =
nullptr)
const;
2738 int64_t GetNoDataValueAsInt64(
bool *pbHasNoData =
nullptr)
const;
2740 uint64_t GetNoDataValueAsUInt64(
bool *pbHasNoData =
nullptr)
const;
2742 virtual bool SetRawNoDataValue(
const void *pRawNoData);
2745 bool SetNoDataValue(
int nNoData)
2747 return SetNoDataValue(
static_cast<int64_t
>(nNoData));
2751 bool SetNoDataValue(
double dfNoData);
2753 bool SetNoDataValue(int64_t nNoData);
2755 bool SetNoDataValue(uint64_t nNoData);
2757 virtual double GetOffset(
bool *pbHasOffset =
nullptr,
2760 virtual double GetScale(
bool *pbHasScale =
nullptr,
2763 virtual bool SetOffset(
double dfOffset,
2766 virtual bool SetScale(
double dfScale,
2769 std::shared_ptr<GDALMDArray> GetView(
const std::string &viewExpr)
const;
2771 std::shared_ptr<GDALMDArray> operator[](
const std::string &fieldName)
const;
2784 template <
typename... GUInt64VarArg>
2787 std::shared_ptr<GDALMDArray>
at(
GUInt64 idx, GUInt64VarArg... tail)
const
2789 std::vector<GUInt64> indices;
2790 indices.push_back(idx);
2791 return atInternal(indices, tail...);
2794 virtual std::shared_ptr<GDALMDArray>
2795 Transpose(
const std::vector<int> &anMapNewAxisToOldAxis)
const;
2797 std::shared_ptr<GDALMDArray> GetUnscaled()
const;
2799 virtual std::shared_ptr<GDALMDArray>
2802 std::shared_ptr<GDALMDArray>
2803 GetResampled(
const std::vector<std::shared_ptr<GDALDimension>> &apoNewDims,
2808 virtual GDALDataset *AsClassicDataset(
size_t iXDim,
size_t iYDim)
const;
2810 virtual CPLErr GetStatistics(
bool bApproxOK,
bool bForce,
double *pdfMin,
2811 double *pdfMax,
double *pdfMean,
2812 double *padfStdDev,
GUInt64 *pnValidCount,
2813 GDALProgressFunc pfnProgress,
2814 void *pProgressData);
2816 virtual bool ComputeStatistics(
bool bApproxOK,
double *pdfMin,
2817 double *pdfMax,
double *pdfMean,
2818 double *pdfStdDev,
GUInt64 *pnValidCount,
2819 GDALProgressFunc,
void *pProgressData);
2821 virtual void ClearStatistics();
2823 virtual std::vector<std::shared_ptr<GDALMDArray>>
2824 GetCoordinateVariables()
const;
2826 bool AdviseRead(
const GUInt64 *arrayStartIdx,
const size_t *count,
2829 bool IsRegularlySpaced(
double &dfStart,
double &dfIncrement)
const;
2831 bool GuessGeoTransform(
size_t nDimX,
size_t nDimY,
bool bPixelIsPoint,
2832 double adfGeoTransform[6])
const;
2837 Read(
const GUInt64 *arrayStartIdx,
2838 const size_t *count,
2842 const void *pDstBufferAllocStart =
nullptr,
2843 size_t nDstBufferAllocSize = 0) const override final;
2846 static constexpr
GUInt64 COPY_COST = 1000;
2848 bool CopyFromAllExceptValues(const
GDALMDArray *poSrcArray,
bool bStrict,
2850 GDALProgressFunc pfnProgress,
2851 void *pProgressData);
2857 : m_nStartIdx(nStartIdx), m_nIncr(nIncr)
2864 std::string m_osFieldName{};
2869 m_mapDimIdxToParentDimIdx{};
2874 virtual std::shared_ptr<GDALMDArray>
2875 GetView(
const std::string &viewExpr,
bool bRenameDimensions,
2876 std::vector<ViewSpec> &viewSpecs)
const;
2882 size_t iDimX,
size_t iDimY,
2883 const GUInt64 *arrayStartIdx,
const size_t *count,
2895class CPL_DLL GDALMDArrayRegularlySpaced :
public GDALMDArray
2898 double m_dfIncrement;
2899 double m_dfOffsetInIncrement;
2901 std::vector<std::shared_ptr<GDALDimension>> m_dims;
2902 std::vector<std::shared_ptr<GDALAttribute>> m_attributes{};
2903 std::string m_osEmptyFilename{};
2908 void *pDstBuffer)
const override;
2911 GDALMDArrayRegularlySpaced(
const std::string &osParentName,
2912 const std::string &osName,
2913 const std::shared_ptr<GDALDimension> &poDim,
2914 double dfStart,
double dfIncrement,
2915 double dfOffsetInIncrement);
2917 static std::shared_ptr<GDALMDArrayRegularlySpaced>
2918 Create(
const std::string &osParentName,
const std::string &osName,
2919 const std::shared_ptr<GDALDimension> &poDim,
double dfStart,
2920 double dfIncrement,
double dfOffsetInIncrement);
2922 bool IsWritable()
const override
2927 const std::string &GetFilename()
const override
2929 return m_osEmptyFilename;
2932 const std::vector<std::shared_ptr<GDALDimension>> &
2933 GetDimensions()
const override;
2937 std::vector<std::shared_ptr<GDALAttribute>>
2940 void AddAttribute(
const std::shared_ptr<GDALAttribute> &poAttr);
2963 GDALDimension(
const std::string &osParentName,
const std::string &osName,
2964 const std::string &osType,
const std::string &osDirection,
2985 return m_osFullName;
3011 return m_osDirection;
3023 virtual std::shared_ptr<GDALMDArray> GetIndexingVariable()
const;
3026 SetIndexingVariable(std::shared_ptr<GDALMDArray> poIndexingVariable);
3030 std::string m_osName;
3031 std::string m_osFullName;
3032 std::string m_osType;
3033 std::string m_osDirection;
3043class CPL_DLL GDALDimensionWeakIndexingVar :
public GDALDimension
3045 std::weak_ptr<GDALMDArray> m_poIndexingVariable{};
3048 GDALDimensionWeakIndexingVar(
const std::string &osParentName,
3049 const std::string &osName,
3050 const std::string &osType,
3051 const std::string &osDirection,
GUInt64 nSize);
3053 std::shared_ptr<GDALMDArray> GetIndexingVariable()
const override;
3055 bool SetIndexingVariable(
3056 std::shared_ptr<GDALMDArray> poIndexingVariable)
override;
3065struct GDALAntiRecursionStruct;
3066class GDALAntiRecursionGuard
3068 GDALAntiRecursionStruct *m_psAntiRecursionStruct;
3069 std::string m_osIdentifier;
3072 GDALAntiRecursionGuard(
const GDALAntiRecursionGuard &) =
delete;
3073 GDALAntiRecursionGuard &operator=(
const GDALAntiRecursionGuard &) =
delete;
3076 explicit GDALAntiRecursionGuard(
const std::string &osIdentifier);
3077 GDALAntiRecursionGuard(
const GDALAntiRecursionGuard &other,
3078 const std::string &osIdentifier);
3079 ~GDALAntiRecursionGuard();
3080 int GetCallDepth()
const
3106 std::string m_osName{};
3107 std::string m_osLeftTableName{};
3108 std::string m_osRightTableName{};
3111 std::string m_osMappingTableName{};
3112 std::vector<std::string> m_osListLeftTableFields{};
3113 std::vector<std::string> m_osListRightTableFields{};
3114 std::vector<std::string> m_osListLeftMappingTableFields{};
3115 std::vector<std::string> m_osListRightMappingTableFields{};
3117 std::string m_osForwardPathLabel{};
3118 std::string m_osBackwardPathLabel{};
3119 std::string m_osRelatedTableType{};
3132 const std::string &osLeftTableName,
3133 const std::string &osRightTableName,
3136 : m_osName(osName), m_osLeftTableName(osLeftTableName),
3137 m_osRightTableName(osRightTableName), m_eCardinality(eCardinality)
3150 return m_eCardinality;
3159 return m_osLeftTableName;
3166 return m_osRightTableName;
3175 return m_osMappingTableName;
3184 m_osMappingTableName = osName;
3195 return m_osListLeftTableFields;
3206 return m_osListRightTableFields;
3217 m_osListLeftTableFields = osListFields;
3228 m_osListRightTableFields = osListFields;
3239 return m_osListLeftMappingTableFields;
3250 return m_osListRightMappingTableFields;
3261 m_osListLeftMappingTableFields = osListFields;
3273 m_osListRightMappingTableFields = osListFields;
3311 return m_osForwardPathLabel;
3331 m_osForwardPathLabel = osLabel;
3351 return m_osBackwardPathLabel;
3371 m_osBackwardPathLabel = osLabel;
3386 return m_osRelatedTableType;
3401 m_osRelatedTableType = osType;
3425CPLErr CPL_DLL GDALRegenerateOverviewsMultiBand(
3428 const char *pszResampling, GDALProgressFunc pfnProgress,
3431typedef CPLErr (*GDALResampleFunction)(
3432 double dfXRatioDstToSrc,
double dfYRatioDstToSrc,
double dfSrcXDelta,
3433 double dfSrcYDelta,
GDALDataType eWrkDataType,
const void *pChunk,
3434 const GByte *pabyChunkNodataMask,
int nChunkXOff,
int nChunkXSize,
3435 int nChunkYOff,
int nChunkYSize,
int nDstXOff,
int nDstXOff2,
int nDstYOff,
3437 GDALDataType *peDstBufferDataType,
const char *pszResampling,
3438 int bHasNoData,
float fNoDataValue,
GDALColorTable *poColorTable,
3441GDALResampleFunction GDALGetResampleFunction(
const char *pszResampling,
3444GDALDataType GDALGetOvrWorkDataType(
const char *pszResampling,
3450HFAAuxBuildOverviews(
const char *pszOvrFilename,
GDALDataset *poParentDS,
3451 GDALDataset **ppoDS,
int nBands,
const int *panBandList,
3452 int nNewOverviews,
const int *panNewOverviewList,
3453 const char *pszResampling, GDALProgressFunc pfnProgress,
3456CPLErr CPL_DLL GTIFFBuildOverviews(
const char *pszFilename,
int nBands,
3458 int nOverviews,
const int *panOverviewList,
3459 const char *pszResampling,
3460 GDALProgressFunc pfnProgress,
3461 void *pProgressData,
3464int CPL_DLL GDALBandGetBestOverviewLevel(
GDALRasterBand *poBand,
int &nXOff,
3465 int &nYOff,
int &nXSize,
int &nYSize,
3466 int nBufXSize,
int nBufYSize)
3467 CPL_WARN_DEPRECATED(
"Use GDALBandGetBestOverviewLevel2 instead");
3468int CPL_DLL GDALBandGetBestOverviewLevel2(
GDALRasterBand *poBand,
int &nXOff,
3469 int &nYOff,
int &nXSize,
int &nYSize,
3470 int nBufXSize,
int nBufYSize,
3473int CPL_DLL GDALOvLevelAdjust(
int nOvLevel,
int nXSize)
3474 CPL_WARN_DEPRECATED(
"Use GDALOvLevelAdjust2 instead");
3475int CPL_DLL GDALOvLevelAdjust2(
int nOvLevel,
int nXSize,
int nYSize);
3476int CPL_DLL GDALComputeOvFactor(
int nOvrXSize,
int nRasterXSize,
int nOvrYSize,
3479GDALDataset CPL_DLL *GDALFindAssociatedAuxFile(
const char *pszBasefile,
3487int CPL_DLL GDALCheckDatasetDimensions(
int nXSize,
int nYSize);
3488int CPL_DLL GDALCheckBandCount(
int nBands,
int bIsZeroAllowed);
3494int CPL_DLL GDALReadWorldFile2(
const char *pszBaseFilename,
3495 const char *pszExtension,
3496 double *padfGeoTransform,
3497 char **papszSiblingFiles,
3498 char **ppszWorldFileNameOut);
3499int GDALReadTabFile2(
const char *pszBaseFilename,
double *padfGeoTransform,
3500 char **ppszWKT,
int *pnGCPCount,
GDAL_GCP **ppasGCPs,
3501 char **papszSiblingFiles,
char **ppszTabFileNameOut);
3508void GDALNullifyOpenDatasetsList();
3509CPLMutex **GDALGetphDMMutex();
3510CPLMutex **GDALGetphDLMutex();
3511void GDALNullifyProxyPoolSingleton();
3512void GDALSetResponsiblePIDForCurrentThread(
GIntBig responsiblePID);
3513GIntBig GDALGetResponsiblePIDForCurrentThread();
3515CPLString GDALFindAssociatedFile(
const char *pszBasename,
const char *pszExt,
3518CPLErr CPL_DLL EXIFExtractMetadata(
char **&papszMetadata,
void *fpL,
3519 int nOffset,
int bSwabflag,
int nTIFFHEADER,
3520 int &nExifOffset,
int &nInterOffset,
3524 const char *
const *papszOptionOptions);
3525int GDALValidateOptions(
const char *pszOptionList,
3526 const char *
const *papszOptionsToValidate,
3527 const char *pszErrorMessageOptionType,
3528 const char *pszErrorMessageContainerName);
3534 int nXSize,
int nYSize,
int nBufXSize,
3538 bool bThisLevelOnly);
3543template <
class T>
inline bool ARE_REAL_EQUAL(T fVal1, T fVal2,
int ulp = 2)
3545 return fVal1 == fVal2 ||
3546 std::abs(fVal1 - fVal2) < std::numeric_limits<float>::epsilon() *
3547 std::abs(fVal1 + fVal2) * ulp;
3550double GDALAdjustNoDataCloseToFloatMax(
double dfVal);
3552#define DIV_ROUND_UP(a, b) (((a) % (b)) == 0 ? ((a) / (b)) : (((a) / (b)) + 1))
3556#define GDALSTAT_APPROX_NUMSAMPLES 2500
3561void GDALDeserializeGCPListFromXML(
CPLXMLNode *psGCPList,
3562 GDAL_GCP **ppasGCPList,
int *pnGCPCount,
3565void GDALSerializeOpenOptionsToXML(
CPLXMLNode *psParentNode,
3566 char **papszOpenOptions);
3567char **GDALDeserializeOpenOptionsFromXML(
CPLXMLNode *psParentNode);
3569int GDALCanFileAcceptSidecarFile(
const char *pszFilename);
3571bool GDALCanReliablyUseSiblingFileList(
const char *pszFilename);
3573bool CPL_DLL GDALIsDriverDeprecatedForGDAL35StillEnabled(
3574 const char *pszDriverName,
const char *pszExtraMsg =
"");
3581} GDALBufferSampleFormat;
3583bool CPL_DLL GDALBufferHasOnlyNoData(
const void *pBuffer,
double dfNoDataValue,
3584 size_t nWidth,
size_t nHeight,
3585 size_t nLineStride,
size_t nComponents,
3587 GDALBufferSampleFormat nSampleFormat);
3592double CPL_DLL GDALGetNoDataValueCastToDouble(int64_t nVal);
3593double CPL_DLL GDALGetNoDataValueCastToDouble(uint64_t nVal);
String list class designed around our use of C "char**" string lists.
Definition cpl_string.h:438
Convenient string class based on std::string.
Definition cpl_string.h:312
Abstract class, implemented by GDALAttribute and GDALMDArray.
Definition gdal_priv.h:2333
const std::string & GetFullName() const
Return the name of an array or attribute.
Definition gdal_priv.h:2392
virtual const std::vector< std::shared_ptr< GDALDimension > > & GetDimensions() const =0
Return the dimensions of an attribute/array.
virtual const GDALExtendedDataType & GetDataType() const =0
Return the data type of an attribute/array.
const std::string & GetName() const
Return the name of an array or attribute.
Definition gdal_priv.h:2382
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:1985
Class used as a session object for asynchronous requests.
Definition gdal_priv.h:1842
int GetXOffset() const
Return x offset.
Definition gdal_priv.h:1878
int GetYOffset() const
Return y offset.
Definition gdal_priv.h:1885
int GetYSize() const
Return height.
Definition gdal_priv.h:1899
int GetBandCount() const
Return band count.
Definition gdal_priv.h:1934
GDALDataType GetBufferType() const
Return buffer data type.
Definition gdal_priv.h:1927
int GetBandSpace() const
Return band spacing.
Definition gdal_priv.h:1962
int GetBufferYSize() const
Return buffer height.
Definition gdal_priv.h:1920
int GetXSize() const
Return width.
Definition gdal_priv.h:1892
virtual GDALAsyncStatusType GetNextUpdatedRegion(double dfTimeout, int *pnBufXOff, int *pnBufYOff, int *pnBufXSize, int *pnBufYSize)=0
= 0;
void * GetBuffer()
Return buffer.
Definition gdal_priv.h:1906
int GetPixelSpace() const
Return pixel spacing.
Definition gdal_priv.h:1948
int * GetBandMap()
Return band map.
Definition gdal_priv.h:1941
GDALDataset * GetGDALDataset()
Return dataset.
Definition gdal_priv.h:1871
int GetLineSpace() const
Return line spacing.
Definition gdal_priv.h:1955
int GetBufferXSize() const
Return buffer width.
Definition gdal_priv.h:1913
Class modeling an attribute that has a name, a value and a type, and is typically used to describe a ...
Definition gdal_priv.h:2534
A color table / palette.
Definition gdal_priv.h:1093
static GDALColorTableH ToHandle(GDALColorTable *poCT)
Convert a GDALColorTable* to a GDALRasterBandH.
Definition gdal_priv.h:1118
~GDALColorTable()
Destructor.
static GDALColorTable * FromHandle(GDALColorTableH hCT)
Convert a GDALColorTableH to a GDALColorTable*.
Definition gdal_priv.h:1126
Class returned by GetBands() that act as a container for raster bands.
Definition gdal_priv.h:481
Class returned by GetFeatures() that act as a container for vector features.
Definition gdal_priv.h:787
Layer iterator.
Definition gdal_priv.h:733
void pointer
pointer
Definition gdal_priv.h:741
void difference_type
difference_type
Definition gdal_priv.h:740
std::input_iterator_tag iterator_category
iterator_category
Definition gdal_priv.h:743
Class returned by GetLayers() that acts as a range of layers.
Definition gdal_priv.h:720
A set of associated raster bands, usually from one file.
Definition gdal_priv.h:348
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:672
CPLErr SetMetadata(char **papszMetadata, const char *pszDomain) override
Set metadata.
CPLErr SetMetadataItem(const char *pszName, const char *pszValue, const char *pszDomain) override
Set single metadata item.
char ** GetOpenOptions()
Return open options.
Definition gdal_priv.h:616
static GDALDataset * FromHandle(GDALDatasetH hDS)
Convert a GDALDatasetH to a GDALDataset*.
Definition gdal_priv.h:664
static GDALDatasetH ToHandle(GDALDataset *poDS)
Convert a GDALDataset* to a GDALDatasetH.
Definition gdal_priv.h:656
GDALAccess GetAccess() const
Return access mode.
Definition gdal_priv.h:603
Class modeling a a dimension / axis used to index multidimensional arrays.
Definition gdal_priv.h:2960
const std::string & GetName() const
Return the name.
Definition gdal_priv.h:2974
const std::string & GetDirection() const
Return the axis direction.
Definition gdal_priv.h:3009
const std::string & GetFullName() const
Return the full name.
Definition gdal_priv.h:2983
GUInt64 GetSize() const
Return the size, that is the number of values along the dimension.
Definition gdal_priv.h:3018
const std::string & GetType() const
Return the axis type.
Definition gdal_priv.h:2996
Class for managing the registration of file format drivers.
Definition gdal_priv.h:1785
Format specific driver.
Definition gdal_priv.h:1641
static GDALDriver * FromHandle(GDALDriverH hDriver)
Convert a GDALDriverH to a GDALDriver*.
Definition gdal_priv.h:1764
static GDALDriverH ToHandle(GDALDriver *poDriver)
Convert a GDALDriver* to a GDALDriverH.
Definition gdal_priv.h:1756
Class for a component of a compound extended data type.
Definition gdal_priv.h:2129
const GDALExtendedDataType & GetType() const
Return the data type of the component.
Definition gdal_priv.h:2160
size_t GetOffset() const
Return the offset (in bytes) of the component in the compound data type.
Definition gdal_priv.h:2151
const std::string & GetName() const
Return the name.
Definition gdal_priv.h:2142
GDALEDTComponent(const GDALEDTComponent &)
Copy constructor.
Class used to represent potentially complex data types.
Definition gdal_priv.h:1995
bool operator!=(const GDALExtendedDataType &other) const
Non-equality operator.
Definition gdal_priv.h:2013
GDALExtendedDataTypeSubType GetSubType() const
Return subtype.
Definition gdal_priv.h:2052
size_t GetSize() const
Return data type size in bytes.
Definition gdal_priv.h:2073
size_t GetMaxStringLength() const
Return the maximum length of a string in bytes.
Definition gdal_priv.h:2082
static GDALExtendedDataType Create(GDALDataType eType)
Return a new GDALExtendedDataType of class GEDTC_NUMERIC.
Definition gdalmultidim.cpp:8446
static GDALExtendedDataType CreateString(size_t nMaxStringLength=0, GDALExtendedDataTypeSubType eSubType=GEDTST_NONE)
Return a new GDALExtendedDataType of class GEDTC_STRING.
Definition gdalmultidim.cpp:8511
GDALDataType GetNumericDataType() const
Return numeric data type (only valid when GetClass() == GEDTC_NUMERIC)
Definition gdal_priv.h:2041
GDALExtendedDataTypeClass GetClass() const
Return type class.
Definition gdal_priv.h:2031
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:2062
const std::string & GetName() const
Return type name.
Definition gdal_priv.h:2022
Class modeling a named container of GDALAttribute, GDALMDArray, OGRLayer or other GDALGroup.
Definition gdal_priv.h:2219
const std::string & GetName() const
Return the name of the group.
Definition gdal_priv.h:2240
const std::string & GetFullName() const
Return the full name of the group.
Definition gdal_priv.h:2249
Interface used to get a single GDALAttribute or a set of GDALAttribute.
Definition gdal_priv.h:2181
Class modeling a multi-dimensional array.
Definition gdal_priv.h:2646
virtual bool IsWritable() const =0
Return whether an array is writable.
virtual const std::string & GetFilename() const =0
Return the filename that contains that array.
std::shared_ptr< GDALMDArray > at(GUInt64 idx, GUInt64VarArg... tail) const
Return a view of the array using integer indexing.
Definition gdal_priv.h:2787
Object with metadata.
Definition gdal_priv.h:138
static GDALMajorObject * FromHandle(GDALMajorObjectH hMajorObject)
Convert a GDALMajorObjectH to a GDALMajorObject*.
Definition gdal_priv.h:181
static GDALMajorObjectH ToHandle(GDALMajorObject *poMajorObject)
Convert a GDALMajorObject* to a GDALMajorObjectH.
Definition gdal_priv.h:173
Class for dataset open functions.
Definition gdal_priv.h:277
int bStatOK
Whether stat()'ing the file was successful.
Definition gdal_priv.h:298
GByte * pabyHeader
Buffer with first bytes of the file.
Definition gdal_priv.h:308
int bIsDirectory
Whether the file is a directory.
Definition gdal_priv.h:300
char ** papszOpenOptions
Open options.
Definition gdal_priv.h:290
GDALAccess eAccess
Access flag.
Definition gdal_priv.h:293
int nOpenFlags
Open flags.
Definition gdal_priv.h:295
VSILFILE * fpL
Pointer to the file.
Definition gdal_priv.h:303
char * pszFilename
Filename.
Definition gdal_priv.h:288
int nHeaderBytes
Number of bytes in pabyHeader.
Definition gdal_priv.h:306
const char *const * papszAllowedDrivers
Allowed drivers (NULL for all)
Definition gdal_priv.h:311
The GDALRasterAttributeTable (or RAT) class is used to encapsulate a table used to provide attribute ...
Definition gdal_rat.h:48
A single raster band (or channel).
Definition gdal_priv.h:1238
void static GDALRasterBandH ToHandle(GDALRasterBand *poBand)
Convert a GDALRasterBand* to a GDALRasterBandH.
Definition gdal_priv.h:1464
virtual bool IsMaskBand() const
Returns whether a band is a mask band.
Definition gdalrasterband.cpp:7182
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 SetMetadata(char **papszMetadata, const char *pszDomain) override
CAUTION: depending on the format, older values of the updated information might still be found in the...
virtual CPLErr IReadBlock(int nBlockXOff, int nBlockYOff, void *pData)=0
Default internal implementation ... to be overridden by subclasses that support reading.
CPLErr SetMetadataItem(const char *pszName, const char *pszValue, const char *pszDomain) override
CAUTION: depending on the format, older values of the updated information might still be found in the...
static GDALRasterBand * FromHandle(GDALRasterBandH hBand)
Convert a GDALRasterBandH to a GDALRasterBand*.
Definition gdal_priv.h:1472
A single raster block in the block cache.
Definition gdal_priv.h:945
int GetDirty() const
Return the dirty flag.
Definition gdal_priv.h:1034
GDALRasterBand * GetBand()
Accessor to source GDALRasterBand object.
Definition gdal_priv.h:1059
int GetXSize() const
Return the width of the block.
Definition gdal_priv.h:1020
GPtrDiff_t GetBlockSize() const
Return the block size in bytes.
Definition gdal_priv.h:1048
int GetYSize() const
Return the height of the block.
Definition gdal_priv.h:1027
GDALDataType GetDataType() const
Return the data type.
Definition gdal_priv.h:999
int GetXOff() const
Return the x offset of the top-left corner of the block.
Definition gdal_priv.h:1006
int AddLock(void)
Increment the lock count.
Definition gdal_priv.h:983
void * GetDataRef(void)
Return the data buffer.
Definition gdal_priv.h:1041
int GetYOff() const
Return the y offset of the top-left corner of the block.
Definition gdal_priv.h:1013
int DropLock(void)
Decrement the lock count.
Definition gdal_priv.h:988
Store the raw result of an attribute value, which might contain dynamically allocated structures (lik...
Definition gdal_priv.h:2471
size_t size() const
Return the size in bytes of the raw result.
Definition gdal_priv.h:2505
const GByte * data() const
Return pointer to the start of data.
Definition gdal_priv.h:2500
const GByte & operator[](size_t idx) const
Return byte at specified index.
Definition gdal_priv.h:2495
Definition of a table relationship.
Definition gdal_priv.h:3103
const std::string & GetName() const
Get the name of the relationship.
Definition gdal_priv.h:3142
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:3237
void SetType(GDALRelationshipType eType)
Sets the type of the relationship.
Definition gdal_priv.h:3289
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:3259
void SetMappingTableName(const std::string &osName)
Sets the name of the mapping table for many-to-many relationships.
Definition gdal_priv.h:3182
static GDALRelationshipH ToHandle(GDALRelationship *poRelationship)
Convert a GDALRelationship* to a GDALRelationshipH.
Definition gdal_priv.h:3406
const std::string & GetForwardPathLabel() const
Get the label of the forward path for the relationship.
Definition gdal_priv.h:3309
const std::string & GetLeftTableName() const
Get the name of the left (or base/origin) table in the relationship.
Definition gdal_priv.h:3157
const std::string & GetBackwardPathLabel() const
Get the label of the backward path for the relationship.
Definition gdal_priv.h:3349
const std::string & GetRelatedTableType() const
Get the type string of the related table.
Definition gdal_priv.h:3384
const std::string & GetMappingTableName() const
Get the name of the mapping table for many-to-many relationships.
Definition gdal_priv.h:3173
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:3215
GDALRelationshipCardinality GetCardinality() const
Get the cardinality of the relationship.
Definition gdal_priv.h:3148
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:3226
void SetForwardPathLabel(const std::string &osLabel)
Sets the label of the forward path for the relationship.
Definition gdal_priv.h:3329
void SetBackwardPathLabel(const std::string &osLabel)
Sets the label of the backward path for the relationship.
Definition gdal_priv.h:3369
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:3204
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:3271
static GDALRelationship * FromHandle(GDALRelationshipH hRelationship)
Convert a GDALRelationshipH to a GDALRelationship*.
Definition gdal_priv.h:3413
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:3248
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:3131
GDALRelationshipType GetType() const
Get the type of the relationship.
Definition gdal_priv.h:3280
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:3193
const std::string & GetRightTableName() const
Get the name of the right (or related/destination) table in the relationship.
Definition gdal_priv.h:3164
void SetRelatedTableType(const std::string &osType)
Sets the type string of the related table.
Definition gdal_priv.h:3399
A simple feature, including geometry and attributes.
Definition ogr_feature.h:497
Definition of a field domain.
Definition ogr_feature.h:1161
Abstract base class for all geometry classes.
Definition ogr_geometry.h:335
This class represents a layer of simple features, with access methods.
Definition ogrsf_frmts.h:73
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition ogr_spatialref.h:167
This class represents a style table.
Definition ogr_featurestyle.h:85
Various convenience functions for CPL.
CPLErr
Error category.
Definition cpl_error.h:53
int CPLErrorNum
Error number.
Definition cpl_error.h:95
Definitions for CPL mini XML Parser/Serializer.
int GPtrDiff_t
Integer type large enough to hold the difference between 2 addresses.
Definition cpl_port.h:274
#define CPL_NULL_TERMINATED
Null terminated variadic.
Definition cpl_port.h:945
unsigned long long GUIntBig
Large unsigned integer type (generally 64-bit unsigned integer type).
Definition cpl_port.h:236
#define CPL_C_END
Macro to end a block of C symbols.
Definition cpl_port.h:317
#define CPL_C_START
Macro to start a block of C symbols.
Definition cpl_port.h:313
GIntBig GInt64
Signed 64 bit integer type.
Definition cpl_port.h:254
#define CPL_PRINT_FUNC_FORMAT(format_idx, arg_idx)
Tag a function to have printf() formatting.
Definition cpl_port.h:957
#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:1049
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1190
GUIntBig GUInt64
Unsigned 64 bit integer type.
Definition cpl_port.h:256
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition cpl_port.h:983
unsigned char GByte
Unsigned byte type.
Definition cpl_port.h:205
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition cpl_port.h:233
Various convenience functions for working with strings and string lists.
struct CPLVirtualMem CPLVirtualMem
Opaque type that represents a virtual memory mapping.
Definition cpl_virtualmem.h:62
FILE VSILFILE
Opaque type for a FILE that implements the VSIVirtualHandle API.
Definition cpl_vsi.h:162
GUIntBig vsi_l_offset
Type for a file offset.
Definition cpl_vsi.h:146
Public (C callable) GDAL entry points.
GIntBig GSpacing
Type to express pixel, line or band spacing.
Definition gdal.h:314
GDALAccess
Definition gdal.h:124
@ GA_ReadOnly
Definition gdal.h:125
void GDALClose(GDALDatasetH)
Close GDAL dataset.
Definition gdaldataset.cpp:3658
GDALPaletteInterp
Definition gdal.h:252
@ GPI_RGB
Definition gdal.h:254
GDALDataType
Definition gdal.h:64
@ GDT_Byte
Definition gdal.h:66
@ GDT_Float64
Definition gdal.h:74
@ GDT_Unknown
Definition gdal.h:65
void * GDALDatasetH
Opaque type used for the C bindings of the C++ GDALDataset class.
Definition gdal.h:290
GDALExtendedDataTypeClass
Enumeration giving the class of a GDALExtendedDataType.
Definition gdal.h:320
@ GEDTC_NUMERIC
Numeric value.
Definition gdal.h:322
GDALRelationshipCardinality
Cardinality of relationship.
Definition gdal.h:1768
@ GRC_ONE_TO_MANY
One-to-many.
Definition gdal.h:1772
GDALRIOResampleAlg
RasterIO() resampling method.
Definition gdal.h:142
void * GDALRelationshipH
Opaque type used for the C bindings of the C++ GDALRelationship class.
Definition gdal.h:311
int GDALGetDataTypeSizeBytes(GDALDataType)
Get data type size in bytes.
Definition gdal_misc.cpp:329
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:3232
GDALExtendedDataTypeSubType
Enumeration giving the subtype of a GDALExtendedDataType.
Definition gdal.h:333
@ GEDTST_NONE
None.
Definition gdal.h:335
void * GDALMajorObjectH
Opaque type used for the C bindings of the C++ GDALMajorObject class.
Definition gdal.h:287
GDALColorInterp
Definition gdal.h:226
GDALRelationshipType
Type of relationship.
Definition gdal.h:1784
@ GRT_ASSOCIATION
Association relationship.
Definition gdal.h:1788
GDALAsyncStatusType
status of the asynchronous stream
Definition gdal.h:110
void * GDALDriverH
Opaque type used for the C bindings of the C++ GDALDriver class.
Definition gdal.h:296
GDALRWFlag
Definition gdal.h:131
void * GDALRasterBandH
Opaque type used for the C bindings of the C++ GDALRasterBand class.
Definition gdal.h:293
void * GDALColorTableH
Opaque type used for the C bindings of the C++ GDALColorTable class.
Definition gdal.h:299
std::unique_ptr< GDALDataset, GDALDatasetUniquePtrDeleter > GDALDatasetUniquePtr
Unique pointer type for GDALDataset.
Definition gdal_priv.h:934
constexpr GDALSuggestedBlockAccessPattern GSBAP_UNKNOWN
Unknown, or no particular read order is suggested.
Definition gdal_priv.h:1220
int GDALSuggestedBlockAccessPattern
Suggested/most efficient access pattern to blocks.
Definition gdal_priv.h:1217
constexpr GDALSuggestedBlockAccessPattern GSBAP_RANDOM
Random access to blocks is efficient.
Definition gdal_priv.h:1223
GDALDriverManager * GetGDALDriverManager(void)
Fetch the global GDAL driver manager.
Definition gdaldrivermanager.cpp:102
GDALMaskValueRange
Range of values found in a mask band.
Definition gdal_priv.h:1209
@ GMVR_0_AND_1_ONLY
Definition gdal_priv.h:1212
@ GMVR_0_AND_255_ONLY
Definition gdal_priv.h:1213
constexpr GDALSuggestedBlockAccessPattern GSBAP_TOP_TO_BOTTOM
Reading by strips from top to bottom is the most efficient.
Definition gdal_priv.h:1226
GDALIdentifyEnum
Enumeration used by GDALDriver::pfnIdentify().
Definition gdal_priv.h:1615
@ GDAL_IDENTIFY_TRUE
Identify determined the file is recognized by the probed driver.
Definition gdal_priv.h:1622
@ GDAL_IDENTIFY_FALSE
Identify determined the file is not recognized by the probed driver.
Definition gdal_priv.h:1620
@ GDAL_IDENTIFY_UNKNOWN
Identify could not determine if the file is recognized or not by the probed driver.
Definition gdal_priv.h:1618
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:1233
constexpr GDALSuggestedBlockAccessPattern GSBAP_BOTTOM_TO_TOP
Reading by strips from bottom to top is the most efficient.
Definition gdal_priv.h:1229
Core portability services for cross-platform OGR code.
OGRwkbGeometryType
List of well known binary geometry types.
Definition ogr_core.h:407
@ wkbUnknown
unknown type, non-standard
Definition ogr_core.h:408
int OGRErr
Type for a OGR error.
Definition ogr_core.h:378
std::unique_ptr< OGRFeature, OGRFeatureUniquePtrDeleter > OGRFeatureUniquePtr
Unique pointer type for OGRFeature.
Definition ogr_feature.h:1106
OGRLayer::FeatureIterator begin(OGRLayer *poLayer)
Return begin of feature iterator.
Definition ogrsf_frmts.h:345
OGRLayer::FeatureIterator end(OGRLayer *poLayer)
Return end of feature iterator.
Definition ogrsf_frmts.h:353
Document node structure.
Definition cpl_minixml.h:70
Color tuple.
Definition gdal.h:1609
Object returned by GetFeatures() iterators.
Definition gdal_priv.h:685
Ground Control Point.
Definition gdal.h:959