Skip to main content

Introduction

It validates the TIF and convert it into COG compliant using gdal. Following are the Use-Cases kept in mind while designing:

  1. Large TIF that cannot be fit into memory

  2. Reading data block by block, so can be run of even low memory server

  3. Supports Multiband TIFs

  4. 3-4 Band uint8 TIF (Orthomosaic)

  5. Building pyramids if not available (This will improve rendering speed)

  6. Compressing data

  7. Compressing to the same compression format as the original TIF. If original TIF was not compressed then LZW lossless compression is used to compress.

  8. 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

  1. Multi-core processing for faster results.

How to Run

  1. 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()

Release files for cogconverter 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cogconverter 0.2.2
File Size Uploaded
cogconverter-0.2.2.tar.gz 11.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cogconverter 0.2.2
File Interpreter ABI Platform
cogconverter-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 24.6 kB

Release files / cogconverter-0.2.2.tar.gz

Download URL cogconverter-0.2.2.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f451306dfe6328e32c17505649c69658b0ce310ba7aa3558df4b25ee53eb68df
BLAKE2b-256 checksum
How to use checksums
41ccf4cf23809d2b4bafef37c31c9ecba3e49ff12432e866ee2268c3856b0965
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

Release files / cogconverter-0.2.2-py3-none-any.whl

Download URL cogconverter-0.2.2-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65e48ae7af485dcad47ec2fb560d6fa58e5ca8af4114de69541c48702bec8c3e
BLAKE2b-256 checksum
How to use checksums
0a478cb5b853db232ccfc956d2c31f4e1d2f065dcc39e68f84b225df67a950a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page