PostGIS  2.1.10dev-r@@SVN_REVISION@@
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 264 of file rt_api.c.

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

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

264  {
265  switch (gdt) {
266  case GDT_Byte:
267  return PT_8BUI;
268  case GDT_UInt16:
269  return PT_16BUI;
270  case GDT_Int16:
271  return PT_16BSI;
272  case GDT_UInt32:
273  return PT_32BUI;
274  case GDT_Int32:
275  return PT_32BSI;
276  case GDT_Float32:
277  return PT_32BF;
278  case GDT_Float64:
279  return PT_64BF;
280  default:
281  return PT_END;
282  }
283 
284  return PT_END;
285 }
Definition: rt_api.h:184

Here is the caller graph for this function: