Beispiel #1
0
        /// <summary>
        ///     Adds vertices along line or polygon features. Also replaces curve segments (Bezier, circular arcs, and elliptical
        ///     arcs) with line segments
        /// </summary>
        /// <param name="source">The source.</param>
        /// <param name="distance">
        ///     The maximum linear distance between vertices. This distance will always be applied to line
        ///     segments and to simplify curves. The default value is a function of the data's X,Y tolerance.
        /// </param>
        /// <param name="deviation">
        ///     The maximum distance the output segment can be from the original. This parameter only affects
        ///     curves. The default value is a function of the data's X,Y tolerance.
        /// </param>
        /// <param name="densificationMethod">
        ///     The method selected to handle feature densification.
        ///     - DISTANCE —The tool will apply the value of the distance parameter to curves the same as it does to straight
        ///     lines. This is the default.
        ///     - OFFSET —The tool will apply the value of the max_deviation parameter to curves.
        ///     - ANGLE —The tool will apply the value of the max_angle parameter to curves.
        /// </param>
        /// <param name="angle">
        ///     The maximum angle that the output geometry can be from the input geometry. The valid range is from
        ///     0 to 90. The default value is 10. This parameter only affects curves.
        /// </param>
        /// <param name="trackCancel">The track cancel.</param>
        /// <param name="eventHandler">The events.</param>
        public static void Densify(this IFeatureClass source, double distance, double deviation, string densificationMethod = "DISTANCE", double angle = 10, ITrackCancel trackCancel = null, IGeoProcessorEvents eventHandler = null)
        {
            Densify gp = new Densify();

            gp.in_features          = source;
            gp.densification_method = densificationMethod;
            gp.distance             = distance;
            gp.max_angle            = angle;
            gp.max_deviation        = deviation;
            gp.Run(trackCancel, eventHandler);
        }
Beispiel #2
0
        /// <summary>
        ///     Adds vertices along line or polygon features. Also replaces curve segments (Bezier, circular arcs, and elliptical
        ///     arcs) with line segments
        /// </summary>
        /// <param name="source">The source.</param>
        /// <param name="trackCancel">The track cancel.</param>
        /// <param name="eventHandler">The events.</param>
        public static void Densify(this IFeatureClass source, ITrackCancel trackCancel, IGeoProcessorEvents eventHandler)
        {
            Densify gp = new Densify();

            gp.in_features          = source;
            gp.densification_method = "DISTANCE";
            gp.distance             = 10;
            gp.max_angle            = 10;
            gp.max_deviation        = "";
            gp.Run(trackCancel, eventHandler);
        }