[−][src]Trait geo::algorithm::frechet_distance::FrechetDistance
Determine the similarity between two LineStrings
using the Frechet distance.
Based on Computing Discrete Frechet Distance by T. Eiter and H. Mannila.
Required methods
fn frechet_distance(&self, rhs: &Rhs) -> T
Determine the similarity between two LineStrings
using the Frechet distance.
Examples
use geo::LineString; use geo::algorithm::frechet_distance::FrechetDistance; let ls_a = LineString::from(vec![(1., 1.), (2., 1.), (2., 2.), (3., 3.)]); let ls_b = LineString::from(vec![(2., 2.), (0., 1.), (2., 4.), (3., 4.)]); let distance = ls_a.frechet_distance(&ls_b); assert_eq!(2., distance);
Implementors
impl<T> FrechetDistance<T, LineString<T>> for LineString<T> where
T: Float + FromPrimitive,
[src]
T: Float + FromPrimitive,