pub trait GeodesicIntermediate<T: CoordFloat> {
// Required methods
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>>;
}
๐Deprecated since 0.29.0: Please use the
InterpolatePoint
trait insteadExpand description
Returns a new Point along a route between two existing points on an ellipsoidal model of the earth
Required Methodsยง
Sourcefn geodesic_intermediate(&self, other: &Point<T>, f: T) -> Point<T>
๐Deprecated since 0.29.0: Please use Geodesic.point_at_ratio_between
from the InterpolatePoint
trait instead
fn geodesic_intermediate(&self, other: &Point<T>, f: T) -> Point<T>
Geodesic.point_at_ratio_between
from the InterpolatePoint
trait insteadReturns a new Point along a route between two existing points on an ellipsoidal model of the earth
ยงExamples
use geo::GeodesicIntermediate;
use geo::Point;
let p1 = Point::new(10.0, 20.0);
let p2 = Point::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>>
๐Deprecated since 0.29.0: Please use
Geodesic.points_along_line
from the InterpolatePoint
trait instead