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

Uploaded PyPymusllinux: musl 1.2+ x86-64

async_tiff-0.5.0b2-pp311-pypy311_pp73-musllinux_1_2_i686.whl (4.1 MB view details)

Uploaded PyPymusllinux: musl 1.2+ i686

async_tiff-0.5.0b2-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl (4.1 MB view details)

Uploaded PyPymusllinux: musl 1.2+ ARM64

async_tiff-0.5.0b2-pp311-pypy311_pp73-manylinux_2_24_aarch64.whl (3.8 MB view details)

Uploaded PyPymanylinux: glibc 2.24+ ARM64

async_tiff-0.5.0b2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.1 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

async_tiff-0.5.0b2-pp311-pypy311_pp73-manylinux_2_17_i686.manylinux2014_i686.whl (4.0 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ i686

async_tiff-0.5.0b2-pp311-pypy311_pp73-macosx_11_0_arm64.whl (3.7 MB view details)

Uploaded PyPymacOS 11.0+ ARM64

async_tiff-0.5.0b2-pp311-pypy311_pp73-macosx_10_12_x86_64.whl (3.9 MB view details)

Uploaded PyPymacOS 10.12+ x86-64

async_tiff-0.5.0b2-cp311-abi3-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.11+Windows x86-64

async_tiff-0.5.0b2-cp311-abi3-musllinux_1_2_x86_64.whl (4.3 MB view details)

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

async_tiff-0.5.0b2-cp311-abi3-musllinux_1_2_i686.whl (4.1 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ i686

async_tiff-0.5.0b2-cp311-abi3-musllinux_1_2_aarch64.whl (4.1 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ ARM64

async_tiff-0.5.0b2-cp311-abi3-manylinux_2_24_aarch64.whl (3.8 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.24+ ARM64

async_tiff-0.5.0b2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.1 MB view details)

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

async_tiff-0.5.0b2-cp311-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (4.0 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ i686

async_tiff-0.5.0b2-cp311-abi3-macosx_11_0_arm64.whl (3.7 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

async_tiff-0.5.0b2-cp311-abi3-macosx_10_12_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

async_tiff-0.5.0b2-cp310-cp310-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.10Windows x86-64

async_tiff-0.5.0b2-cp310-cp310-musllinux_1_2_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

async_tiff-0.5.0b2-cp310-cp310-musllinux_1_2_i686.whl (4.1 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ i686

async_tiff-0.5.0b2-cp310-cp310-musllinux_1_2_aarch64.whl (4.1 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ ARM64

async_tiff-0.5.0b2-cp310-cp310-manylinux_2_24_aarch64.whl (3.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ ARM64

async_tiff-0.5.0b2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

async_tiff-0.5.0b2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (4.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ i686

async_tiff-0.5.0b2-cp310-cp310-macosx_11_0_arm64.whl (3.7 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

async_tiff-0.5.0b2-cp310-cp310-macosx_10_12_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file async_tiff-0.5.0b2-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 af18c3b7bc723b813edef6047c733c9b51d4bd03fb574dd208a2edfdd24f6478
MD5 c6855aee69985a8e58ecdd9945a3a52b
BLAKE2b-256 9834bca3cbf1affb564c22f163afcd11ffa3ee9f927596ff8f09e06fb7d66593

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-pp311-pypy311_pp73-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 4fb45b7cf24d52fbe795201293589fe947a0b1f2d108821d60cd8122af3129c6
MD5 25df1bf8fb698f9c8bbcd8e8aa4bb883
BLAKE2b-256 d798525bbe2c56d7a6c4be7ce49e261effe424375d75f552637408fdda68660b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 e2616d0fa055f791a727e8478558449bf7096a808ab8792f246d737023e910ac
MD5 3a49dd9f29b3b488f6b378e095725627
BLAKE2b-256 a5f774469dc74814d35488c97caa96b4963e8247af7e41297fed90068d788e7c

See more details on using hashes here.

File details

Details for the file async_tiff-0.5.0b2-pp311-pypy311_pp73-manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-pp311-pypy311_pp73-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 f9fa5108af052eb54da751f6bc4120f816a4369d8aaaa6dc781284356ebe2a7e
MD5 26281d06e8d8361d9d1a5e1622e0935e
BLAKE2b-256 ab66d8d74aa86aec9783579bf863168aa0c410546086f80ffc6b1c2322559fb8

See more details on using hashes here.

File details

Details for the file async_tiff-0.5.0b2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e8621c43ea4c4f7259a661ec028c764b0c53060f6cefcb1664b33c37af452faa
MD5 ecb969529a4f60ac5631a622871026af
BLAKE2b-256 b966ea14cc4555905208dbae34b8d22b9446835817c88207a7af8269303ad6ad

See more details on using hashes here.

File details

Details for the file async_tiff-0.5.0b2-pp311-pypy311_pp73-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-pp311-pypy311_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 09632617600e65bd6117d3ceed6e09d86340b6f699a1a2d04a892a2344448904
MD5 afd0fd161fb420b649539113615f9192
BLAKE2b-256 ebd633a160df6bcad9b64591e27b1c7d9a94f7e708ead981940235a89ab4ca64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-pp311-pypy311_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 488ca614ed021aefd830bc20090e28f23d9efca1bfe60e0b1b4dc3fb4b3fc18c
MD5 17b271b9093540a1dbe578f34711ce63
BLAKE2b-256 22a563be4278e5f811a6a82f9d5c81bc4940a4bd95ab4a937efc2757746203f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-pp311-pypy311_pp73-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 fd561e46e0af134351ab10bd46a40d8dbed3f2b2fd94fd8406ac2ebd174adfeb
MD5 325b99b2fef7ab8f94308cf383c324bd
BLAKE2b-256 bcfc0d14749ad1339cf2aa34a883f9b88cf9a5ba9b6040d88e4b8a22329b6e5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 20137133afb19b656f877dc588393428bd945755254a6c6a40c7308f426a466c
MD5 f96998a7431e9714245a02653d7b416a
BLAKE2b-256 2aa1a806b254776899067b238d59252dba5b5c949db21f60174d8ab7eca0ecca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f8ae90ce28898d193bd69ea0272a578c0ec55d1c088fafc8e7dfad2317c0b33d
MD5 6af052fca21f11c14d71add9f101859f
BLAKE2b-256 0beba03223c892c1cb223091cddb26a54bbdabf3f90231d696add9be0ee47532

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp311-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 651386f66ea34e4d0289dd8d2e24be96edeea1000e680c5501cd45e31226ca03
MD5 1c688b2bd8db525b2c42b81d40b706b2
BLAKE2b-256 cb3c6985543d55091a274ade0b47cbe96ce9b9767bbc72c68f861d2411ef9987

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 ff81b41a7b7e8193c27af7ab95b0ce2732dfab005fef594c2c62f4cd6a1548da
MD5 c74755d1e55935dcff97ec91969d4ac2
BLAKE2b-256 952f6818f196f41c6c68aba70be271dcc1aa9b9f39c0a418af1be1ddeb914d26

See more details on using hashes here.

File details

Details for the file async_tiff-0.5.0b2-cp311-abi3-manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp311-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 a9377ae9cb325bf0252704ae8c53be9601c9de85dbad93c73017de7b9d1f3e67
MD5 0ef6bf22f22776d39d66da6482ca2e4b
BLAKE2b-256 b992b66874436f86d09397d839e1fedfd9bdd4cd2a1c0b3f354367ac3918caf8

See more details on using hashes here.

File details

Details for the file async_tiff-0.5.0b2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ed2199c497c124fa41df9a0abd1067612018627a9cf1244e6b80a7f45ad236a
MD5 e7ef6e5dc1e7ecdf893e41676f658538
BLAKE2b-256 fde6b9ca12c622c9f7f6abf659aa11c40c60dbc18090f2eb15bd8b5c16bd18e9

See more details on using hashes here.

File details

Details for the file async_tiff-0.5.0b2-cp311-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp311-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 9403f489d10bb4dadb8b184b6087fa7e55ce9cf6e15d45521b87b2c398ae13ca
MD5 6a797d42d4065a34e56a13fc43e8647c
BLAKE2b-256 473b18081a38923bcd5b62cf6061abff09852c70d441bb5a46d27e450398648a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6edee91e059810c286ab520fd37a97e223cec7cf561d0347011a56ee52ba79fa
MD5 199c6549865ff9b2fb5d40d206c3f62e
BLAKE2b-256 4e656e8f41c4dd9b74de915673a194a19b468a8668f758af0c934f6cab6be961

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c4a9583f43872f0e3c70e15b46db32787a3042260dfc2bd9ec13fc94c80b08ce
MD5 ab7a0359e94baac0a4b2ca2e22a777ee
BLAKE2b-256 f14942e5e540347387ff4ee43234e27d47a61543f44957f2f4bd6f4e157c2934

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bd0f2f0cb9be45a53f1e712fcae62e37b4dd9e14f779c9ddba6f5fc92ce43074
MD5 7b76d20223edae0e50babc11147fd47b
BLAKE2b-256 48aff1c9efacd0100879de4e04fc5409f2ba47a153ee8d67a93dc4482b512f20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7130d0bc98081300a9add0127d8128ec8b6d10df8a14c684dfdc11d200d5ad69
MD5 ecf059d23304b0f4d9c47539b15c36ff
BLAKE2b-256 df7ea3f62c6a93b17316bcff7cddb32206ea7ca9e128ed7a010d02e5ac39aabf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp310-cp310-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 4b0f9bf16b74497f7b408fadeb77cb709f8172d83b0c9a39bac095e4345acdef
MD5 d22f5e763c7d5a8a0b5c3b44d79f846c
BLAKE2b-256 7c03924cf3888844085469e2d51efb280b1295cb6a30a9d3bc666527abc2723b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 ba89e2799a9c710973e59b3269edeccd7646e5a9c7945813cef4b397d15ea20a
MD5 094acb794753424194d912559f720b3d
BLAKE2b-256 367547e6acf89ae4b72ca37220f77618106f5a991b4d7c61e385b29b29369dd7

See more details on using hashes here.

File details

Details for the file async_tiff-0.5.0b2-cp310-cp310-manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp310-cp310-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 6ceaea0459812cfdfc52472204ce834ddfb604b3c057283892b4875e7f698a35
MD5 73921b38ac1d1d7dbced17a77da79ebc
BLAKE2b-256 7223dea692a36fd95842adfe9ef4df43bd400748a4ea62da39a3f00f25c2e9ce

See more details on using hashes here.

File details

Details for the file async_tiff-0.5.0b2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 55a40541723b145a3dd4450ad24e0579e3c4a605c3ea7e8b0a01b9dc76855da8
MD5 4a4fe031075e642e78ddd3f5f535db78
BLAKE2b-256 943190f476d25f1f180655eef434566c17c4b9d9e23640474e72e40d3e8554e4

See more details on using hashes here.

File details

Details for the file async_tiff-0.5.0b2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 1786abe43a09f43a90ebdbb991e11b84ea86ee5f0a2614070506bf02f2712307
MD5 0fa20fcfd60abf5ecca683de3ced0469
BLAKE2b-256 78096e56051876c8103f9539d751e787746fb975e2c58e7e25850d1b233ebb79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 04e36cf012881938cc89d7d357e31afd207689c55440dc2c96c78d61f4c7f265
MD5 cf61247c283d43d286fa3e1a23f7edf5
BLAKE2b-256 10791a20fa0e6ca429bab9b106fa3a14fb100a1feb3bbf5a6161c728df7f39a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.5.0b2-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8d9be1f5bfe73a593232325ed89e7c2e5d25974f093e5d3fa279228e428b79c7
MD5 301c3e5ec02685046cbe43e5b5465103
BLAKE2b-256 f633cef03b09202356be4edee44a81c9794f7794dd5ab1c3955e0de415b9d7cf

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