optTile.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:gsTiles 作者: schmidtc 项目源码 文件源码
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))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号