Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ An asynchronous [PMTiles] reader for Python.

The [PMTiles format] is a cloud-native, compressed, single-file archive for storing tiled vector and raster map data.

This implementation is fully asynchronous and integrates with [Obstore] and [Obspec] for efficiently loading data from remote files.

[Obstore]: https://developmentseed.org/obstore/latest/
[Obspec]: https://developmentseed.org/obspec/latest/

[PMTiles]: https://docs.protomaps.com/
[PMTiles format]: https://docs.protomaps.com/pmtiles/

Expand All @@ -17,6 +22,8 @@ pip install async-pmtiles

## Example

The easiest way to get started is by using [Obstore] to fetch remote data.

```python
from async_pmtiles import PMTilesReader
from obstore.store import HTTPStore
Expand Down
5 changes: 4 additions & 1 deletion src/async_pmtiles/_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ async def metadata(self) -> dict:
return json.loads(metadata)

async def get_tile(self, x: int, y: int, z: int) -> Buffer | None:
"""Load data for a specific tile given its x, y, and z coordinates."""
"""Load data for a specific tile given its x, y, and z coordinates.

Note that no decompression is applied.
"""
tile_id = zxy_to_tileid(z, x, y)

dir_offset = self.header["root_offset"]
Expand Down