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

◆ pt2fmt()

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

Definition at line 250 of file raster2pgsql.py.

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