Utility to convert raster dataset to Cloud Optimized GeoTIFFs
Project description
Introduction
It validates the TIF and convert it into COG compliant using gdal. Following are the Use-Cases kept in mind while designing:
Large TIF that cannot be fit into memory
Reading data block by block, so can be run of even low memory server
Supports Multiband TIFs
3-4 Band uint8 TIF (Orthomosaic)
Building pyramids if not available (This will improve rendering speed)
Compressing data
Compressing to the same compression format as the original TIF. If original TIF was not compressed then LZW lossless compression is used to compress.
Tile whole into 256x256 smaller blocks internally
Validator.py
It will validate tiff for COG format.
Converter.py
It has the actual converter function which converts tifs into COG format
To-Do
Multi-core processing for faster results.
How to Run
Inside python console
import cogconverter as cog import gdal path_tif = 'sentinel2.tif' path_output = 'sentinel2_cog.tif' ds = gdal.Open(path) ds = cog.converter.convert2blocksize(ds, path_output) ds.FlushCache()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cogconverter-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3a753d52851bd65dcd924be3b73ca33be259425b3e78949e6c556fa1d191d04 |
|
MD5 | c00055370343c42e6d5a09407c6f25dd |
|
BLAKE2b-256 | 425b9147f2b56f0a6c09b8ff49164b3821cedf4b5c699c3701a968341341dda5 |