/// <summary>
        ///
        /// </summary>
        /// <param name="argIndex"></param>
        /// <param name="coord"></param>
        /// <param name="onLocation"></param>
        private void InsertPoint(int argIndex, Coordinate coord, Location onLocation)
        {
            var n   = NodeMap.AddNode(coord);
            var lbl = n.Label;

            if (lbl == null)
            {
                n.Label = new Label(argIndex, onLocation);
            }
            else
            {
                lbl.SetLocation(argIndex, onLocation);
            }
        }
        /// <summary>
        /// Adds candidate boundary points using the current <see cref="IBoundaryNodeRule"/>.
        /// This is used to add the boundary
        /// points of dim-1 geometries (Curves/MultiCurves).
        /// </summary>
        /// <param name="argIndex"></param>
        /// <param name="coord"></param>
        private void InsertBoundaryPoint(int argIndex, Coordinate coord)
        {
            var n = NodeMap.AddNode(coord);
            // nodes always have labels
            var lbl = n.Label;
            // the new point to insert is on a boundary
            int boundaryCount = 1;
            // determine the current location for the point (if any)
            //Location loc = Location.Null;
            var loc = lbl.GetLocation(argIndex, Positions.On);

            if (loc == Location.Boundary)
            {
                boundaryCount++;
            }

            // determine the boundary status of the point according to the Boundary Determination Rule
            var newLoc = DetermineBoundary(_boundaryNodeRule, boundaryCount);

            lbl.SetLocation(argIndex, newLoc);
        }
Esempio n. 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="node"></param>
 /// <returns></returns>
 public Node AddNode(Node node)
 {
     return(_nodes.AddNode(node));
 }