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

◆ pt2fmt()

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

Definition at line 245 of file raster2pgsql.py.

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