Skip to main content

map_tile_toolkit/
lib.rs

1#![doc = include_str!("../README.md")]
2#![forbid(unsafe_code)]
3
4mod error;
5pub use crate::error::TileError;
6
7mod tile;
8pub use crate::tile::TileId;
9
10mod vertex;
11pub use crate::vertex::{Measured, PolyVertex, Vertex};
12
13// Low-level per-tile polyline clipping used by the slicer.
14mod clip_polyline;
15
16// Exact integer geometry predicates (orientation, point-in-ring) shared across clipping and polygons.
17mod geom;
18pub use crate::geom::signed_area_2x;
19
20// Low-level per-tile polygon-ring clipping (keep-original with synthetic clip-boundary corners).
21mod clip_polygon;
22
23// Whether a tile's piece is planar outside its box (the check behind valid polygon pieces).
24mod planar;
25
26// The stateless tile geometry under the slicer: tile boxes and the lazy per-segment tile walk.
27mod grid;
28
29// Lazy polygon slicing: the row-by-row scanline behind `Slicer::polygon`.
30mod polygon;
31pub use crate::polygon::{FillRun, PolygonPiece, PolygonSlice, PolygonSlices};
32
33mod slicer;
34pub use crate::slicer::{
35    ClipMode, LineSlice, LineSlices, Local, LocalIter, PointSlice, PointSlices, Slicer, TileLines,
36};
37
38// Rounding float polygons onto the integer grid without making them invalid.
39mod quantize;
40pub use crate::quantize::{Quantized, Quantizer};
41
42mod mosaic;
43pub use crate::mosaic::{Mosaic, PolygonMosaic};