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

◆ check_hex()

raster2pgsql.check_hex (   hex,
  bytes_size = None 
)

Definition at line 629 of file raster2pgsql.py.

629def check_hex(hex, bytes_size = None):
630 assert hex is not None, "Error: Missing hex string"
631 size = len(hex)
632 assert size > 0, "Error: hex string is empty"
633 assert size % 2 == 0, "Error: invalid size of hex string"
634 if bytes_size is not None:
635 n = int(size / 2)
636 assert n == bytes_size, "Error: invalid number of bytes %d, expected %d" % (n, bytes_size)
637