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

Function toGdalType

pdal/private/gdal/Raster.cpp:125–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125GDALDataType toGdalType(Dimension::Type t)
126{
127 switch (t)
128 {
129 case Dimension::Type::Unsigned8:
130 case Dimension::Type::Signed8:
131 return GDT_Byte;
132 case Dimension::Type::Unsigned16:
133 return GDT_UInt16;
134 case Dimension::Type::Signed16:
135 return GDT_Int16;
136 case Dimension::Type::Unsigned32:
137 return GDT_UInt32;
138 case Dimension::Type::Signed32:
139 return GDT_Int32;
140 case Dimension::Type::Float:
141 return GDT_Float32;
142 case Dimension::Type::Double:
143 return GDT_Float64;
144 case Dimension::Type::Unsigned64:
145 case Dimension::Type::Signed64:
146 throw pdal_error("PDAL 64-bit integer type unsupported.");
147 case Dimension::Type::None:
148 throw pdal_error("PDAL 'none' type unsupported.");
149 default:
150 throw pdal_error("Unrecognized PDAL dimension type.");
151
152 }
153}
154
155} // unnamed namespace
156

Callers 1

openMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected