pub fn polylabels<P: GetXY, R: NewXYM<PolyLabelMetadata>>(
polygons: &[Vec<Vec<P>>],
precision: Option<f64>,
) -> Vec<R>Expand description
§Polylabels
§Description
Find the labels for a collection of vector polygons
§Usage
use gistools::tools::{PolyLabelMetadata, polylabels};
use s2json::VectorPoint;
let data: Vec<Vec<Vec<VectorPoint<()>>>> = vec![vec![vec![]]];
let emp: Vec<VectorPoint<PolyLabelMetadata>> = polylabels(&data, None);
assert_eq!(emp, vec![VectorPoint::new_xy(0., 0., Some(PolyLabelMetadata::new(0.)))]);§Links
§Parameters
polygons: the vector multi-polygon to find the label forprecision: the precision of the label
§Returns
The collection of label positions and the distances to the labels