Trait geo::algorithm::geodesic_intermediate::GeodesicIntermediate[][src]

pub trait GeodesicIntermediate<T: CoordFloat> {
    fn geodesic_intermediate(&self, other: &Point<T>, f: T) -> Point<T>;
fn geodesic_intermediate_fill(
        &self,
        other: &Point<T>,
        max_dist: T,
        include_ends: bool
    ) -> Vec<Point<T>>; }

Returns a new Point along a route between two existing points on an ellipsoidal model of the earth

Required methods

fn geodesic_intermediate(&self, other: &Point<T>, f: T) -> Point<T>[src]

Returns a new Point along a route between two existing points on an ellipsoidal model of the earth

Examples

use geo::algorithm::geodesic_intermediate::GeodesicIntermediate;
use geo::Point;

let p1 = Point::<f64>::new(10.0, 20.0);
let p2 = Point::<f64>::new(125.0, 25.0);
let i20 = p1.geodesic_intermediate(&p2, 0.2);
let i50 = p1.geodesic_intermediate(&p2, 0.5);
let i80 = p1.geodesic_intermediate(&p2, 0.8);
let i20_should = Point::new(29.842907, 29.951445);
let i50_should = Point::new(65.879360, 37.722253);
let i80_should = Point::new(103.556796, 33.506196);
assert_relative_eq!(i20, i20_should, epsilon = 1.0e-6);
assert_relative_eq!(i50, i50_should, epsilon = 1.0e-6);
assert_relative_eq!(i80, i80_should, epsilon = 1.0e-6);

fn geodesic_intermediate_fill(
    &self,
    other: &Point<T>,
    max_dist: T,
    include_ends: bool
) -> Vec<Point<T>>
[src]

Loading content...

Implementors

impl GeodesicIntermediate<f64> for Point<f64>[src]

Loading content...