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

◆ pt2fmt()

raster2pgsql.pt2fmt (   pt)
Returns binary data type specifier for given pixel type.

Definition at line 244 of file raster2pgsql.py.

244def pt2fmt(pt):
245 """Returns binary data type specifier for given pixel type."""
246 fmttypes = {
247 4: 'B', # PT_8BUI
248 5: 'h', # PT_16BSI
249 6: 'H', # PT_16BUI
250 7: 'i', # PT_32BSI
251 8: 'I', # PT_32BUI
252 10: 'f', # PT_32BF
253 11: 'd' # PT_64BF
254 }
255 return fmttypes.get(pt, 'x')
256
257