versatiles_core

Crates.ioversatiles_core
lib.rsversatiles_core
version3.4.0
created_at2024-05-29 12:20:52.577455+00
updated_at2026-01-23 14:41:32.223955+00
descriptionA toolbox for converting, checking and serving map tiles in various formats.
homepagehttps://versatiles.org
repositoryhttps://github.com/versatiles-org/versatiles-rs
max_upload_size
id1255392
size826,128
Michael Kreil (MichaelKreil)

documentation

README

versatiles_core

Core types and utilities for the VersaTiles ecosystem.

Crates.io Documentation

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, TileBBoxPyramid for working with tile coordinates and bounding boxes
  • Format Definitions: Type-safe enums for tile formats (TileFormat), compressions (TileCompression), and precompressions
  • Byte Utilities: Efficient ByteIterator for 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.

Commit count: 2978

cargo fmt