Skip to main content

No project description provided

Project description

async-tiff

PyPI

Fast, low-level async TIFF reader for Python.

This documentation is for the Python bindings. Refer here for the Rust crate documentation.

For a higher-level API to read GeoTIFF files, visit async-geotiff.

Examples

Reading NAIP

from async_tiff import TIFF
from async_tiff.store import S3Store

# You'll also need to provide credentials to access a requester pays bucket
store = S3Store("naip-visualization", region="us-west-2", request_payer=True)
path = "ny/2022/60cm/rgb/40073/m_4007307_sw_18_060_20220803.tif"

tiff = await TIFF.open(path, store=store)
primary_ifd = tiff.ifds[0]

primary_ifd.geo_key_directory.citation
# 'NAD83 / UTM zone 18N'

primary_ifd.geo_key_directory.projected_type
# 26918
# (EPSG code)

primary_ifd.sample_format
# [<SampleFormat.Uint: 1>, <SampleFormat.Uint: 1>, <SampleFormat.Uint: 1>]

primary_ifd.bits_per_sample
# [8, 8, 8]

tile = await tiff.fetch_tile(0, 0, 4)
array = await tile.decode()

# Use rasterio and matplotlib for visualization
import numpy as np
from rasterio.plot import reshape_as_raster, show

# Zero-copy conversion of the rust array into a numpy array
np_array = np.asarray(array)

# Then we need to reshape the "image" axes into "raster" axes
# https://rasterio.readthedocs.io/en/stable/topics/image_processing.html
show(reshape_as_raster(np_array), adjust=True)

Reading Sentinel 2 L2A

import numpy as np
from async_tiff import TIFF
from async_tiff.store import S3Store

store = S3Store("sentinel-cogs", region="us-west-2", skip_signature=True)
path = "sentinel-s2-l2a-cogs/12/S/UF/2022/6/S2B_12SUF_20220609_0_L2A/B04.tif"

tiff = await TIFF.open(path, store=store)
primary_ifd = tiff.ifds[0]
# Text readable citation
primary_ifd.geo_key_directory.citation
# EPSG code
primary_ifd.geo_key_directory.projected_type

primary_ifd.sample_format[0]
# <SampleFormat.Uint: 1>
primary_ifd.bits_per_sample[0]
# 16

tile = await tiff.fetch_tile(0, 0, 0)
array = await tile.decode()

# Zero-copy conversion of the rust array into a numpy array
np_array = np.asarray(array)
np_array.shape
# (1024, 1024, 1)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

async_tiff-0.7.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl (4.5 MB view details)

Uploaded PyPymusllinux: musl 1.2+ x86-64

async_tiff-0.7.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl (4.2 MB view details)

Uploaded PyPymusllinux: musl 1.2+ i686

