예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="coords"></param>
        /// <param name="parent"></param>
        /// <returns></returns>
        protected override CoordinateSequence TransformCoordinates(CoordinateSequence coords, Geometry parent)
        {
            var srcPts = coords.ToCoordinateArray();
            var newPts = SnapLine(srcPts, _snapPts);

            return(Factory.CoordinateSequenceFactory.Create(newPts));
        }
            /// <inheritdoc cref="GeometryTransformer.TransformCoordinates(CoordinateSequence, Geometry)"/>
            protected override CoordinateSequence TransformCoordinates(CoordinateSequence coords, Geometry parent)
            {
                var inputPts = coords.ToCoordinateArray();
                var newPts   = inputPts.Length == 0
                    ? new Coordinate[0]
                    : DouglasPeuckerLineSimplifier.Simplify(inputPts, _container.DistanceTolerance);

                return(Factory.CoordinateSequenceFactory.Create(newPts));
            }
예제 #3
0
            protected override CoordinateSequence TransformCoordinates(
                CoordinateSequence coords, Geometry parent)
            {
                var inputPts = coords.ToCoordinateArray();
                var newPts   =
                    DensifyPoints(inputPts, _distanceTolerance, parent.PrecisionModel);

                // prevent creation of invalid LineStrings
                if (parent is LineString && newPts.Length == 1)
                {
                    newPts = new Coordinate[0];
                }
                return(Factory.CoordinateSequenceFactory.Create(newPts));
            }
예제 #4
0
            protected override CoordinateSequence TransformCoordinates(CoordinateSequence coords, Geometry parent)
            {
                var inputPts = coords.ToCoordinateArray();

                Coordinate[] newPts;
                if (inputPts.Length == 0)
                {
                    newPts = new Coordinate[0];
                }
                else
                {
                    newPts = VWLineSimplifier.Simplify(inputPts, _distanceTolerance);
                }
                return(Factory.CoordinateSequenceFactory.Create(newPts));
            }