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

◆ fmt2printfmt()

raster2pgsql.fmt2printfmt (   fmt)
Returns printf-like formatter for given binary data type specifier.

Definition at line 265 of file raster2pgsql.py.

265def fmt2printfmt(fmt):
266 """Returns printf-like formatter for given binary data type specifier."""
267 fmttypes = {
268 'B': '%d', # PT_8BUI
269 'h': '%d', # PT_16BSI
270 'H': '%d', # PT_16BUI
271 'i': '%d', # PT_32BSI
272 'I': '%d', # PT_32BUI
273 'e': '%.8f', # PT_16BF
274 'f': '%.15f', # PT_32BF
275 'd': '%.15f', # PT_64BF
276 's': '%s'
277 }
278 return fmttypes.get(fmt, 'f')
279