#gis #back-end #tile #async-http #spec #tokio

pmtiles

Implementation of the PMTiles v3 spec with multiple sync and async backends

20 releases (9 breaking)

0.9.0 Apr 11, 2024
0.7.1 Feb 13, 2024
0.5.2 Dec 24, 2023
0.5.1 Nov 27, 2023
0.0.5 Oct 22, 2022

#36 in Geospatial

Download history 104/week @ 2023-12-22 114/week @ 2023-12-29 94/week @ 2024-01-05 122/week @ 2024-01-12 138/week @ 2024-01-19 83/week @ 2024-01-26 110/week @ 2024-02-02 88/week @ 2024-02-09 92/week @ 2024-02-16 307/week @ 2024-02-23 123/week @ 2024-03-01 141/week @ 2024-03-08 98/week @ 2024-03-15 151/week @ 2024-03-22 260/week @ 2024-03-29 420/week @ 2024-04-05

945 downloads per month
Used in martin

MIT/Apache

4.5MB
1K SLoC

PMTiles (for Rust)

GitHub crates.io version docs.rs docs crates.io version CI build

This crate implements the PMTiles v3 spec, originally created by Brandon Liu for Protomaps.

Features

  • Opening and validating PMTile archives
  • Querying tiles
  • Backends supported:
    • Async mmap (Tokio) for local files
    • Async http and https (Reqwuest + Tokio) for URLs
    • Async s3 (Rust-S3 + Tokio) for S3-compatible buckets

Plans & TODOs

  • Documentation and example code
  • Support writing and conversion to and from MBTiles + x/y/z
  • Support additional backends (sync mmap and http at least)
  • Support additional async styles (e.g., async-std)

PRs welcome!

Development

  • This project is easier to develop with just, a modern alternative to make. Install it with cargo install just.
  • To get a list of available commands, run just.
  • To run tests, use just test.

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Test Data License

Some PMTile fixtures copied from official PMTiles repository.

Dependencies

~11–29MB
~600K SLoC