57 releases (25 stable)
Uses new Rust 2024
| new 3.6.1 | Feb 11, 2026 |
|---|---|
| 3.4.0 | Jan 23, 2026 |
| 3.0.1 | Dec 31, 2025 |
| 2.3.1 | Nov 30, 2025 |
| 0.12.4 | Jul 22, 2024 |
#8 in #mbtiles
Used in 6 crates
735KB
15K
SLoC
versatiles_core
Core types and utilities for the VersaTiles ecosystem.
Overview
versatiles_core provides the foundational types and utilities used throughout the VersaTiles tile processing ecosystem. It includes coordinate systems (tile coordinates, bounding boxes), format type definitions, byte iteration utilities, and tile traversal helpers.
This crate serves as the base dependency for all other VersaTiles components.
Features
- Coordinate Types:
TileCoord,TileBBox,TileBBoxPyramidfor working with tile coordinates and bounding boxes - Format Definitions: Type-safe enums for tile formats (
TileFormat), compressions (TileCompression), and precompressions - Byte Utilities: Efficient
ByteIteratorfor reading blob data - Traversal: Tools for iterating through tile pyramids and bounding boxes
- I/O Utilities: Helper traits and types for working with tile data streams
Usage
cargo add versatiles_core
Or see crates.io/crates/versatiles_core for version info and docs.rs/versatiles_core for API documentation.
Example
use versatiles_core::{TileCoord, TileBBox, TileBBoxPyramid};
// Create a tile coordinate (zoom, x, y)
let coord = TileCoord::new(5, 16, 10)?;
// Create a bounding box at a specific zoom level
let bbox = TileBBox::new(5, 10, 12, 15, 20)?;
// Create a pyramid of bounding boxes across zoom levels
let pyramid = TileBBoxPyramid::new_full_up_to(8);
// Convert coordinates
let geo_bbox = bbox.get_geo_bbox();
println!("Geographic bounds: {:?}", geo_bbox);
API Documentation
For detailed API documentation, see docs.rs/versatiles_core.
Part of VersaTiles
This crate is part of the VersaTiles project, a toolbox for working with map tile containers in various formats.
For the complete toolset including CLI tools and servers, see the main VersaTiles repository.
License
MIT License - see LICENSE for details.
Dependencies
~20–39MB
~685K SLoC