26#if !defined(GDAL_TYPETRAITS_H_INCLUDED)
27#define GDAL_TYPETRAITS_H_INCLUDED
59 static constexpr size_t size =
sizeof(int8_t);
72 static constexpr size_t size =
sizeof(uint8_t);
76 static inline GDALExtendedDataType GetExtendedDataType()
85 static constexpr size_t size =
sizeof(int16_t);
89 static inline GDALExtendedDataType GetExtendedDataType()
98 static constexpr size_t size =
sizeof(uint16_t);
102 static inline GDALExtendedDataType GetExtendedDataType()
111 static constexpr size_t size =
sizeof(int32_t);
115 static inline GDALExtendedDataType GetExtendedDataType()
124 static constexpr size_t size =
sizeof(uint32_t);
128 static inline GDALExtendedDataType GetExtendedDataType()
137 static constexpr size_t size =
sizeof(int64_t);
141 static inline GDALExtendedDataType GetExtendedDataType()
150 static constexpr size_t size =
sizeof(uint64_t);
155 static inline GDALExtendedDataType GetExtendedDataType()
164 static constexpr size_t size =
sizeof(GFloat16);
169 static inline GDALExtendedDataType GetExtendedDataType()
178 static constexpr size_t size =
sizeof(float);
182 static inline GDALExtendedDataType GetExtendedDataType()
191 static constexpr size_t size =
sizeof(double);
195 static inline GDALExtendedDataType GetExtendedDataType()
204 static constexpr size_t size =
sizeof(GFloat16) * 2;
208 static inline GDALExtendedDataType GetExtendedDataType()
217 static constexpr size_t size =
sizeof(float) * 2;
221 static inline GDALExtendedDataType GetExtendedDataType()
230 static constexpr size_t size =
sizeof(double) * 2;
234 static inline GDALExtendedDataType GetExtendedDataType()
243 static constexpr size_t size = 0;
247 static inline GDALExtendedDataType GetExtendedDataType()
275 static constexpr size_t size =
sizeof(int8_t);
287 typedef uint8_t type;
288 static constexpr size_t size =
sizeof(uint8_t);
292 static inline GDALExtendedDataType GetExtendedDataType()
300 typedef int16_t type;
301 static constexpr size_t size =
sizeof(int16_t);
305 static inline GDALExtendedDataType GetExtendedDataType()
313 typedef uint16_t type;
314 static constexpr size_t size =
sizeof(uint16_t);
318 static inline GDALExtendedDataType GetExtendedDataType()
326 typedef int32_t type;
327 static constexpr size_t size =
sizeof(int32_t);
331 static inline GDALExtendedDataType GetExtendedDataType()
339 typedef uint32_t type;
340 static constexpr size_t size =
sizeof(uint32_t);
344 static inline GDALExtendedDataType GetExtendedDataType()
352 typedef int64_t type;
353 static constexpr size_t size =
sizeof(int64_t);
357 static inline GDALExtendedDataType GetExtendedDataType()
365 typedef uint64_t type;
366 static constexpr size_t size =
sizeof(uint64_t);
371 static inline GDALExtendedDataType GetExtendedDataType()
380 static constexpr size_t size =
sizeof(float);
384 static inline GDALExtendedDataType GetExtendedDataType()
393 static constexpr size_t size =
sizeof(double);
397 static inline GDALExtendedDataType GetExtendedDataType()
406 static constexpr size_t size =
sizeof(int16_t) * 2;
410 static inline GDALExtendedDataType GetExtendedDataType()
419 static constexpr size_t size =
sizeof(int32_t) * 2;
423 static inline GDALExtendedDataType GetExtendedDataType()
431 typedef std::complex<float> type;
432 static constexpr size_t size =
sizeof(float) * 2;
436 static inline GDALExtendedDataType GetExtendedDataType()
444 typedef std::complex<double> type;
445 static constexpr size_t size =
sizeof(double) * 2;
449 static inline GDALExtendedDataType GetExtendedDataType()
506inline OGRFieldType GetOGRFieldType(
const GDALExtendedDataType &oEDT)
Class used to represent potentially complex data types.
Definition gdal_multidim.h:54
static GDALExtendedDataType Create(GDALDataType eType)
Return a new GDALExtendedDataType of class GEDTC_NUMERIC.
Definition gdalmultidim.cpp:10685
static GDALExtendedDataType CreateString(size_t nMaxStringLength=0, GDALExtendedDataTypeSubType eSubType=GEDTST_NONE)
Return a new GDALExtendedDataType of class GEDTC_STRING.
Definition gdalmultidim.cpp:10768
GDALDataType GetNumericDataType() const
Return numeric data type (only valid when GetClass() == GEDTC_NUMERIC).
Definition gdal_multidim.h:106
GDALExtendedDataTypeClass GetClass() const
Return type class.
Definition gdal_multidim.h:96
GDALDataType
Definition gdal.h:48
@ GDT_UInt32
Definition gdal.h:54
@ GDT_UInt64
Definition gdal.h:56
@ GDT_CInt32
Definition gdal.h:62
@ GDT_Int64
Definition gdal.h:57
@ GDT_Byte
Definition gdal.h:50
@ GDT_Int8
Definition gdal.h:51
@ GDT_CFloat32
Definition gdal.h:65
@ GDT_CFloat64
Definition gdal.h:66
@ GDT_CFloat16
Definition gdal.h:64
@ GDT_Float64
Definition gdal.h:60
@ GDT_Float16
Definition gdal.h:58
@ GDT_UInt16
Definition gdal.h:52
@ GDT_Int16
Definition gdal.h:53
@ GDT_CInt16
Definition gdal.h:61
@ GDT_Int32
Definition gdal.h:55
@ GDT_Unknown
Definition gdal.h:49
@ GDT_Float32
Definition gdal.h:59
@ GEDTC_STRING
String value.
Definition gdal.h:396
@ GEDTC_NUMERIC
Numeric value.
Definition gdal.h:394
This file is legacy since GDAL 3.12, but will be kept at least in the whole GDAL 3....
OGRFieldSubType
List of field subtypes.
Definition ogr_core.h:799
@ OFSTInt16
Signed 16-bit integer.
Definition ogr_core.h:804
@ OFSTNone
No subtype.
Definition ogr_core.h:800
@ OFSTFloat32
Single precision (32 bit) floating point.
Definition ogr_core.h:807
OGRFieldType
List of feature field types.
Definition ogr_core.h:772
@ OFTInteger
Single signed 32bit integer.
Definition ogr_core.h:773
@ OFTString
String of ASCII chars.
Definition ogr_core.h:777
@ OFTReal
Double Precision floating point.
Definition ogr_core.h:775
@ OFTInteger64
Single signed 64bit integer.
Definition ogr_core.h:785
Trait accepting a C++ type ([u]int[8/16/32/64], float, double, std::complex<float>,...
Definition gdal_typetraits.h:52
Trait accepting a GDALDataType and mapping it to corresponding C++ type and OGRFieldType.
Definition gdal_typetraits.h:268