pub fn compacity(polygon: Polygon<'_>) -> f64
Expand description

Compute the compacity of a polygon

use geometric_features::compacity;
let polygon: Vec<(f64,f64)> = vec![
    (0.0, 0.0),
    (1.0, 0.0),
    (1.0, 1.0),
    (0.0, 1.0),
];
assert_eq!(compacity(&polygon), 0.10132118364233779);