Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pts"></param>
        /// <param name="distanceTolerance"></param>
        /// <returns></returns>
        public static Coordinate[] Simplify(Coordinate[] pts, double distanceTolerance)
        {
            var 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)
            {
                Coordinate[] inputPts = coords.ToCoordinateArray();
                Coordinate[] newPts   = inputPts.Length == 0
                    ? new Coordinate[0]
                    : DouglasPeuckerLineSimplifier.Simplify(inputPts, _container.DistanceTolerance);

                return(Factory.CoordinateSequenceFactory.Create(newPts));
            }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="pts"></param>
 /// <param name="distanceTolerance"></param>
 /// <returns></returns>
 public static Coordinate[] Simplify(Coordinate[] pts, double distanceTolerance)
 {
     DouglasPeuckerLineSimplifier simp = new DouglasPeuckerLineSimplifier(pts);
     simp.DistanceTolerance = distanceTolerance;
     return simp.Simplify();
 }