Method MergeConsecutive
- Namespace
- GeometryHelper.Extension
- Assembly
- GeometryHelper.dll
MergeConsecutive(IEnumerable<GeoLine2>)
Rejoins segments already in order along a run, where one ends and the next begins.
public static GeoLine2[] MergeConsecutive(this IEnumerable<GeoLine2> segments)
Parameters
segmentsIEnumerable<GeoLine2>
Returns
- GeoLine2[]
MergeConsecutive(IEnumerable<GeoLine2>, Tolerance)
Rejoins segments already in order along a run, where one ends and the next begins, within a tolerance.
public static GeoLine2[] MergeConsecutive(this IEnumerable<GeoLine2> segments, Tolerance tolerance)
Parameters
segmentsIEnumerable<GeoLine2>The pieces, in order along the run they were cut from.
toleranceToleranceThe tolerance.
Returns
- GeoLine2[]
One segment per unbroken stretch, in order.
Remarks
This is the counterpart of Join(IEnumerable<GeoLine2>, Tolerance) for pieces whose order is already known, which is what splitting hands back: it walks the list once instead of searching, and it will not reverse anything to make it fit.
Exceptions
- ArgumentNullException
Thrown when
segmentsis null.
MergeConsecutive(IEnumerable<GeoPolyline2>)
Rejoins chains already in order along a run, where one ends and the next begins.
public static GeoPolyline2[] MergeConsecutive(this IEnumerable<GeoPolyline2> polylines)
Parameters
polylinesIEnumerable<GeoPolyline2>
Returns
MergeConsecutive(IEnumerable<GeoPolyline2>, Tolerance)
Rejoins chains already in order along a run, where one ends and the next begins, within a tolerance.
public static GeoPolyline2[] MergeConsecutive(this IEnumerable<GeoPolyline2> polylines, Tolerance tolerance)
Parameters
polylinesIEnumerable<GeoPolyline2>The pieces, in order along the run they were cut from.
toleranceToleranceThe tolerance.
Returns
- GeoPolyline2[]
One chain per unbroken stretch, in order.
Exceptions
- ArgumentNullException
Thrown when
polylinesis null.
MergeConsecutive(IEnumerable<GeoLine3>)
Rejoins segments already in order along a run, where one ends and the next begins.
public static GeoLine3[] MergeConsecutive(this IEnumerable<GeoLine3> segments)
Parameters
segmentsIEnumerable<GeoLine3>
Returns
- GeoLine3[]
MergeConsecutive(IEnumerable<GeoLine3>, Tolerance)
Rejoins segments already in order along a run, where one ends and the next begins, within a tolerance.
public static GeoLine3[] MergeConsecutive(this IEnumerable<GeoLine3> segments, Tolerance tolerance)
Parameters
segmentsIEnumerable<GeoLine3>The pieces, in order along the run they were cut from.
toleranceToleranceThe tolerance.
Returns
- GeoLine3[]
One segment per unbroken stretch, in order.
Exceptions
- ArgumentNullException
Thrown when
segmentsis null.
MergeConsecutive(IEnumerable<GeoPolyline3>)
Rejoins chains already in order along a run, where one ends and the next begins.
public static GeoPolyline3[] MergeConsecutive(this IEnumerable<GeoPolyline3> polylines)
Parameters
polylinesIEnumerable<GeoPolyline3>
Returns
MergeConsecutive(IEnumerable<GeoPolyline3>, Tolerance)
Rejoins chains already in order along a run, where one ends and the next begins, within a tolerance.
public static GeoPolyline3[] MergeConsecutive(this IEnumerable<GeoPolyline3> polylines, Tolerance tolerance)
Parameters
polylinesIEnumerable<GeoPolyline3>The pieces, in order along the run they were cut from.
toleranceToleranceThe tolerance.
Returns
- GeoPolyline3[]
One chain per unbroken stretch, in order.
Exceptions
- ArgumentNullException
Thrown when
polylinesis null.