Trait geo::algorithm::length::Length
[−]
[src]
pub trait Length<T, RHS = Self> { fn length(&self) -> T; }
Calculation of the length
Required Methods
fn length(&self) -> T
Calculation of the length of a Line
use geo::{Point, LineString, Coordinate}; use geo::algorithm::length::Length; let mut vec = Vec::new(); vec.push(Point::new(40.02f64, 116.34)); vec.push(Point::new(42.02f64, 116.34)); let linestring = LineString(vec); println!("Length {}", linestring.length());
Implementors
impl<T> Length<T> for Line<T> where
T: Float,impl<T> Length<T> for LineString<T> where
T: Float,impl<T> Length<T> for MultiLineString<T> where
T: Float,