14#ifndef GDALMULTIDIM_H_INCLUDED
15#define GDALMULTIDIM_H_INCLUDED
20#include "gdal_geotransform.h"
66 Create(
const std::string &osName,
GDALDataType eBaseType,
67 std::unique_ptr<GDALRasterAttributeTable>);
69 Create(
const std::string &osName,
size_t nTotalSize,
70 std::vector<std::unique_ptr<GDALEDTComponent>> &&components);
72 CreateString(
size_t nMaxStringLength = 0,
80 return !(operator==(other));
129 return m_aoComponents;
149 return m_nMaxStringLength;
164 return m_poRAT.get();
169 bool NeedsFreeDynamicMemory()
const;
171 void FreeDynamicMemory(
void *pBuffer)
const;
176 static bool CopyValues(
const void *pSrc,
187 std::unique_ptr<GDALRasterAttributeTable>);
189 const std::string &osName,
size_t nTotalSize,
190 std::vector<std::unique_ptr<GDALEDTComponent>> &&components);
192 std::string m_osName{};
196 std::vector<std::unique_ptr<GDALEDTComponent>> m_aoComponents{};
198 size_t m_nMaxStringLength = 0;
199 std::unique_ptr<GDALRasterAttributeTable> m_poRAT{};
249 std::string m_osName;
266 std::shared_ptr<GDALAttribute>
267 GetAttributeFromAttributes(
const std::string &osName)
const;
272 virtual std::shared_ptr<GDALAttribute>
273 GetAttribute(
const std::string &osName)
const;
275 virtual std::vector<std::shared_ptr<GDALAttribute>>
276 GetAttributes(
CSLConstList papszOptions =
nullptr)
const;
278 virtual std::shared_ptr<GDALAttribute>
279 CreateAttribute(
const std::string &osName,
280 const std::vector<GUInt64> &anDimensions,
284 virtual bool DeleteAttribute(
const std::string &osName,
308 std::string m_osName{};
311 std::string m_osFullName{};
315 const std::string m_osContext{};
318 std::vector<std::shared_ptr<GDALExtendedDataType>> m_apoTypes{};
321 std::weak_ptr<GDALGroup> m_pSelf{};
324 bool m_bValid =
true;
326 GDALGroup(
const std::string &osParentName,
const std::string &osName,
327 const std::string &osContext = std::string());
330 GetInnerMostGroup(
const std::string &osPathOrArrayOrDim,
331 std::shared_ptr<GDALGroup> &curGroupHolder,
332 std::string &osLastPart)
const;
334 void BaseRename(
const std::string &osNewName);
336 bool CheckValidAndErrorOutIfNot()
const;
338 void SetSelf(
const std::shared_ptr<GDALGroup> &self)
343 virtual void NotifyChildrenOfRenaming()
347 virtual void NotifyChildrenOfDeletion()
380 const std::vector<std::shared_ptr<GDALExtendedDataType>> &
386 virtual std::vector<std::string>
387 GetMDArrayNames(
CSLConstList papszOptions =
nullptr)
const;
388 virtual std::shared_ptr<GDALMDArray>
389 OpenMDArray(
const std::string &osName,
392 std::vector<std::string> GetMDArrayFullNamesRecursive(
396 virtual std::vector<std::string>
397 GetGroupNames(
CSLConstList papszOptions =
nullptr)
const;
398 virtual std::shared_ptr<GDALGroup>
399 OpenGroup(
const std::string &osName,
402 virtual std::vector<std::string>
403 GetVectorLayerNames(
CSLConstList papszOptions =
nullptr)
const;
405 OpenVectorLayer(
const std::string &osName,
408 virtual std::vector<std::shared_ptr<GDALDimension>>
409 GetDimensions(
CSLConstList papszOptions =
nullptr)
const;
411 virtual std::shared_ptr<GDALGroup>
412 CreateGroup(
const std::string &osName,
CSLConstList papszOptions =
nullptr);
414 virtual bool DeleteGroup(
const std::string &osName,
417 virtual std::shared_ptr<GDALDimension>
418 CreateDimension(
const std::string &osName,
const std::string &osType,
419 const std::string &osDirection,
GUInt64 nSize,
422 virtual std::shared_ptr<GDALMDArray> CreateMDArray(
423 const std::string &osName,
424 const std::vector<std::shared_ptr<GDALDimension>> &aoDimensions,
428 virtual bool DeleteMDArray(
const std::string &osName,
431 GUInt64 GetTotalCopyCost()
const;
433 virtual bool CopyFrom(
const std::shared_ptr<GDALGroup> &poDstRootGroup,
435 const std::shared_ptr<GDALGroup> &poSrcGroup,
436 bool bStrict,
GUInt64 &nCurCost,
438 GDALProgressFunc pfnProgress,
void *pProgressData,
443 std::shared_ptr<GDALMDArray>
444 OpenMDArrayFromFullname(
const std::string &osFullName,
447 std::shared_ptr<GDALAttribute>
448 OpenAttributeFromFullname(
const std::string &osFullName,
451 std::shared_ptr<GDALMDArray>
452 ResolveMDArray(
const std::string &osName,
const std::string &osStartingPath,
455 std::shared_ptr<GDALGroup>
456 OpenGroupFromFullname(
const std::string &osFullName,
459 std::shared_ptr<GDALDimension>
460 OpenDimensionFromFullname(
const std::string &osFullName)
const;
462 virtual void ClearStatistics();
464 virtual bool Rename(
const std::string &osNewName);
466 std::shared_ptr<GDALGroup>
467 SubsetDimensionFromSelection(
const std::string &osSelection)
const;
470 virtual void ParentRenamed(
const std::string &osNewParentFullName);
472 virtual void Deleted();
474 virtual void ParentDeleted();
476 const std::string &GetContext()
const
484 static constexpr GUInt64 COPY_COST = 1000;
501 std::string m_osName{};
504 std::string m_osFullName{};
505 std::weak_ptr<GDALAbstractMDArray> m_pSelf{};
508 bool m_bValid =
true;
511 const std::string &osName);
513 void SetSelf(
const std::shared_ptr<GDALAbstractMDArray> &self)
518 bool CheckValidAndErrorOutIfNot()
const;
520 bool CheckReadWriteParams(
const GUInt64 *arrayStartIdx,
const size_t *count,
525 const void *buffer_alloc_start,
526 size_t buffer_alloc_size,
527 std::vector<GInt64> &tmp_arrayStep,
528 std::vector<GPtrDiff_t> &tmp_bufferStride)
const;
531 IRead(
const GUInt64 *arrayStartIdx,
536 void *pDstBuffer)
const = 0;
539 IWrite(
const GUInt64 *arrayStartIdx,
545 void BaseRename(
const std::string &osNewName);
547 virtual void NotifyChildrenOfRenaming()
551 virtual void NotifyChildrenOfDeletion()
580 GUInt64 GetTotalElementsCount()
const;
582 virtual size_t GetDimensionCount()
const;
584 virtual const std::vector<std::shared_ptr<GDALDimension>> &
589 virtual std::vector<GUInt64> GetBlockSize()
const;
591 virtual std::vector<size_t>
592 GetProcessingChunkSize(
size_t nMaxChunkMemory)
const;
610 typedef bool (*FuncProcessPerChunkType)(
612 const GUInt64 *chunkArrayStartIdx,
613 const size_t *chunkCount,
619 virtual bool ProcessPerChunk(
const GUInt64 *arrayStartIdx,
620 const GUInt64 *count,
const size_t *chunkSize,
621 FuncProcessPerChunkType pfnFunc,
625 Read(
const GUInt64 *arrayStartIdx,
630 const void *pDstBufferAllocStart =
nullptr,
631 size_t nDstBufferAllocSize = 0)
const;
634 Write(
const GUInt64 *arrayStartIdx,
639 const void *pSrcBufferAllocStart =
nullptr,
640 size_t nSrcBufferAllocSize = 0);
642 virtual bool Rename(
const std::string &osNewName);
645 virtual void Deleted();
647 virtual void ParentDeleted();
649 virtual void ParentRenamed(
const std::string &osNewParentFullName);
730 mutable std::string m_osCachedVal{};
734 GDALAttribute(
const std::string &osParentName,
const std::string &osName);
742 std::vector<GUInt64> GetDimensionsSize()
const;
745 const char *ReadAsString()
const;
746 int ReadAsInt()
const;
747 int64_t ReadAsInt64()
const;
748 double ReadAsDouble()
const;
750 std::vector<int> ReadAsIntArray()
const;
751 std::vector<int64_t> ReadAsInt64Array()
const;
752 std::vector<double> ReadAsDoubleArray()
const;
755 bool Write(
const void *pabyValue,
size_t nLen);
756 bool Write(
const char *);
758 bool WriteInt64(int64_t);
761 bool Write(
const int *,
size_t);
762 bool Write(
const int64_t *,
size_t);
763 bool Write(
const double *,
size_t);
766 static constexpr GUInt64 COPY_COST = 100;
775class CPL_DLL GDALAttributeString final :
public GDALAttribute
777 std::vector<std::shared_ptr<GDALDimension>> m_dims{};
779 std::string m_osValue;
784 void *pDstBuffer)
const override;
787 GDALAttributeString(
const std::string &osParentName,
788 const std::string &osName,
const std::string &osValue,
791 const std::vector<std::shared_ptr<GDALDimension>> &
792 GetDimensions()
const override;
804class CPL_DLL GDALAttributeNumeric final :
public GDALAttribute
806 std::vector<std::shared_ptr<GDALDimension>> m_dims{};
809 double m_dfValue = 0;
810 std::vector<GUInt32> m_anValuesUInt32{};
815 void *pDstBuffer)
const override;
818 GDALAttributeNumeric(
const std::string &osParentName,
819 const std::string &osName,
double dfValue);
820 GDALAttributeNumeric(
const std::string &osParentName,
821 const std::string &osName,
int nValue);
822 GDALAttributeNumeric(
const std::string &osParentName,
823 const std::string &osName,
824 const std::vector<GUInt32> &anValues);
826 const std::vector<std::shared_ptr<GDALDimension>> &
827 GetDimensions()
const override;
853 friend class GDALMDArrayResampled;
854 std::shared_ptr<GDALMDArray>
855 GetView(
const std::vector<GUInt64> &indices)
const;
857 inline std::shared_ptr<GDALMDArray>
858 atInternal(
const std::vector<GUInt64> &indices)
const
860 return GetView(indices);
863 template <
typename... GUInt64VarArg>
865 inline std::shared_ptr<GDALMDArray>
866 atInternal(std::vector<GUInt64> &indices,
GUInt64 idx,
867 GUInt64VarArg... tail)
const
869 indices.push_back(idx);
870 return atInternal(indices, tail...);
875 const std::string m_osContext{};
877 mutable bool m_bHasTriedCachedArray =
false;
878 mutable std::shared_ptr<GDALMDArray> m_poCachedArray{};
882 GDALMDArray(
const std::string &osParentName,
const std::string &osName,
883 const std::string &osContext = std::string());
885 virtual bool IAdviseRead(
const GUInt64 *arrayStartIdx,
const size_t *count,
888 virtual bool IsCacheable()
const
893 virtual bool SetStatistics(
bool bApproxStats,
double dfMin,
double dfMax,
894 double dfMean,
double dfStdDev,
897 static std::string MassageName(
const std::string &inputName);
899 std::shared_ptr<GDALGroup>
900 GetCacheRootGroup(
bool bCanCreate, std::string &osCacheFilenameOut)
const;
903 bool IsTransposedRequest(
const size_t *count,
907 bool ReadForTransposedRequest(
const GUInt64 *arrayStartIdx,
908 const size_t *count,
const GInt64 *arrayStep,
911 void *pDstBuffer)
const;
913 bool IsStepOneContiguousRowMajorOrderedSameDataType(
914 const size_t *count,
const GInt64 *arrayStep,
920 bool ReadUsingContiguousIRead(
const GUInt64 *arrayStartIdx,
921 const size_t *count,
const GInt64 *arrayStep,
924 void *pDstBuffer)
const;
926 static std::shared_ptr<GDALMDArray> CreateGLTOrthorectified(
927 const std::shared_ptr<GDALMDArray> &poParent,
928 const std::shared_ptr<GDALGroup> &poRootGroup,
929 const std::shared_ptr<GDALMDArray> &poGLTX,
930 const std::shared_ptr<GDALMDArray> &poGLTY,
int nGLTIndexOffset,
931 const std::vector<double> &adfGeoTransform,
CSLConstList papszOptions);
936 GUInt64 GetTotalCopyCost()
const;
939 bool bStrict,
GUInt64 &nCurCost,
941 GDALProgressFunc pfnProgress,
void *pProgressData);
958 virtual const std::string &GetUnit()
const;
960 virtual bool SetUnit(
const std::string &osUnit);
964 virtual std::shared_ptr<OGRSpatialReference> GetSpatialRef()
const;
966 virtual const void *GetRawNoDataValue()
const;
968 double GetNoDataValueAsDouble(
bool *pbHasNoData =
nullptr)
const;
970 int64_t GetNoDataValueAsInt64(
bool *pbHasNoData =
nullptr)
const;
972 uint64_t GetNoDataValueAsUInt64(
bool *pbHasNoData =
nullptr)
const;
974 virtual bool SetRawNoDataValue(
const void *pRawNoData);
977 bool SetNoDataValue(
int nNoData)
979 return SetNoDataValue(
static_cast<int64_t
>(nNoData));
984 bool SetNoDataValue(
double dfNoData);
986 bool SetNoDataValue(int64_t nNoData);
988 bool SetNoDataValue(uint64_t nNoData);
990 virtual bool Resize(
const std::vector<GUInt64> &anNewDimSizes,
993 virtual double GetOffset(
bool *pbHasOffset =
nullptr,
996 virtual double GetScale(
bool *pbHasScale =
nullptr,
999 virtual bool SetOffset(
double dfOffset,
1002 virtual bool SetScale(
double dfScale,
1005 std::shared_ptr<GDALMDArray> GetView(
const std::string &viewExpr)
const;
1007 std::shared_ptr<GDALMDArray> operator[](
const std::string &fieldName)
const;
1020 template <
typename... GUInt64VarArg>
1023 std::shared_ptr<GDALMDArray>
at(
GUInt64 idx, GUInt64VarArg... tail)
const
1025 std::vector<GUInt64> indices;
1026 indices.push_back(idx);
1027 return atInternal(indices, tail...);
1030 virtual std::shared_ptr<GDALMDArray>
1031 Transpose(
const std::vector<int> &anMapNewAxisToOldAxis)
const;
1033 std::shared_ptr<GDALMDArray> GetUnscaled(
1034 double dfOverriddenScale = std::numeric_limits<double>::quiet_NaN(),
1035 double dfOverriddenOffset = std::numeric_limits<double>::quiet_NaN(),
1036 double dfOverriddenDstNodata =
1037 std::numeric_limits<double>::quiet_NaN())
const;
1039 virtual std::shared_ptr<GDALMDArray>
1042 virtual std::shared_ptr<GDALMDArray>
1043 GetResampled(
const std::vector<std::shared_ptr<GDALDimension>> &apoNewDims,
1048 std::shared_ptr<GDALMDArray>
1049 GetGridded(
const std::string &osGridOptions,
1050 const std::shared_ptr<GDALMDArray> &poXArray =
nullptr,
1051 const std::shared_ptr<GDALMDArray> &poYArray =
nullptr,
1054 static std::vector<std::shared_ptr<GDALMDArray>>
1055 GetMeshGrid(
const std::vector<std::shared_ptr<GDALMDArray>> &apoArrays,
1059 AsClassicDataset(
size_t iXDim,
size_t iYDim,
1060 const std::shared_ptr<GDALGroup> &poRootGroup =
nullptr,
1063 virtual CPLErr GetStatistics(
bool bApproxOK,
bool bForce,
double *pdfMin,
1064 double *pdfMax,
double *pdfMean,
1065 double *padfStdDev,
GUInt64 *pnValidCount,
1066 GDALProgressFunc pfnProgress,
1067 void *pProgressData);
1069 virtual bool ComputeStatistics(
bool bApproxOK,
double *pdfMin,
1070 double *pdfMax,
double *pdfMean,
1071 double *pdfStdDev,
GUInt64 *pnValidCount,
1072 GDALProgressFunc,
void *pProgressData,
1075 virtual void ClearStatistics();
1077 virtual std::vector<std::shared_ptr<GDALMDArray>>
1078 GetCoordinateVariables()
const;
1080 bool AdviseRead(
const GUInt64 *arrayStartIdx,
const size_t *count,
1083 virtual bool IsRegularlySpaced(
double &dfStart,
double &dfIncrement)
const;
1085 bool GuessGeoTransform(
size_t nDimX,
size_t nDimY,
bool bPixelIsPoint,
1088 bool GuessGeoTransform(
size_t nDimX,
size_t nDimY,
bool bPixelIsPoint,
1089 double adfGeoTransform[6])
const;
1094 Read(
const GUInt64 *arrayStartIdx,
1095 const size_t *count,
1099 const void *pDstBufferAllocStart =
nullptr,
1100 size_t nDstBufferAllocSize = 0) const override final;
1102 virtual std::shared_ptr<
GDALGroup> GetRootGroup() const;
1104 virtual
bool GetRawBlockInfo(const uint64_t *panBlockCoordinates,
1107 virtual
int GetOverviewCount() const;
1109 virtual std::shared_ptr<
GDALMDArray> GetOverview(
int idx) const;
1111 virtual
CPLErr BuildOverviews(const
char *pszResampling,
int nOverviews,
1112 const
int *panOverviewList,
1113 GDALProgressFunc pfnProgress,
1114 void *pProgressData,
1118 static constexpr
GUInt64 COPY_COST = 1000;
1120 bool CopyFromAllExceptValues(const
GDALMDArray *poSrcArray,
bool bStrict,
1122 GDALProgressFunc pfnProgress,
1123 void *pProgressData);
1131 : m_nStartIdx(nStartIdx), m_nIncr(nIncr)
1138 std::string m_osFieldName{};
1143 m_mapDimIdxToParentDimIdx{};
1148 virtual std::shared_ptr<GDALMDArray>
1149 GetView(
const std::string &viewExpr,
bool bRenameDimensions,
1150 std::vector<ViewSpec> &viewSpecs)
const;
1152 const std::string &GetContext()
const
1161bool CPL_DLL GDALMDRasterIOFromBand(
1163 const GUInt64 *arrayStartIdx,
const size_t *count,
const GInt64 *arrayStep,
1174class CPL_DLL GDALMDArrayRegularlySpaced final :
public GDALMDArray
1176 double m_dfStart = 0;
1177 double m_dfIncrement = 0;
1178 double m_dfOffsetInIncrement = 0;
1180 const std::vector<std::shared_ptr<GDALDimension>> m_dims;
1181 std::vector<std::shared_ptr<GDALAttribute>> m_attributes{};
1182 const std::string m_osEmptyFilename{};
1187 void *pDstBuffer)
const override;
1190 GDALMDArrayRegularlySpaced(
const std::string &osParentName,
1191 const std::string &osName,
1192 const std::shared_ptr<GDALDimension> &poDim,
1193 double dfStart,
double dfIncrement,
1194 double dfOffsetInIncrement);
1196 static std::shared_ptr<GDALMDArrayRegularlySpaced>
1197 Create(
const std::string &osParentName,
const std::string &osName,
1198 const std::shared_ptr<GDALDimension> &poDim,
double dfStart,
1199 double dfIncrement,
double dfOffsetInIncrement);
1201 bool IsWritable()
const override
1206 const std::string &GetFilename()
const override
1208 return m_osEmptyFilename;
1211 const std::vector<std::shared_ptr<GDALDimension>> &
1212 GetDimensions()
const override;
1216 std::vector<std::shared_ptr<GDALAttribute>>
1219 void AddAttribute(
const std::shared_ptr<GDALAttribute> &poAttr);
1221 bool IsRegularlySpaced(
double &dfStart,
double &dfIncrement)
const override;
1245 GDALDimension(
const std::string &osParentName,
const std::string &osName,
1246 const std::string &osType,
const std::string &osDirection,
1267 return m_osFullName;
1293 return m_osDirection;
1305 virtual std::shared_ptr<GDALMDArray> GetIndexingVariable()
const;
1308 SetIndexingVariable(std::shared_ptr<GDALMDArray> poIndexingVariable);
1310 virtual bool Rename(
const std::string &osNewName);
1313 virtual void ParentRenamed(
const std::string &osNewParentFullName);
1315 virtual void ParentDeleted();
1320 std::string m_osName;
1321 std::string m_osFullName;
1322 std::string m_osType;
1323 std::string m_osDirection;
1326 void BaseRename(
const std::string &osNewName);
1336class CPL_DLL GDALDimensionWeakIndexingVar :
public GDALDimension
1338 std::weak_ptr<GDALMDArray> m_poIndexingVariable{};
1341 GDALDimensionWeakIndexingVar(
const std::string &osParentName,
1342 const std::string &osName,
1343 const std::string &osType,
1344 const std::string &osDirection,
GUInt64 nSize);
1346 std::shared_ptr<GDALMDArray> GetIndexingVariable()
const override;
1348 bool SetIndexingVariable(
1349 std::shared_ptr<GDALMDArray> poIndexingVariable)
override;
1351 void SetSize(
GUInt64 nNewSize);
String list class designed around our use of C "char**" string lists.
Definition cpl_string.h:476
Abstract class, implemented by GDALAttribute and GDALMDArray.
Definition gdal_multidim.h:498
const std::string & GetFullName() const
Return the name of an array or attribute.
Definition gdal_multidim.h:575
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_multidim.h:565
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_abstract_array.cpp:695
Class modeling an attribute that has a name, a value and a type, and is typically used to describe a ...
Definition gdal_multidim.h:729
A set of associated raster bands, usually from one file.
Definition gdal_dataset.h:77
Class modeling a a dimension / axis used to index multidimensional arrays.
Definition gdal_multidim.h:1242
const std::string & GetName() const
Return the name.
Definition gdal_multidim.h:1256
const std::string & GetDirection() const
Return the axis direction.
Definition gdal_multidim.h:1291
const std::string & GetFullName() const
Return the full name.
Definition gdal_multidim.h:1265
GUInt64 GetSize() const
Return the size, that is the number of values along the dimension.
Definition gdal_multidim.h:1300
const std::string & GetType() const
Return the axis type.
Definition gdal_multidim.h:1278
Class for a component of a compound extended data type.
Definition gdal_multidim.h:212
const GDALExtendedDataType & GetType() const
Return the data type of the component.
Definition gdal_multidim.h:243
size_t GetOffset() const
Return the offset (in bytes) of the component in the compound data type.
Definition gdal_multidim.h:234
const std::string & GetName() const
Return the name.
Definition gdal_multidim.h:225
GDALEDTComponent(const GDALEDTComponent &)
Copy constructor.
Class used to represent potentially complex data types.
Definition gdal_multidim.h:54
bool operator!=(const GDALExtendedDataType &other) const
Non-equality operator.
Definition gdal_multidim.h:78
GDALExtendedDataTypeSubType GetSubType() const
Return subtype.
Definition gdal_multidim.h:117
size_t GetSize() const
Return data type size in bytes.
Definition gdal_multidim.h:138
GDALExtendedDataType & operator=(GDALExtendedDataType &&)
Move assignment.
size_t GetMaxStringLength() const
Return the maximum length of a string in bytes.
Definition gdal_multidim.h:147
const GDALRasterAttributeTable * GetRAT() const
Return associated raster attribute table, when there is one.
Definition gdal_multidim.h:162
static GDALExtendedDataType Create(GDALDataType eType)
Return a new GDALExtendedDataType of class GEDTC_NUMERIC.
Definition gdalmultidim_extended_data_type.cpp:193
static GDALExtendedDataType CreateString(size_t nMaxStringLength=0, GDALExtendedDataTypeSubType eSubType=GEDTST_NONE)
Return a new GDALExtendedDataType of class GEDTC_STRING.
Definition gdalmultidim_extended_data_type.cpp:276
GDALDataType GetNumericDataType() const
Return numeric data type (only valid when GetClass() == GEDTC_NUMERIC)
Definition gdal_multidim.h:106
GDALExtendedDataType(GDALExtendedDataType &&)
Move constructor.
GDALExtendedDataTypeClass GetClass() const
Return type class.
Definition gdal_multidim.h:96
const std::vector< std::unique_ptr< GDALEDTComponent > > & GetComponents() const
Return the components of the data type (only valid when GetClass() == GEDTC_COMPOUND)
Definition gdal_multidim.h:127
const std::string & GetName() const
Return type name.
Definition gdal_multidim.h:87
Class modeling a named container of GDALAttribute, GDALMDArray, OGRLayer or other GDALGroup.
Definition gdal_multidim.h:305
const std::string & GetName() const
Return the name of the group.
Definition gdal_multidim.h:360
const std::vector< std::shared_ptr< GDALExtendedDataType > > & GetDataTypes() const
Return data types associated with the group (typically enumerations)
Definition gdal_multidim.h:381
const std::string & GetFullName() const
Return the full name of the group.
Definition gdal_multidim.h:369
Interface used to get a single GDALAttribute or a set of GDALAttribute.
Definition gdal_multidim.h:264
Class modeling a multi-dimensional array.
Definition gdal_multidim.h:852
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_multidim.h:1023
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_rasterband.h:108
Store the raw result of an attribute value, which might contain dynamically allocated structures (lik...
Definition gdal_multidim.h:664
size_t size() const
Return the size in bytes of the raw result.
Definition gdal_multidim.h:700
const GByte * data() const
Return pointer to the start of data.
Definition gdal_multidim.h:694
const GByte & operator[](size_t idx) const
Return byte at specified index.
Definition gdal_multidim.h:688
This class represents a layer of simple features, with access methods.
Definition ogrsf_frmts.h:61
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition ogr_spatialref.h:152
Various convenience functions for CPL.
CPLErr
Error category / error level.
Definition cpl_error.h:45
int GPtrDiff_t
Integer type large enough to hold the difference between 2 addresses.
Definition cpl_port.h:236
GIntBig GInt64
Signed 64 bit integer type.
Definition cpl_port.h:216
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1252
GUIntBig GUInt64
Unsigned 64 bit integer type.
Definition cpl_port.h:218
unsigned char GByte
Unsigned byte type.
Definition cpl_port.h:165
Various convenience functions for working with strings and string lists.
Public (C callable) GDAL entry points.
GDALDataType
Definition gdal.h:48
@ GDT_Float64
Definition gdal.h:60
@ GDT_Unknown
Definition gdal.h:49
GDALExtendedDataTypeClass
Enumeration giving the class of a GDALExtendedDataType.
Definition gdal.h:418
@ GEDTC_NUMERIC
Numeric value.
Definition gdal.h:420
GDALRIOResampleAlg
RasterIO() resampling method.
Definition gdal.h:137
GDALExtendedDataTypeSubType
Enumeration giving the subtype of a GDALExtendedDataType.
Definition gdal.h:431
@ GEDTST_NONE
None.
Definition gdal.h:433
GDALRWFlag
Definition gdal.h:127
Information on a raw block of a GDALMDArray.
Definition gdal.h:2886