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.0b1-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.0b1-pp311-pypy311_pp73-musllinux_1_2_i686.whl (10.5 MB view details)

Uploaded PyPymusllinux: musl 1.2+ i686

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

Uploaded PyPymusllinux: musl 1.2+ ARM64

async_tiff-0.6.0b1-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.0b1-pp311-pypy311_pp73-manylinux_2_28_i686.whl (4.1 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ i686

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

Uploaded PyPymanylinux: glibc 2.28+ ARM64

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

Uploaded PyPymacOS 11.0+ ARM64

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

Uploaded PyPymacOS 10.12+ x86-64

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

Uploaded CPython 3.11+Windows x86-64

async_tiff-0.6.0b1-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.0b1-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.0b1-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.0b1-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.0b1-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.0b1-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.0b1-cp311-abi3-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

async_tiff-0.6.0b1-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.0b1-cp310-cp310-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.10Windows x86-64

async_tiff-0.6.0b1-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.0b1-cp310-cp310-musllinux_1_2_i686.whl (10.5 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ i686

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

Uploaded CPython 3.10musllinux: musl 1.2+ ARM64

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

Uploaded CPython 3.10manylinux: glibc 2.28+ i686

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

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

async_tiff-0.6.0b1-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.0b1-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 61ef9f263e87e1ac77126ba6bef8a3937e237c46173eea7542154b04ed9c1bef
MD5 01640ce573eefad351dae7bc4e08cc63
BLAKE2b-256 0d839317ec45547fb1aae9a2ac140f708488ddf4e10af3c36f6de5476aa431b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-pp311-pypy311_pp73-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 17b6c5146a6dcc1fadf651ca3563225386f1a20e0eb4eece71be66e400cd2f35
MD5 3bdd63144a75b752e5233654b866fe25
BLAKE2b-256 7dad27dd8d531f9a34ad768883b9f65624ecb64f774f4235951e48ece1da83ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 9a6da750ee0eb14bbded6ed8b81da56b64f81cf95f7fb7b77e90976120af76ca
MD5 4719f8629e14a88775063a5e27d1dd53
BLAKE2b-256 d2deae51a4d9b7ac61cdefca167e7ec2912a720e140f319c371b9e31bd6934d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 51e07e943254458f4d022592b1561a4438f0c29d5451383aa00576e23d5db9ce
MD5 af528f7347a89f852b0017e0fdc992b2
BLAKE2b-256 4355281f8574b3d9b9c924d6f66cc1205064a10e5a692619d0d241f649d62f0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-pp311-pypy311_pp73-manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 ccae6c2bc3e69ae1da862d5bb15275b011e692bb0f05d48bf50fb44343259812
MD5 9d5156cd573d31a01a599269e2234c80
BLAKE2b-256 2575b30721f1dbc6ed8f77b8e139f79a14f53e09f0593a99b345464eec605ae4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4f34900ca25b59ddb89f58585b66a84da26427631bfc1eb9020252bae13cc65e
MD5 e916d7278ea4c47c0464b653b99f2607
BLAKE2b-256 47ec73fbe4552d98eb2915826a56ece8df4be6294497271befab8e7ba9219feb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-pp311-pypy311_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cd3fe34283be818305a5589d54590fb8000421a963dce2374de1c80cd4e15e70
MD5 44365ac2e8d9dc97a001e35f17018137
BLAKE2b-256 0cbaa8baf1500c57da9df5deebed97185a8dac9c4b5346453e9e92409d25e16f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-pp311-pypy311_pp73-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 57dfa837339844f3e044d5bd4202613f07f190a54bf7d9f0ef97b04cdfc2185f
MD5 217b2922933cd727a2c5cb76d2ea4973
BLAKE2b-256 2cfab2385915f7158b4fadf95804d93eeb879d151a4181fb805b509b99beade0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 52d4fbfd7c2d77007d47acd81a069da61a1fe4e30b71a8d07f625deb6ae82be5
MD5 05bae72b9d104307f171cd60fe911366
BLAKE2b-256 48dd528e65a0682660eeba41b0ff8fb71a0268fd54d5854300c8d330b7901191

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3c9b6b7238f8401090ebaee4d08c7f252ef81205288f3d35af28e1049e71a1fc
MD5 1d611a84335b78afa3b320c0596e305f
BLAKE2b-256 b0aa84f5987307efd9364d0ee342429d4e4be480e62be0e93dd0f7bb02c12b21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp311-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 23a1c3c7b5f3f3caf322a5aaa9e95870569ce22857d7ca5a546ff61019254f80
MD5 d6f1b4a901de980e714f09cf17b305c2
BLAKE2b-256 e93cbc99aa439a9e15ee47ab2bc74539e8e5b026e2fb6a2cee5589296c6ddbf2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 16b39ec8365b5dcc44bbb15366658f150d393672cfef9aeafc84204a970018ce
MD5 fd77e16a66b2c82752066bcf23b3b5d7
BLAKE2b-256 ae58268b569bae4e0774a427cee83060ed13b80c836581e4c11a5e3a8d6f9f64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5ce33672eb9d03d3e2711a4eaf44e8cb0a717164394dd7fbd05ed1a1a10fb3f5
MD5 45c72a50abf1ab0e9aade534dd68756a
BLAKE2b-256 b06bac70b6085090694cda8c5af9e9fc7225b5b858d1705e34552a0260a1c837

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp311-abi3-manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 8f46162b6a8603eb3d36d4f721a815f8386d1193d38df34a064d337e6d5f9e37
MD5 b4b86419c9d63eb4352c2feac7e1595e
BLAKE2b-256 1385bcebb9e6e8a081ae2cf1d4f880492977a30d905d1a0821043795ca587de2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4a1ff96a21916123fa8b775dc86e9e2ebad77a21462a56a3758d267c6bc57ad5
MD5 5ebc5bf94130e4ec638ed9199dd8f61d
BLAKE2b-256 735047cea4ed6531a8f17048da978722206fb4bb0cea7ccb212bb2adb5c2e4b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 de541eb175ec55f9b6e60dbbd016c4f6d0f6d7e6be0ea7ba8aa3127068176071
MD5 9b36a82f53263e9b9dfb88aca44591af
BLAKE2b-256 cc4d43935ed84ae880b73f6f3b228eebbd67b556be6f86ad993d187a5725c0f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8f8fbb63799a28f8140c35c108db9c39fef2e0f0c79f6a0e731844491c149b4c
MD5 3c59bc72018664e52c0c2e409f4ae1f4
BLAKE2b-256 fcf19ab3196ad38517b3a94b27b546fbeaee4bb38541340e30d3d34e11c2cdc1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 30da3123a4b9a6234906fb52ecac926d1f72603811eb8872c572a03276b614c2
MD5 07a727c7184a192636c9e04b5e55007c
BLAKE2b-256 b7b653f20a8a19d68d1f8e14e1b4b13050e0f1a786059f7333d4469082c39a91

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3324affee2dc039150eed8c5baba7b31f6537931f24378aed958ea24694d0b53
MD5 dbfa7cde30d7115a7d57f44b4ca53085
BLAKE2b-256 6ef284dc1ec0e135af2a672feaaafa98e52fb10d1707e7f2e799ff2ec35ebd26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp310-cp310-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 c601f52bbf8a1534395d0e81774db8a306e642eeb1cf3c76dc750bdcddf2adf2
MD5 48c0cd0341fc3f58fa7f5e348b855a46
BLAKE2b-256 5aec217b7fdfcc4dfd7df8e6e3579f5bed461161ba8462e75617943ea1080765

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 2a6a145e445a8fcf5c2012e4b4766088d7338cf52fde037b66ab18970f5e0170
MD5 538c0caab04a8b28fa11eb5f206cb22e
BLAKE2b-256 6eeedfaddba56f18bbbcc37ab51003ff1a71025454de65e19ce43450eba4319b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 18c9ab1ac85c9a80a928fd0e0974dba5ca3965d0a6ed822601c18b248066dc2f
MD5 293bef2a7fa7497c7690e63db7db191e
BLAKE2b-256 4f03396a3fb36f3f47a2de35b2a38d088f542b0392552a0a389c2d51ef6f09a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp310-cp310-manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 183373bd176a73b3a1f3c5c5288eb8c1130563570a02a7075da1f600d8193042
MD5 8428e1d472e17cb7174cafaf8e45adb9
BLAKE2b-256 2d21b886b1515ea8381250cafb798ce0e7ab2cb0107f05c51f7cb77912882bb2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fd3770c3366ccbcab6882744e10c37609a856d29b60616ce6095201855f36aad
MD5 3c5d84a1e2fc618188be46a49721af06
BLAKE2b-256 95c61f42e66ee0bce5448c090cfeb0dfafbf549dbda7892f127c7c0ec78e5a11

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f4eca51f1627496e6d1e0c7702f1d39ac21ae3062b2786ca7a08539de4882a54
MD5 2aab5f250e178673c039e7aa26e96e6c
BLAKE2b-256 03707c3259e59ca341cd12348da900aaa7f6d32debff232b1871162108d5b54f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_tiff-0.6.0b1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a408e99f54abff7dd8a0d43a2fa92c6e8dbe6bdb77832a94ccabb4bacb4688d9
MD5 a5493efc36c167e7bc613f2f33a45d43
BLAKE2b-256 ad8b4bc3ac6cddd82db78353130502a025218000a91c19e3fbebed7802f3e212

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