Trait geo::algorithm::vincenty_length::VincentyLength [−][src]
Determine the length of a geometry using Vincenty’s formulae.
Required methods
fn vincenty_length(&self) -> Result<T, FailedToConvergeError>
[src]
Determine the length of a geometry using Vincenty’s formulae.
Units
- return value: meters
Examples
use geo::prelude::*; use geo::LineString; let linestring = LineString::<f64>::from(vec![ // New York City (-74.006, 40.7128), // London (-0.1278, 51.5074), // Osaka (135.5244559, 34.687455) ]); let length = linestring.vincenty_length().unwrap(); assert_eq!( 15_109_158., // meters length.round() );
Implementors
impl<T> VincentyLength<T, Line<T>> for Line<T> where
T: CoordFloat + FromPrimitive,
[src]
T: CoordFloat + FromPrimitive,
fn vincenty_length(&self) -> Result<T, FailedToConvergeError>
[src]
The units of the returned value is meters.
impl<T> VincentyLength<T, LineString<T>> for LineString<T> where
T: CoordFloat + FromPrimitive,
[src]
T: CoordFloat + FromPrimitive,
fn vincenty_length(&self) -> Result<T, FailedToConvergeError>
[src]
impl<T> VincentyLength<T, MultiLineString<T>> for MultiLineString<T> where
T: CoordFloat + FromPrimitive,
[src]
T: CoordFloat + FromPrimitive,