#[non_exhaustive]pub enum TileError {
InvalidExtent,
BufferTooLarge,
GeometryTooLarge,
TooManyTiles,
OutputTooLarge,
Overflow,
Conflict(Vec<TileId>),
}Expand description
Something the slicer or combiner cannot process. Returned in place of a panic or a silently-wrong result.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidExtent
The per-tile output resolution / tile side (extent) was zero, or larger than i32::MAX.
BufferTooLarge
The buffer was too large for the tile size: it must be strictly less than half the
extent, so geometry near a tile edge spills into at most one neighboring tile per axis.
GeometryTooLarge
A line (or a polygon feature) has more than u32::MAX vertices, rings or pieces — beyond the
u32 offsets of the slicers’ flat storage.
TooManyTiles
The geometry reaches too many tiles to slice: its segments collectively touch more tiles than the slicer’s working-set bound of 2^25 tile visits per feature (a tile counts once per segment touching it, and so does a tile row a segment crosses without touching any tile; tiles a polygon merely covers are free). Far above any realistic feature, even a world-spanning diagonal at z16, it guards time and memory against adversarial input.
OutputTooLarge
Slicing one polygon feature would produce more vertices than the slicer allows (2^28). Valid geometry stays far below that; only rings winding around tiles many times, or many overlapping polygons, come close, and they are rejected rather than exhausting memory.
Overflow
Coordinate arithmetic overflowed i32 — a coordinate or tile lies too close to the limits of
the representable range for the given extent/buffer.
Conflict(Vec<TileId>)
While combining tiles, the added tile disagreed with the already-added tiles on a
shared border segment (see Mosaic::add). Ids are sorted and unique;
the mosaic is left unchanged.
Trait Implementations§
impl Eq for TileError
Source§impl Error for TileError
impl Error for TileError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()