This package wraps around the native GDAL library which enables Cloud Optimized GeoTiffs generation at ease into your Python projects.
Project description
Cloud Optimized GeoTiff Generator
Overview
This package wrapped around the native GDAL library enables Cloud Optimized GeoTiffs generation at ease into your Python projects.
Installation
You can install the package via pip:
pip install cog_generation
To generate a cog:
from cog_generator import generate_cog
input_tif_list = ["sample1.tif", "sample2.tif"]
output_tif_path = "output_cog.tif"
options = {"compress": "lzw", "level": 9}
message, status_code = generate_cog(input_tif_list, output_tif_path, options)
Parameters available for options
-
compress: Defaults to
lzw. Options includenone,lzw,jpeg,deflate,zstd,webp,lerc,lerc_deflate,lerc_zstd,lzma. -
level: Defaults to
6for DEFLATE/LZMA,9for ZSTD. Compression level options depend on the compression type. Lower values result in faster compression but less efficient compression rate. 1 is the fastest. -
QUALITY: Defaults to
75. JPEG/WEBP quality setting. For WEBP,QUALITY=100automatically turns on lossless mode. -
num_threads: Defaults to
all_cpus. Enable multi-threaded compression by specifying the number of worker threads. -
PREDICTOR: Defaults to
NO. Set the predictor for LZW, DEFLATE, and ZSTD compression. -
bigtiff: Defaults to
IF_NEEDED. Control whether the created file is a BigTIFF or a classic TIFF. -
zoom_level: (GDAL >= 3.5) Zoom level number (starting at 0 for coarsest zoom level).
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cog_generator-0.0.1.tar.gz.
File metadata
- Download URL: cog_generator-0.0.1.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7b3af0072fb891f0cddfa291bac8d5baf206f637ab5c24c81c5e3c05fa5a676
|
|
| MD5 |
566ab0ab8a3f01898410173a8bf5bcc1
|
|
| BLAKE2b-256 |
a8669b603c321e279f454c40da85b964031349faf6a697690371485317a566a7
|
File details
Details for the file cog_generator-0.0.1-py3-none-any.whl.
File metadata
- Download URL: cog_generator-0.0.1-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75988bef2d7456ab348c5eafd50da67623401cbeebcb2aba5d89bad80d2ebc11
|
|
| MD5 |
90e264ed8592bfb741eecabbffdb2339
|
|
| BLAKE2b-256 |
46cd0ff389872784dbbc45bafbd7cfebba5e687ba477c946a223c82e7da7cd52
|