PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ rt_util_gdal_datatype_to_pixtype()

rt_pixtype rt_util_gdal_datatype_to_pixtype ( GDALDataType  gdt)

Convert GDALDataType to rt_pixtype.

Parameters
gdt: GDAL datatype to convert
Returns
valid rt_pixtype

Definition at line 255 of file rt_util.c.

255 {
256 switch (gdt) {
257 case GDT_Byte:
258 return PT_8BUI;
259#if POSTGIS_GDAL_VERSION >= 30700
260 case GDT_Int8:
261 return PT_8BSI;
262#endif
263 case GDT_UInt16:
264 return PT_16BUI;
265 case GDT_Int16:
266 return PT_16BSI;
267 case GDT_UInt32:
268 return PT_32BUI;
269 case GDT_Int32:
270 return PT_32BSI;
271 case GDT_Float32:
272 return PT_32BF;
273 case GDT_Float64:
274 return PT_64BF;
275#if POSTGIS_GDAL_VERSION >= 31100 && defined(GDT_Float16)
276 case GDT_Float16:
277 return PT_16BF;
278#endif
279 default:
280 return PT_END;
281 }
282
283 return PT_END;
284}
@ PT_32BUI
Definition librtcore.h:197
@ PT_16BF
Definition librtcore.h:198
@ PT_32BSI
Definition librtcore.h:196
@ PT_END
Definition librtcore.h:201
@ PT_32BF
Definition librtcore.h:199
@ PT_16BUI
Definition librtcore.h:195
@ PT_8BSI
Definition librtcore.h:192
@ PT_16BSI
Definition librtcore.h:194
@ PT_64BF
Definition librtcore.h:200
@ PT_8BUI
Definition librtcore.h:193

References PT_16BF, PT_16BSI, PT_16BUI, PT_32BF, PT_32BSI, PT_32BUI, PT_64BF, PT_8BSI, PT_8BUI, and PT_END.

Referenced by convert_raster(), rt_band_new_offline_from_path(), and rt_raster_from_gdal_dataset().

Here is the caller graph for this function: