geo::algorithm::rhumb

Trait RhumbDestination

Source
pub trait RhumbDestination<T: CoordFloat> {
    // Required method
    fn rhumb_destination(&self, bearing: T, distance: T) -> Point<T>;
}
👎Deprecated since 0.29.0: Please use the Rhumb::destination method from the Destination trait instead
Expand description

Returns the destination Point having travelled the given distance along a [rhumb line] from the origin geometry with the given bearing

Note: this implementation uses a mean earth radius of 6371.088 km, based on the recommendation of the IUGG

Required Methods§

Source

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

👎Deprecated since 0.29.0: Please use the Rhumb::destination method from the Destination trait instead

Returns the destination Point having travelled the given distance along a rhumb line from the origin Point with the given bearing

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

let p_1 = Point::new(9.177789688110352, 48.776781529534965);
let p_2 = p_1.rhumb_destination(45., 10000.);
assert_eq!(p_2, Point::new(9.274348757829898, 48.84037308229984))

Implementors§