How to sequence Line Segment ?

Jan 12, 2012 at 11:25 AM

I need to sequence different segments of point like


They can be disjoint.

I was trying with LineMerger but he does not works.

Where can I found documentation on Topology ?

Many Thanks


Jan 12, 2012 at 12:03 PM

sth along the lines of this example:

Hth FObermaier

Jan 12, 2012 at 12:44 PM

that is my code:

List<LineString> lsList = new List<LineString>();

//List generation. All LineString are of 2 points

LineMerger lineMerger = new LineMerger();


FeatureSet fs = new FeatureSet(FeatureType.Line);

foreach (LineString ls in lineMerger.MergedLineStrings)
    Feature arc = new Feature(FeatureType.Line, ls.Coordinates);
Is Very similar to the example you posted, but if I save the FeatureSet from the original segment and the merged the does not overlaps:
In magenta the orignal segments, in black the result.


Jan 12, 2012 at 1:10 PM

Thinking it better if the points are the result of a calculation may not be identical for a comparison with ==

This could be a problem or the function is safe for this problem?

In this case I can substitute points within an EPS distance by assigning an equal value.

Many Thanks !

Jan 12, 2012 at 2:01 PM

Could you post input linestring wkts or coordinates and result multipolygon wkt?

I can check what NTS does with it. It may be more robust than DotSpatial.Topology

Cheers FObermaier