Пример #1
0
        private int depthDelta  = 0;  // the change in area depth from the R to Curve side of this edge

        /// <summary>
        ///
        /// </summary>
        /// <param name="pts"></param>
        /// <param name="label"></param>
        public Edge(ICoordinate[] pts, Label label)
        {
            this.eiList = new EdgeIntersectionList(this);

            this.pts   = pts;
            this.label = label;
        }
Пример #2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="pts"></param>
        /// <param name="label"></param>
        public Edge(ICoordinate[] pts, Label label)
        {
            this.eiList = new EdgeIntersectionList(this);

            this.pts = pts;
            this.label = label;
        }
Пример #3
0
 /// <summary>
 /// Check that a ring does not self-intersect, except at its endpoints.
 /// Algorithm is to count the number of times each node along edge occurs.
 /// If any occur more than once, that must be a self-intersection.
 /// </summary>
 private void CheckNoSelfIntersectingRing(EdgeIntersectionList eiList)
 {
     ISet nodeSet = new ListSet();
     bool isFirst = true;
     foreach(EdgeIntersection ei in eiList)
     {
         if (isFirst)
         {
             isFirst = false;
             continue;
         }
         if (nodeSet.Contains(ei.Coordinate))
         {
             validErr = new TopologyValidationError(TopologyValidationErrors.RingSelfIntersection, ei.Coordinate);
             return;
         }
         else nodeSet.Add(ei.Coordinate);
     }
 }