云优化geotiff实用工具。
cogeotiff的Python项目详细描述
##云优化geotiff实用工具
创建COG文件
示例:
``python
from cogeotiff.cog import create_cog
src_path='~/path_to_image/test.tif'
dest_path='~/path_to_save/test.tiff.cog'
create_cog(src_path,dest_path,compress='jpeg')
```
2。验证COG文件
`` python
来自COGEOTIFF。验证COGEOTIFF导入验证COG
COG PATH='~/path_to_cog.tif.cog'
结果=验证COG(COG路径)
```
创建COG文件默认值:0 < < -块大小的整数平铺大小,默认值:512 < <压缩文本压缩方法:JPEG,原始,压缩,LZW,0,0,0,0,0,默认值:原始值> >帮助显示此消息并退出。2。验证COG文件
``bash
用法:cog create[options]cog廑path
````
q&a
-q:为什么不在脚本中使用“gdal buildoverviews”或“rasterio”?
-a:因为对于100gb这样的大文件,生成概述并转换为平铺的geotiff需要很长时间。infomataion使用“rasterio”或“gdal buildoverviews”方法没有任何进展。
-q:为什么不使用[rio cogeo](https://github.com/cogeotiff/rio cogeo)?
-a:因为它使用“rasterio memory file()”,当文件太大时,将导致内存不足。
创建COG文件
示例:
``python
from cogeotiff.cog import create_cog
src_path='~/path_to_image/test.tif'
dest_path='~/path_to_save/test.tiff.cog'
create_cog(src_path,dest_path,compress='jpeg')
```
2。验证COG文件
`` python
来自COGEOTIFF。验证COGEOTIFF导入验证COG
COG PATH='~/path_to_cog.tif.cog'
结果=验证COG(COG路径)
```
创建COG文件默认值:0 < < -块大小的整数平铺大小,默认值:512 < <压缩文本压缩方法:JPEG,原始,压缩,LZW,0,0,0,0,0,默认值:原始值> >帮助显示此消息并退出。2。验证COG文件
``bash
用法:cog create[options]cog廑path
````
q&a
-q:为什么不在脚本中使用“gdal buildoverviews”或“rasterio”?
-a:因为对于100gb这样的大文件,生成概述并转换为平铺的geotiff需要很长时间。infomataion使用“rasterio”或“gdal buildoverviews”方法没有任何进展。
-q:为什么不使用[rio cogeo](https://github.com/cogeotiff/rio cogeo)?
-a:因为它使用“rasterio memory file()”,当文件太大时,将导致内存不足。