Trait geo::algorithm::length::Length [] [src]

pub trait Length<T, RHS = Self> {
    fn length(&self) -> T;
}

Calculation of the length

Required Methods

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