Exemple #1
0
 /// <summary>
 /// This method assigns the holes for a Polygon (formed from a list of
 /// MinimalEdgeRings) to its shell.
 /// Determining the holes for a MinimalEdgeRing polygon serves two purposes:
 /// it is faster than using a point-in-polygon check later on.
 /// it ensures correctness, since if the PIP test was used the point
 /// chosen might lie on the shell, which might return an incorrect result from the
 /// PIP test.
 /// </summary>
 /// <param name="shell"></param>
 /// <param name="minEdgeRings"></param>
 private void PlacePolygonHoles(EdgeRing shell, IList minEdgeRings)
 {
     for (IEnumerator it = minEdgeRings.GetEnumerator(); it.MoveNext();)
     {
         MinimalEdgeRing er = (MinimalEdgeRing)it.Current;
         if (er.IsHole)
         {
             er.Shell = shell;
         }
     }
 }
 /// <summary>
 /// 
 /// </summary>
 /// <returns></returns>
 public IList BuildMinimalRings()
 {
     IList minEdgeRings = new ArrayList();
     DirectedEdge de = startDe;
     do 
     {
         if (de.MinEdgeRing == null) 
         {
             EdgeRing minEr = new MinimalEdgeRing(de, geometryFactory);
             minEdgeRings.Add(minEr);
         }
         de = de.Next;
     } 
     while (de != startDe);
     return minEdgeRings;
 }
Exemple #3
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public IList BuildMinimalRings()
        {
            IList        minEdgeRings = new ArrayList();
            DirectedEdge de           = startDe;

            do
            {
                if (de.MinEdgeRing == null)
                {
                    EdgeRing minEr = new MinimalEdgeRing(de, geometryFactory);
                    minEdgeRings.Add(minEr);
                }
                de = de.Next;
            }while (de != startDe);
            return(minEdgeRings);
        }