Skip to main content

LineInterpolateStrategy

Trait LineInterpolateStrategy 

Source
pub trait LineInterpolateStrategy<L: Linestring> {
    // Required method
    fn interpolate(&self, ls: &L, t: f64) -> L::Point;
}
Expand description

A strategy for interpolating a point at a fractional arc-length along a linestring.

Mirrors the per-coordinate-system line-interpolate-strategy concept from boost/geometry/strategies/line_interpolate.hpp.

Required Methods§

Source

fn interpolate(&self, ls: &L, t: f64) -> L::Point

Walk ls and return the point at fractional arc-length t (in [0, 1]).

Mirrors boost::geometry::strategy::line_interpolate::cartesian:: apply. t = 0 returns the first point, t = 1 the last; t outside [0, 1] clamps to the endpoints.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§