Skip to main content

mln_tile/
lib.rs

1//! Tile data: the layers and features of vector tiles, and the geometry
2//! functions that work on them.
3//!
4//! - [`TileData`]: a tile's data, which is an MVT tile read lazily with
5//!   fast-mvt, an MLT tile decoded with mlt-core, or features already in
6//!   tile coordinates (GeoJSON and custom geometry sources). Its layers
7//!   ([`TileLayer`]) and features ([`Feature`]) are views that borrow it.
8//! - [`geometry_tile_data`]: hole limits, polygon fixup on `i_overlay`,
9//!   feature conversion and corner rounding. The feature interface that the
10//!   tiles implement, ring classification and coordinate conversion are in
11//!   `mln_style::feature`.
12//!
13//! This crate is below the renderer, so the buckets can use the geometry
14//! functions. The tiles themselves, and their workers, depend on the renderer
15//! and live in a higher crate.
16
17pub mod cut;
18mod error;
19pub mod geometry_tile_data;
20mod mlt;
21mod mvt;
22mod tile_data;
23
24pub use error::TileError;
25pub use geometry_tile_data::{
26    convert_feature, is_boundary_edge, is_entirely_outside, limit_holes, round_polygon_corners,
27};
28pub use mlt::{MltFeature, MltLayer, MltTile};
29pub use mvt::{MvtFeature, MvtLayer, MvtTile};
30pub use tile_data::{Feature, FeatureGroups, GeoJsonFeature, TileData, TileLayer};
31
32#[cfg(test)]
33mod malformed_tile_test;
34/// The `log` targets of this crate's records. Each names the event that
35/// `mln_c` reports the record under (`mln_c::logging`).
36mod log_target {
37    pub(crate) const PARSE_TILE: &str = "mln_tile::parse_tile";
38}
39
40#[cfg(test)]
41mod vector_tile_test;