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

◆ fmt2printfmt()

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

Definition at line 259 of file raster2pgsql.py.

259def fmt2printfmt(fmt):
260 """Returns printf-like formatter for given binary data type specifier."""
261 fmttypes = {
262 'B': '%d', # PT_8BUI
263 'h': '%d', # PT_16BSI
264 'H': '%d', # PT_16BUI
265 'i': '%d', # PT_32BSI
266 'I': '%d', # PT_32BUI
267 'f': '%.15f', # PT_32BF
268 'd': '%.15f', # PT_64BF
269 's': '%s'
270 }
271 return fmttypes.get(fmt, 'f')
272