open-standards/map/map-rs/crates/map-pmtiles/Cargo.toml
Transaction Science 05eaef966d map-pmtiles: PMTiles v3 export (cloud-native tile ecosystem ingest)
The open geospatial stack converged on PMTiles — a single-file,
range-requestable archive served straight from object storage and read by
MapLibre / pmtiles CLIs / Overture tooling. map's "a tileset is a file,
not a service" is the same idea; emit the incumbent's format so map output
is consumable without a map-specific reader.

New map-pmtiles crate: a self-contained, round-trip-validated PMTiles v3
writer — Hilbert tile-id ordering (z=1 anchors + cross-zoom inverse
verified), the varint clustered directory (delta tile-ids, run-length,
consecutive-offset sentinel), and the 127-byte header. Directories and
metadata written uncompressed (internal compression = none), so no gzip
dep and deterministic bytes. read_tile() reads its own output back
byte-identical for validation.

from_map_tiles filters a tileset to its SURFACE tiles (alt 0, atemporal,
base LOD) — PMTiles' 2-D z/x/y grid can't carry map's altitude/time/LOD
axes (that 4-D coverage is GeoParquet's job). The S2 -> z/x/y projection
is a caller-supplied seam (it lives in map's substrate), keeping this
crate a pure serializer. Note: root-only directory (large tilesets need
leaf dirs); interop with the reference pmtiles libs is the next validation.

4 tests green, clippy clean. Deps: map-schema + serde_json only.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-25 17:13:49 -04:00

12 lines
584 B
TOML

[package]
name = "map-pmtiles"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
description = "PMTiles v3 export for the map open standard — write map surface tiles into the single-file PMTiles archive (Hilbert tile ids, varint clustered directory, 127-byte header; compression=none, no extra deps) so the ecosystem (PMTiles readers, MapLibre, Overture tooling) can consume map output. Ingest, not compete."
[dependencies]
map-schema = { path = "../map-schema" }
serde_json = { workspace = true }