Skip to main content

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:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cogconverter-0.2.1.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

cogconverter-0.2.1-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file cogconverter-0.2.1.tar.gz.

File metadata

  • Download URL: cogconverter-0.2.1.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for cogconverter-0.2.1.tar.gz
Algorithm Hash digest
SHA256 626dbf6c905566e732786fc087d6e47e7eea7d13c1b5366f48d868c6bcf70650
MD5 69319ccdca6c7d9849827a17ae1988f9
BLAKE2b-256 fd77d4928703d95089844a38dc1cc6c9ff81c564843cd27552812b44304a5e3d

See more details on using hashes here.

File details

Details for the file cogconverter-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: cogconverter-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for cogconverter-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 05f32dd9620161f0d65db638385a8c6e9ae539e9875c6a9c9df98c853ff37e79
MD5 fd4bdb21752e67b8f43226da875aa9df
BLAKE2b-256 f97920e76869245740adbb46e2f2f3a248fbf7a0494ea117adac6831b7dade18

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page