Exemple #1
0
        /// <summary>
        ///     Moves points or vertices to coincide exactly with the vertices, edges, or end points of other features.
        ///     Snapping rules can be specified to control whether the input vertices are snapped to the nearest vertex, edge, or
        ///     endpoint within a specified distance
        /// </summary>
        /// <param name="source">
        ///     The input features whose vertices will be snapped to the vertices, edges, or end points of other
        ///     features. The input features can be points, multipoints, lines, or polygons.
        /// </param>
        /// <param name="snapEnvironments">The feature classes or feature layers containing the features you wish to snap to.</param>
        /// <param name="trackCancel">The track cancel.</param>
        /// <param name="eventHandler">The events.</param>
        public static void Snap(this IFeatureClass source, IGpValueTableObject snapEnvironments, ITrackCancel trackCancel, IGeoProcessorEvents eventHandler)
        {
            Snap gp = new Snap();

            gp.in_features      = source;
            gp.snap_environment = snapEnvironments;
            gp.Run(trackCancel, eventHandler);
        }