gdal 压缩tif_使用gdal_translate.exe压缩tiff

本文介绍了如何使用GDAL的translate工具对TIFF文件进行不同算法的压缩,包括LZW、PACKBITS和DEFLATE等,并通过实验对比了它们在文件大小和访问速度上的效果。结果显示,DEFLATE压缩与预测器结合可以达到理想的平衡,特别是当预测器设为2且ZLEVEL设为9时,能实现较小的文件体积。同时,文章提到对于16位数据,预测器2可能更为适用。
摘要由CSDN通过智能技术生成

def compressGeotiff(pythonpath,sourcepath,outputpath):

if os.path.exists(outputpath):

os.remove(outputpath)

subprocess.call([pythonpath,"-co","COMPRESS=DEFLATE",sourcepath,outputpath])

不同压缩算法比较:http://linfiniti.com/2011/05/gdal-efficiency-of-various-compression-algorithms/

GDAL: efficiency of various compression algorithms

Posted May 31, 2011 by Rudi Thiede & filed under QGIS.

Let’s say you’ve got a lot of raster files you want to host on your map server, or even just one large backdrop. I needed to do the latter, but either way, you’re faced with the same problem: how can I reduce file size and access time? Whatever else I do – such as building pyramids – my raster file is going to be compressed some way or another. I can’t very well have visitors waiting for my server to run through an elaborate (de)compression method, but neither can I store images of the

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值