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
- Host: GitHub
- URL: https://github.com/developmentseed/aiopmtiles
- Owner: developmentseed
- License: mit
- Created: 2023-04-12T12:32:55.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-10T17:24:15.000Z (over 2 years ago)
- Last Synced: 2024-04-10T03:11:32.074Z (about 2 years ago)
- Language: Python
- Homepage: https://developmentseed.org/aiopmtiles/
- Size: 6.7 MB
- Stars: 23
- Watchers: 6
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# aiopmtiles
Async Version of Python PMTiles Reader.
---
**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)