Method ToGeoLine2s
- Namespace
- GeometryHelper.Extension
- Assembly
- GeometryHelper.dll
ToGeoLine2s(List<GeoPoint2>)
Builds the open chain of line segments running through the points, one segment per consecutive pair.
The chain is not closed: nothing joins the last point back to the first, so a ring has to repeat its first point at the end to come out closed. A list of n points yields n - 1 segments, and a list of fewer than two points yields none rather than failing.
Coincident neighbours are not filtered, so a repeated point produces a zero length segment. Run RemoveConsecutiveNearPoints(List<GeoPoint2>, Tolerance) first when that matters.
public static List<GeoLine2> ToGeoLine2s(this List<GeoPoint2> points)
Parameters
Returns
Exceptions
- ArgumentNullException
Thrown when
pointsis null.