polylabel 3.3.0

A Rust implementation of the Polylabel algorithm for finding optimum polygon label positions.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Errors that can occur when determining an optimum label position

use thiserror::Error;

/// Possible Polylabel errors
#[derive(Error, Debug, PartialEq, Eq)]
#[error("{0}")]
pub enum PolylabelError {
    #[error("Couldn't calculate a centroid for the input Polygon")]
    CentroidCalculation,
    #[error("Couldn't calculate a bounding box for the input Polygon")]
    RectCalculation,
    #[error("The tolerance must be a positive number (got zero, a negative number, or NaN)")]
    InvalidTolerance,
}