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
It will validate tiff for COG format.
It has the actual converter function which converts tifs into COG format
- Multi-core processing for faster results.
- 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()