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