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.6.0b2-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl (11.0 MB view details)

Uploaded PyPymusllinux: musl 1.2+ x86-64

async_tiff-0.6.0b2-pp311-pypy311_pp73-musllinux_1_2_i686.whl (10.6 MB view details)

Uploaded PyPymusllinux: musl 1.2+ i686

async_tiff-0.6.0b2-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl (10.5 MB view details)

Uploaded PyPymusllinux: musl 1.2+ ARM64

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

Uploaded PyPymanylinux: glibc 2.28+ x86-64

async_tiff-0.6.0b2-pp311-pypy311_pp73-manylinux_2_28_i686.whl (4.1 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ i686

async_tiff-0.6.0b2-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl (4.0 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ ARM64

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

Uploaded PyPymacOS 11.0+ ARM64

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

Uploaded PyPymacOS 10.12+ x86-64

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

Uploaded CPython 3.11+Windows x86-64

async_tiff-0.6.0b2-cp311-abi3-musllinux_1_2_x86_64.whl (11.0 MB view details)

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

async_tiff-0.6.0b2-cp311-abi3-musllinux_1_2_i686.whl (10.6 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ i686

async_tiff-0.6.0b2-cp311-abi3-musllinux_1_2_aarch64.whl (10.5 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ ARM64

async_tiff-0.6.0b2-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.6.0b2-cp311-abi3-manylinux_2_28_i686.whl (4.1 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ i686

async_tiff-0.6.0b2-cp311-abi3-manylinux_2_28_aarch64.whl (4.0 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11+macOS 11.0+ ARM64

async_tiff-0.6.0b2-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.6.0b2-cp310-cp310-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.10Windows x86-64

async_tiff-0.6.0b2-cp310-cp310-musllinux_1_2_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

async_tiff-0.6.0b2-cp310-cp310-musllinux_1_2_i686.whl (10.6 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ i686

async_tiff-0.6.0b2-cp310-cp310-musllinux_1_2_aarch64.whl (10.5 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ ARM64

async_tiff-0.6.0b2-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.6.0b2-cp310-cp310-manylinux_2_28_i686.whl (4.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ i686

async_tiff-0.6.0b2-cp310-cp310-manylinux_2_28_aarch64.whl (4.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

async_tiff-0.6.0b2-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.6.0b2-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 868b2cf338e153c790f3b7e5d926f69232a89edd1d5522eb806a7c63a923963b
MD5 6258724eecdd9c7d8307275d95d2fd15
BLAKE2b-256 53b37a4f89c2305936a0529f6be1732dc7fafc917422887cf9cc081f568cdf15

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-pp311-pypy311_pp73-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-pp311-pypy311_pp73-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 080b1e75addced3beabff48cdb544bd1fd660383f1f847100366978948b86010
MD5 f30e689b802dfc4239b52bd0bcc182aa
BLAKE2b-256 022090a7c4179813c74fac31ba562746f12ef2b6bf76b665c325c1290fc446ed

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 2eaf505515960bd956f64eeaab04943b83569c8106721075c0794e1902670bc0
MD5 60e0810d5b5c24c16ae91384b12ece6b
BLAKE2b-256 751046a5fef90e41cfeeab838317d611f2bcf120e5f0e8b8fe8fe81f890a2b51

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0bdbfce85f4866af1ac8ca90e4a386b7865821061e98831d5bafff7f9d80f9a3
MD5 193dfed172535241acea118a9e49a9ae
BLAKE2b-256 21f17327571e09c085ae895e7cc14072b4fa6d29f4f8c7c718973f34b111507b

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-pp311-pypy311_pp73-manylinux_2_28_i686.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-pp311-pypy311_pp73-manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 7e4bde0bb610b95cbe7f5296f537c8d18b977b2c50f2b58a77fb9a4e0938afad
MD5 c36091f269d8fcd047bf169b39319536
BLAKE2b-256 926a29cd386e33b4dc8cc5a8dac82a5c283949cf98c37e4dfb69d0920156969c

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 317ec3ed1a659cbbd5ce3f12c7a7de4e50203d2c6fdebe2b0a89340718f6d720
MD5 3f0885d82dc57fee47671cde3f3e0199
BLAKE2b-256 8c85318d22c9193e145148ae8db2946e9f762da3173f12efd7a0cdfa816d9b49

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-pp311-pypy311_pp73-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-pp311-pypy311_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9e4769c1b21a2fd2757c0756109a78707c21de71b5508720c24ff73c3527922c
MD5 0aa9fa2ceec0e9413c386526ede771f3
BLAKE2b-256 bd29366c87045e4ac6671e18950b3751316d49a4dd72fe7d7f09d50ec3ec8da4

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-pp311-pypy311_pp73-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-pp311-pypy311_pp73-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 30e4d754e0a11d9e995574fb325bc1188bc36a4b28b34a0e42805b083873c9c7
MD5 a6beced466764cae611f31afbde60104
BLAKE2b-256 3d8c006c93e53f394b95a803cfb159247751a1d029f1e5561a57dc01ee738baf

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp311-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 61591ea4dba300adab9c5937941ee8dcf2f60c608becc69fcb5dba7982e88989
MD5 7f51bbab437d4321441622b17e862b17
BLAKE2b-256 86e5344c16b9be995a2df2829a1530b6923fc921097be58e72d9b5631bd2f0f1

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp311-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9e4da0b436caa41170a275e79a75d83c4d9c8540c313e5ff48d5715f6b905008
MD5 f79924c75815d50fc24e15509cc8ba25
BLAKE2b-256 ecd3b487931478d6d7acf682cc8fc793b06ce84cbd7e89e596638864318b07c2

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp311-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp311-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 62cf239a21a10a4fe551573eba48f3f71477b13053d48edd60f3e9c3680d7b3e
MD5 5a6f63678e04d75d5660f0437bb3fd59
BLAKE2b-256 fb97a2dca5123d135cb8fd00a85022f98abb24f7c3886820b6443b71ea655f81

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp311-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 81fe9ccba87d85cfad2d1309349c7838a1aa45394bd85cebf41a7603802b93e1
MD5 09b6659df4bbe8481e61350191d11031
BLAKE2b-256 e505a941244ddcd6fc533bdd3a80887ee68bf536a940cab080a1f4fe44b4f6b7

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7bb43acf0815f4f2f01b65b95b0e5e88ce436d72df86d27251b149caa6d6a2a9
MD5 454855b31d215ee55a44df55ffe70619
BLAKE2b-256 c3a6a14c736e67a69ba922416527b4fd07dda0c577826180a115cd7788fe5158

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp311-abi3-manylinux_2_28_i686.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp311-abi3-manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 29ea5b370460904ef333abf6358de6210665534b7c23f952354957ebfa14baf2
MD5 8bb31a87099e0470bc13454e2c5f84ef
BLAKE2b-256 ed91fee5fded863c7468705c3980367b909ba79b1fb2182f6898ca4a08da6693

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c717a7498e5b47e5e58c569bf0de9208a46f7608ff13fa91617c49e1160f6fcf
MD5 9dbb874c853d45138144aa036847bc1a
BLAKE2b-256 c9c6c2fdd968a1b4a925b7ea41e6f48e6c9adbce799bb308a975457ccc3f8dfe

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f0e9c75a1f2f6f6da0d5b026068c213f5c25281b90f23b428833e16d96822c55
MD5 56e6bcaf6fddc4f628e598d99e9c9c4c
BLAKE2b-256 d5d066f1679951a5b24b00b97123b4dadd3081bdf2d4f44610c0650a0654210f

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8ff6b2f7d377bf9c05c01e048e944b51a19228a1864186235a7f69365d357c8b
MD5 1baf353bf2af480e06d589a468b8f35b
BLAKE2b-256 64e523f708611aa95663947130f183af0945540dd79a0d268ac00ef4e06be089

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a0f91ed67f87c997bfb85d6dd5beb7d31633876c2410f2b305b4188d32483ab9
MD5 5885c9a5c072a9def0fab978a5fd2b32
BLAKE2b-256 bedc632a5340e74b1622aac8ceb860319e94f6e460bd45fc444a656bb23e046a

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cf59b35ad41b696a3dea546aaabbe699cb6127438eadab75465b0ca2135ffe32
MD5 708c7d1f8617a8f88d1f8c29a0d4c37c
BLAKE2b-256 b5487fa8fcde7121c1b1b98b193d733fae981307a4db51b9d42bf8c3ca4d8aca

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp310-cp310-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp310-cp310-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 b71a20341ba3f1991913b8716368dad46dbd33d99a44ec617631daa26e182e60
MD5 3c1e841e13da12cbe440a974f08330fd
BLAKE2b-256 2f482e11812ba076db8c4d94d7d9dfbab14be1d378989ac870d95ac05a8bab06

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp310-cp310-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 c7148a629f34fb6bbd8723dae7068937436f70409417f3d52db42036007fb97a
MD5 47104cb358301280cf7d84c1f60026d9
BLAKE2b-256 85ab3341d6b56e443aabe693a1eb4d3c956f2f129874ece4578a0a5555ffe7eb

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a5d0de4ba65613ef12377ff0bd84d25bd6a4719a1be21f8408269988a09a9096
MD5 c4bef6ac833ff984589d231dc8d51afa
BLAKE2b-256 67832403ba595a963363b1ffea0055d27baaf2306e23ad5f0c3a13f4d2802635

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp310-cp310-manylinux_2_28_i686.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp310-cp310-manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 cecd9abb56c216f3b1c0a9cddbc6b67071ab232267bd009b99137b5ca1b823e1
MD5 463b29d10b1920343e673d5a8b84e259
BLAKE2b-256 377e3825e12f8287b3a7a7c5e831dedc88a517115251648f7c5317825cffa274

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 20cb5e9755f9f7ec1988dded33be210000151e7fdbcc24353da2771d1582543b
MD5 fd352e2fd62483819f5f49208ac6eebc
BLAKE2b-256 5f71d77c079e7df587e7dbcf6bdedc867ba5ac3b828b3d14409d876c388b9d1d

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76c1db325f27f7dba8dae569551599dce9bd692fb209027df23562e7991a783b
MD5 83322164d222870f3c7b73971ca51e83
BLAKE2b-256 e64b6743ee8263a7c7011b77a5441769785a9307ee5b2cf8189b0dbd4ab01f97

See more details on using hashes here.

File details

Details for the file async_tiff-0.6.0b2-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b2-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1f68ccfcd6f7d7155cf59a2286e134ac0e93711aa6450da94dffb4d1fa1128fc
MD5 f4262ea7aafcbfb3bb6a64e7ca30cc6d
BLAKE2b-256 35849ea482c73facafb65b40ba77232880bb12bd8fe2070532de643f5ddd1fb3

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