API Documentation¶
async_pmtiles ¶
async-pmtiles: asynchronous interface for reading PMTiles files.
PMTilesReader
dataclass
¶
An asynchronous PMTiles Reader.
bounds
property
¶
The bounding box of the archive as (min_lon, min_lat, max_lon, max_lat).
center
property
¶
The center of the archive as (center_lon, center_lat, center_zoom).
tile_compression
property
¶
tile_compression: Compression
Return the compression type used for tiles.
get_tile
async
¶
Load data for a specific tile given its x, y, and z coordinates.
Note that no decompression is applied.
open
async
classmethod
¶
Open a PMTiles file.
Parameters:
-
path(str) –The path within the store to the PMTiles file.
-
store(Store) –A generic "store" that implements fetching byte ranges asynchronously.
Raises:
-
ValueError–If the PMTiles version is unsupported.
Returns:
-
Self–An instance of PMTilesReader.
Store ¶
Bases: Protocol
A generic protocol for accessing byte ranges of files.
This is compatible with obspec.GetRangeAsync and is implemented by obstore stores, such as S3Store, GCSStore, and AzureStore.