morecantile-rs is an unofficial Rust port of
Morecantile, targeting the
core API and observable behavior of Morecantile 7.0.3.
The project is being reimplemented in Rust with AI-assisted development. It is not affiliated with, endorsed by, or maintained by Development Seed.
- Validated OGC Tile Matrix Set models
- Matrix lookup, derivation, resolution, and zoom selection
- Geographic and projected operations through mandatory bundled PROJ
- Tile selection, bounds, topology, QuadKeys, and lazy traversal
- GeoJSON tile features
- Morecantile-compatible permissive and strict APIs
- Explicit TMS V1 migration and programmatic TMS construction
- All 13 Morecantile 7.0.3 built-in definitions
- Persistent registries and explicit environment configuration
Until the first release is published, use a local checkout:
[dependencies]
morecantile-rs = { path = "../morecantile-rs" }use morecantile_rs::{Error, Tile, default_registry};
fn main() -> Result<(), Error> {
let tms = default_registry().get("WebMercatorQuad")?;
let matrix = tms.matrix_strict(2)?;
assert_eq!((matrix.matrix_width(), matrix.matrix_height()), (4, 4));
assert!(tms.is_valid_strict(Tile::new(2, 2, 2), true)?);
Ok(())
}On Windows, the repository launcher detects the native SQLite development prefix and configures the bundled-PROJ build environment:
powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File .\scripts\test.ps1Run one integration-test target by passing Cargo arguments:
powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File .\scripts\test.ps1 --test coordinatesThe mdBook is the canonical source for examples, guides, architecture, compatibility evidence, contribution instructions, and project records. Its source navigation is also available in the repository.
Project-authored Rust code and documentation are licensed under the MIT
License. Bundled Tile Matrix Set definitions retain their upstream licenses,
attributions, provenance, and modification notices. See
Third-party notices and
data/provenance.toml.