pub trait GeodesicDestination<T: CoordNum> {
    // Required method
    fn geodesic_destination(&self, bearing: T, distance: T) -> Point<T>;
}
Expand description

Returns a new Point using the distance to the existing Point and a bearing for the direction on a geodesic.

This uses the geodesic methods given by Karney (2013).

Required Methods§

source

fn geodesic_destination(&self, bearing: T, distance: T) -> Point<T>

Returns a new Point using distance to the existing Point and a bearing for the direction.

§Units
  • bearing: degrees, zero degrees is north
  • distance: meters
§Examples
use geo::GeodesicDestination;
use geo::Point;

// Determine the point 10000 km NE of JFK.
let jfk = Point::new(-73.78, 40.64);
let northeast_bearing = 45.0;
let distance = 10e6;

let p_1 = jfk.geodesic_destination(northeast_bearing, distance);
use approx::assert_relative_eq;
assert_relative_eq!(p_1.x(), 49.052487092959836);
assert_relative_eq!(p_1.y(), 32.621100463725796);

Implementors§