async_tiff-0.7.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl (4.3 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ x86-64

async_tiff-0.7.0-pp311-pypy311_pp73-manylinux_2_28_i686.whl (4.2 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ i686

async_tiff-0.7.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl (4.1 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ ARM64

async_tiff-0.7.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded PyPymacOS 11.0+ ARM64

async_tiff-0.7.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl (4.1 MB view details)

Uploaded PyPymacOS 10.12+ x86-64

async_tiff-0.7.0-cp311-abi3-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.11+Windows x86-64

async_tiff-0.7.0-cp311-abi3-musllinux_1_2_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ x86-64

async_tiff-0.7.0-cp311-abi3-musllinux_1_2_i686.whl (4.2 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ i686

async_tiff-0.7.0-cp311-abi3-manylinux_2_28_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ x86-64

async_tiff-0.7.0-cp311-abi3-manylinux_2_28_i686.whl (4.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ i686

async_tiff-0.7.0-cp311-abi3-manylinux_2_28_aarch64.whl (4.1 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

async_tiff-0.7.0-cp311-abi3-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

async_tiff-0.7.0-cp311-abi3-macosx_10_12_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

async_tiff-0.7.0-cp310-cp310-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.10Windows x86-64

async_tiff-0.7.0-cp310-cp310-musllinux_1_2_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

async_tiff-0.7.0-cp310-cp310-musllinux_1_2_i686.whl (4.2 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ i686

async_tiff-0.7.0-cp310-cp310-manylinux_2_28_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

async_tiff-0.7.0-cp310-cp310-manylinux_2_28_i686.whl (4.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ i686

async_tiff-0.7.0-cp310-cp310-manylinux_2_28_aarch64.whl (4.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

async_tiff-0.7.0-cp310-cp310-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

async_tiff-0.7.0-cp310-cp310-macosx_10_12_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file async_tiff-0.7.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3e54670934f88e730433c4bd802439805c28152df8ee4ae7df7e5dc36c4b5944
MD5 235d07c885f51cc208b45ab437a58cc0
BLAKE2b-256 034050fb8ede114c44eb05b467d508c7d61bbe70f0425c141fc0b08e34944ebe

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 b2c7652467f187689675474c953488485d712b2c3cf4bbb98016fcf2f2a95804
MD5 f0c596d79b9f8108a2b29a5eabd90f66
BLAKE2b-256 0aa11ee3b888772c28df8902665c8147385ff8110da88cfd1e0c02bc082843a2

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a18b8ca49d697ad4d014be2d3274241f63b4fe9cc12c3fb5595d3c8003194c6e
MD5 fe841e63c2f190aa15a8915bc08aec42
BLAKE2b-256 f4f9e82c5cbe73ede031b2ca4dbd88856fdca9660c8d727560b6240630fa9da6

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-pp311-pypy311_pp73-manylinux_2_28_i686.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-pp311-pypy311_pp73-manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 e59966d16409302434f2f38f6ef0b0f6c04400e4ca9113243ade65c9d024ab8c
MD5 3985aeca413a19577f941e4b9e3d6832
BLAKE2b-256 b057e656f488cef397e611f691c28cbd93a4ff53d4afa3e621f6cf48461dcf46

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 02b5a351227a4bb86c4e0d2cd0a9d96d57a8289442a1d56fb34ab332e586e607
MD5 65bc41bb11e462a6931bfe5d4ebd49c3
BLAKE2b-256 928da0fc193eaf7d10085fc65d9b0694a77f1040f7e14def7dda34f73bec315b

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76dc7dd7d60371c4884f35d1e7ec54d344dcae16ef9417585d10b8a1102a5a66
MD5 03b0490c2f12c7c2a224f5bee14c227c
BLAKE2b-256 aba73accc40d440b7cf7bdc7e3d49a98a47ef510857830edf18e8d74908a3912

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 778930c050f9afa4432732a1172102696c072149a4e619fd497a2075d2008baa
MD5 50c5b959da8e2c92e3c0198d88dca2e5
BLAKE2b-256 256f27b2040b974e191bdc28fd6e17fa2a001f6e4e68b21546b61c3073d5091c

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: async_tiff-0.7.0-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.1 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for async_tiff-0.7.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 1ce3dcc3c4f9965e850a5427432fd1eea1fa9c4448e8453b556a6e9f118fd51b
MD5 e6cd5f50aa1d2b09895c0a47e7b63a8c
BLAKE2b-256 6ea0a49020134f3c8f9d974fc3143c66afe9e1320a369828973434026362d1c0

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp311-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 44d9d607f003ae6726baf1d3996f76e65ffb5ec4415836b654e5327cb8e9dfcd
MD5 ceba8f4ca248d27914ade1c440969a09
BLAKE2b-256 e83821bed394bb7022d55cbe4b938e4c13f3c1f421a76d3571934e6afb92ab8b

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp311-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-cp311-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 25d8d92f8704a82085e17adc8d588669c24d3e02b0249f715b4b04bbbc74e632
MD5 7e7071dfb3319833ec1ea0dc06501de5
BLAKE2b-256 e94a0780e3a0d406b084ab3e1c79b27f231ef64fe2ddd935e63f1325f68b6d0a

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 960a2dfe71b4f5d99fe5e530d4d30f90e14410860fbfbe19e23ea5a3e32d70cc
MD5 d35509a99b75637fbc318f78215ce602
BLAKE2b-256 191a51311cc9dab8a2a3722d2fd4099363d83abc4891f1ddbe0415f18174e702

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp311-abi3-manylinux_2_28_i686.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-cp311-abi3-manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 2a9c46292d1874c2aabc0f8c76bbcdeb74043f98296e6c50c2ea53c14d0fc023
MD5 b147e6108dfc9cb037cdb5ef56b8c67f
BLAKE2b-256 c6bab6b84d87f9d4970e325ccadd2a976f5c143da1e03bbda7cb28ab8a83d478

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2953aa02f79b046455526aa8f52e0e8dcf5c1a7a702fc830da163a68a4840577
MD5 e4560d6697d804e3c86cc0ccc160619f
BLAKE2b-256 f501000364b81f67b126e080e955ebb1d4267f438a925a356a7a09ce3b495705

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 77ef4c8cb78fbe58c3e1db5449ed67d6b17d3c91bd6a6fdb8cf436d40ca15a01
MD5 48d48d866f0c7520b63144cc6cfcb42d
BLAKE2b-256 45235364c7119037ecd9d9cf78d1a1b3cbfcdf0458a2575504ca7062f0b14d31

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 839c2d2d9d4601cc60f0464277496a973e01ef49b83f8ed54fa71198ff8ed804
MD5 7510481a94b73c4db29ea6a0fea6998e
BLAKE2b-256 7c7aff9e1887b4090132c7942ec097e0718c836261ed7f97ebf3e3b7bc750709

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: async_tiff-0.7.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 4.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for async_tiff-0.7.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fcb609e5b5307a494c099d9ccb3df57f0a3964d2bab91f65c9a07e66c9a4876a
MD5 590e0ab7964212e56d164c632b89adfd
BLAKE2b-256 ac891400825c489cf208b9b1016cabf94ea3c96f58ad09ac80cd14eca164ea87

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 94697ffc9d59841a60ba0d312233ef8ef8e2066f4a7f75ae7d7747e1b64751ad
MD5 b2e4da9746bcf9283fa99acd9b78331f
BLAKE2b-256 42bc8594c0a80578ff50aa702f59079ddaeba49d3459fd01f8d8ac8bd62661fc

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp310-cp310-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-cp310-cp310-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 d34446ead7514f9adccdffc1a7b92350ffe80fab72c0376afe37555d80466614
MD5 43094fe44f2a399b3db294740e672327
BLAKE2b-256 c5c3501ad8180373d9a20468acfe592b1ae90849f4361b67de99dbe378748e28

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d7781bfcc2e9d9696fa1694062bcb086edb723f5187f4946d4a6fc90c85b5f9f
MD5 b3e556d27b76e0dd92bde18563d5ac27
BLAKE2b-256 147c47f5a24151302fca9424672c79e94c08b50c122892f5699d8eb677d40e3b

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp310-cp310-manylinux_2_28_i686.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-cp310-cp310-manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 98b5ca02d5691d2bc9802efee232f7a0ec726aace3205734f54f3060a3c9816d
MD5 44b8bb3245fe30f516ce538eedde6d13
BLAKE2b-256 17612fe7ed19532c3997cb37614be6645bdeaa3eba504aa7915f53ca4cc75e3f

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c83a04c90cd1049a86980f0dd9408370a4485c1bd0d5ef056cfb224bed82e3ec
MD5 794392ab548c2a67b9ecf1d946ac4474
BLAKE2b-256 53b7df3080d965a71a6f2cc3bf88d1b8240b1b1504d50725007a5f3b009f99a5

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b93c128b21ed28b420a026f3c5932c9ae34bb07a96d7ccae86af5db31f952d58
MD5 dd9a2c7a5196e4ef36c88038e1052759
BLAKE2b-256 73529ef9e3f38640c6282c7f5748c613ee1b9eaf1db5de924fd0766b3b75b04e

See more details on using hashes here.

File details

Details for the file async_tiff-0.7.0-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.7.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 457449082679e1c73463b4e978e43e07ff7e2c0462fc866b2f64550846cbf726
MD5 75f44e49465ffe48ff46925b6a2fdb35
BLAKE2b-256 396a1599c3ecc633c571b7ff790f8faa00af37750ce7a2ff1485c04b7ed03483

See more details on using hashes here.

Supported by

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