Skip to main content

Module line_interpolate

Module line_interpolate 

Source
Expand description

line_interpolate(ls, t) -> Point — point at fractional arc-length t ∈ [0, 1] along ls.

Mirrors boost::geometry::line_interpolate(ls, length, out) from boost/geometry/algorithms/line_interpolate.hpp. Boost takes an absolute length; the Rust port takes a fraction — easier to reason about and matching the common GIS API (PostGIS::ST_LineInterpolatePoint, Shapely’s interpolate(normalized=True)). Values of t outside [0, 1] clamp to the endpoints, matching Boost’s silent-clamp behaviour.

Functions§

line_interpolate
Return the point at fractional arc-length t ∈ [0, 1] along ls, measured by accumulated Pythagorean segment length.