def __call__(self):
if self.maxID < 2**16:
dtype = 'uint16' #UNSIGNED_ITEM_TYPES[2] #UNSIGNED_2_BYTE_INT
DTYPE = '\x00'
else:
dtype = 'uint32' #UNSIGNED_ITEM_TYPES[4] #UNSIGNED_4_BYTE_INT
DTYPE = '\x01'
a = self.intRaster.astype(dtype)
#return SYSTEM_BYTEORDER+DTYPE+zlib.compress(a.tostring())
return SYSTEM_BYTEORDER+DTYPE+zlib.compress(numpy.getbuffer(a))
评论列表
文章目录