pub fn fit_segments_2d(
points: &[Point2],
options: &Segments,
) -> OgeomResult<Vec<Segment2>>Expand description
Fit a chain of lines and arcs to a polyline, every point within the tolerance of its piece, consecutive pieces meeting end to end and, for a closed polyline, the last meeting the first. See the module documentation for how, and for what is minimal.
Repeated consecutive points count once, and a closed polyline’s first point repeated at its end is dropped.
§Errors
OgeomError::Construction if
the tolerance is not positive, min_bow is negative, axis_snap is
not an angle from zero to a quarter turn, or there are fewer than two
distinct points, three for a closed polyline, and
OgeomError::Numeric if a point is
not finite.