PostGIS 3.0.6dev-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 155 of file rt_util.c.

155 {
156 switch (gdt) {
157 case GDT_Byte:
158 return PT_8BUI;
159 case GDT_UInt16:
160 return PT_16BUI;
161 case GDT_Int16:
162 return PT_16BSI;
163 case GDT_UInt32:
164 return PT_32BUI;
165 case GDT_Int32:
166 return PT_32BSI;
167 case GDT_Float32:
168 return PT_32BF;
169 case GDT_Float64:
170 return PT_64BF;
171 default:
172 return PT_END;
173 }
174
175 return PT_END;
176}
@ PT_32BUI
Definition librtcore.h:194
@ PT_32BSI
Definition librtcore.h:193
@ PT_END
Definition librtcore.h:197
@ PT_32BF
Definition librtcore.h:195
@ PT_16BUI
Definition librtcore.h:192
@ PT_16BSI
Definition librtcore.h:191
@ PT_64BF
Definition librtcore.h:196
@ PT_8BUI
Definition librtcore.h:190

References PT_16BSI, PT_16BUI, PT_32BF, PT_32BSI, PT_32BUI, PT_64BF, 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: