An open API service indexing awesome lists of open source software.

https://github.com/developmentseed/aiopmtiles

[WIP] PMTiles Async reader in python
https://github.com/developmentseed/aiopmtiles

Last synced: 10 months ago
JSON representation

[WIP] PMTiles Async reader in python

Awesome Lists containing this project

README

          

# aiopmtiles


Async Version of Python PMTiles Reader.




Test


Coverage


Package version


Downloads


Downloads

---

**Documentation**: https://developmentseed.org/aiopmtiles/

**Source Code**: https://github.com/developmentseed/aiopmtiles

---

`aiopmtiles` is a python `Async I/O` version of the great [PMTiles](https://github.com/protomaps/PMTiles) python reader.

The [**PMTiles**](https://github.com/protomaps/PMTiles) format is a *Cloud-optimized + compressed single-file tile archives for vector and raster maps*.

## Installation

```bash
$ python -m pip install pip -U

# From Pypi
$ python -m pip install aiopmtiles

# Or from source
$ python -m pip install git+http://github.com/developmentseed/aiopmtiles
```

## Example

```python

from aiopmtiles import Reader

async with Reader("https://r2-public.protomaps.com/protomaps-sample-datasets/cb_2018_us_zcta510_500k.pmtiles") as src:
# PMTiles Metadata
meta = src.metadata

# Spatial Metadata
bounds = src.bounds
minzoom, maxzoom = src.minzoom, src.maxzoom

# Is the data a Vector Tile Archive
assert src.is_vector

# PMTiles tiles type
tile_type = src._header["tile_type"]

# Tile Compression
comp = src.tile_compression

# Get Tile
data = await src.get_tile(0, 0, 0)
```

## Contribution & Development

See [CONTRIBUTING.md](https://github.com/developmentseed/aiopmtiles/blob/main/CONTRIBUTING.md)

## Authors

See [contributors](https://github.com/developmentseed/aiopmtiles/graphs/contributors)

## Changes

See [CHANGES.md](https://github.com/developmentseed/aiopmtiles/blob/main/CHANGES.md).

## License

See [LICENSE](https://github.com/developmentseed/aiopmtiles/blob/main/LICENSE)