| Crates.io | versatiles_geometry |
| lib.rs | versatiles_geometry |
| version | 3.4.0 |
| created_at | 2024-05-29 12:45:43.029375+00 |
| updated_at | 2026-01-23 14:42:14.688848+00 |
| description | A toolbox for converting, checking and serving map tiles in various formats. |
| homepage | https://versatiles.org |
| repository | https://github.com/versatiles-org/versatiles-rs |
| max_upload_size | |
| id | 1255439 |
| size | 254,158 |
Geometric data structures and utilities for the VersaTiles ecosystem.
versatiles_geometry provides the geometric data handling layer for VersaTiles, including primitives for working with points, lines, and polygons, as well as support for GeoJSON and Mapbox Vector Tiles (MVT).
This crate is essential for reading, transforming, and exporting geospatial vector data.
Point, LineString, Polygon, and MultiPolygoncargo add versatiles_geometry
Or see crates.io/crates/versatiles_geometry for version info and docs.rs/versatiles_geometry for API documentation.
use versatiles_geometry::{
geo::{Point, Polygon},
geojson::GeoJson,
vector_tile::VectorTile,
};
// Create geometric primitives
let point = Point::new(13.4, 52.5);
// Parse GeoJSON
let geojson_str = r#"{"type": "Point", "coordinates": [13.4, 52.5]}"#;
let geojson = GeoJson::from_str(geojson_str)?;
// Work with vector tiles (MVT)
let mvt_data: Vec<u8> = /* ... */;
let tile = VectorTile::from_bytes(&mvt_data)?;
For detailed API documentation, see docs.rs/versatiles_geometry.
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.
MIT License - see LICENSE for details.