MCPcopy Create free account
hub / github.com/PDAL/PDAL / toPdalType

Function toPdalType

pdal/private/gdal/Raster.cpp:66–83  ·  view source on GitHub ↗

Convert a GDAL type string to a PDAL dimension type. \param gdalType String representing the GDAL type. \return PDAL type associated with \gdalType. */

Source from the content-addressed store, hash-verified

64 \return PDAL type associated with \gdalType.
65*/
66Dimension::Type toPdalType(const std::string& gdalType)
67{
68 if (gdalType == "Byte")
69 return Dimension::Type::Unsigned8;
70 else if (gdalType == "UInt16")
71 return Dimension::Type::Unsigned16;
72 else if (gdalType == "Int16")
73 return Dimension::Type::Signed16;
74 else if (gdalType == "UInt32")
75 return Dimension::Type::Unsigned32;
76 else if (gdalType == "Int32")
77 return Dimension::Type::Signed32;
78 else if (gdalType == "Float32")
79 return Dimension::Type::Float;
80 else if (gdalType == "Float64")
81 return Dimension::Type::Double;
82 return Dimension::Type::None;
83}
84
85Dimension::Type toPdalType(GDALDataType t)
86{

Callers 2

validateTypeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected