Table of Contents

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

segments IEnumerable<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

segments IEnumerable<GeoLine2>

The pieces, in order along the run they were cut from.

tolerance Tolerance

The 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 segments is 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

polylines IEnumerable<GeoPolyline2>

Returns

GeoPolyline2[]

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

polylines IEnumerable<GeoPolyline2>

The pieces, in order along the run they were cut from.

tolerance Tolerance

The tolerance.

Returns

GeoPolyline2[]

One chain per unbroken stretch, in order.

Exceptions

ArgumentNullException

Thrown when polylines is 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

segments IEnumerable<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

segments IEnumerable<GeoLine3>

The pieces, in order along the run they were cut from.

tolerance Tolerance

The tolerance.

Returns

GeoLine3[]

One segment per unbroken stretch, in order.

Exceptions

ArgumentNullException

Thrown when segments is 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

polylines IEnumerable<GeoPolyline3>

Returns

GeoPolyline3[]

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

polylines IEnumerable<GeoPolyline3>

The pieces, in order along the run they were cut from.

tolerance Tolerance

The tolerance.

Returns

GeoPolyline3[]

One chain per unbroken stretch, in order.

Exceptions

ArgumentNullException

Thrown when polylines is null.