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
Add this to your Cargo.toml:
[]
= "2.3"
Example
use ;
// Create a tile coordinate (zoom, x, y)
let coord = new?;
// Create a bounding box at a specific zoom level
let bbox = new?;
// Create a pyramid of bounding boxes across zoom levels
let pyramid = new_full;
// Convert coordinates
let geo_bbox = bbox.get_geo_bbox;
println!;
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.