/// <summary> /// /// </summary> /// <param name="start"></param> /// <param name="end"></param> /// <returns></returns> private LineSegment Flatten(int start, int end) { // make a new segment for the simplified point Coordinate p0 = _linePts[start]; Coordinate p1 = _linePts[end]; LineSegment newSeg = new LineSegment(p0, p1); // update the indexes Remove(_line, start, end); _outputIndex.Add(newSeg); return(newSeg); }
/// <summary> /// Simplify a collection of <c>TaggedLineString</c>s. /// </summary> /// <param name="taggedLines">The collection of lines to simplify.</param> public virtual void Simplify(IList taggedLines) { for (IEnumerator i = taggedLines.GetEnumerator(); i.MoveNext();) { _inputIndex.Add((TaggedLineString)i.Current); } for (IEnumerator i = taggedLines.GetEnumerator(); i.MoveNext();) { TaggedLineStringSimplifier tlss = new TaggedLineStringSimplifier(_inputIndex, _outputIndex); tlss.DistanceTolerance = _distanceTolerance; tlss.Simplify((TaggedLineString)i.Current); } }