Ejemplo n.º 1
0
        /// <summary>
        ///  Snaps the vertices in the component <see cref="ILineString" />s
        ///  of the source geometry
        ///  to the vertices of the given geometry.
        /// </summary>
        /// <param name="g"></param>
        /// <param name="tolerance"></param>
        /// <returns></returns>
        public IGeometry SnapTo(IGeometry g, double tolerance)
        {
            ICoordinate[] snapPts = ExtractTargetCoordinates(g);

            SnapTransformer snapTrans = new SnapTransformer(tolerance, snapPts);

            return(snapTrans.Transform(srcGeom));
        }
Ejemplo n.º 2
0
        /// <summary>
        ///  Snaps the vertices in the component <see cref="ILineString" />s
        ///  of the source geometry
        ///  to the vertices of the given geometry.
        /// </summary>
        /// <param name="g"></param>
        /// <param name="tolerance"></param>
        /// <returns></returns>
        public IGeometry SnapTo(IGeometry g, double tolerance)
        {
            ICoordinate[] snapPts = ExtractTargetCoordinates(g);

            SnapTransformer snapTrans = new SnapTransformer(tolerance, snapPts);
            return snapTrans.Transform(srcGeom);
        }