コード例 #1
0
        /// <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
            ICoordinate p0     = linePts[start];
            ICoordinate p1     = linePts[end];
            LineSegment newSeg = new LineSegment(p0, p1);

            // update the indexes
            Remove(line, start, end);
            outputIndex.Add(newSeg);
            return(newSeg);
        }
コード例 #2
0
 /// <summary>
 /// Simplify a collection of <c>TaggedLineString</c>s.
 /// </summary>
 /// <param name="taggedLines">The collection of lines to simplify.</param>
 public 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);
     }
 }