pub fn offset_linestring(
coords: &[(f64, f64)],
distance: f64,
options: &OffsetOptions,
) -> Result<OffsetResult>Expand description
Compute a parallel offset of an open polyline.
§Arguments
coords– Input vertices as(x, y)slice. Consecutive duplicate vertices are treated as zero-length segments and skipped gracefully.distance– Signed offset distance. Positive = left of travel direction, negative = right.options– Join style, miter limit, and optional simplification.
§Errors
Returns AlgorithmError::InsufficientData when coords.len() < 2.
§Panics
Never panics in production code.