示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pts"></param>
        /// <param name="distanceTolerance"></param>
        /// <returns></returns>
        public static Coordinate[] Simplify(ICoordinate[] pts, double distanceTolerance)
        {
            DouglasPeuckerLineSimplifier simp = new DouglasPeuckerLineSimplifier(pts);

            simp.DistanceTolerance = distanceTolerance;
            return(simp.Simplify());
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="coords"></param>
 /// <param name="parent"></param>
 /// <returns></returns>
 protected override ICoordinateSequence TransformCoordinates(ICoordinateSequence coords, IGeometry parent)
 {
     ICoordinate[] inputPts = coords.ToCoordinateArray();
     Coordinate[]  newPts   = DouglasPeuckerLineSimplifier.Simplify(inputPts, container.DistanceTolerance);
     return(factory.CoordinateSequenceFactory.Create(newPts));
 }