Esempio n. 1
0
        }         // private EdgeRing FindShell( ArrayList minEdgeRings )

        /// <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:
        /// <ul>
        /// <li>it is faster than using a point-in-polygon check later on.</li>
        /// <li>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</li>
        /// </ul>
        /// </summary>
        /// <param name="shell"></param>
        /// <param name="minEdgeRings"></param>
        private void PlacePolygonHoles(EdgeRing shell, ArrayList minEdgeRings)
        {
            foreach (object obj in minEdgeRings)
            {
                MinimalEdgeRing er = (MinimalEdgeRing)obj;
                if (er.IsHole)
                {
                    er.Shell = shell;
                }
            }     // foreach ( object obj in minEdgeRings )
        }         // private void PlacePolygonHoles( EdgeRing shell, ArrayList minEdgeRings )
Esempio n. 2
0
        }                             // public void LinkDirectedEdgesForMinimalEdgeRings()

        public ArrayList BuildMinimalRings()
        {
            ArrayList    minEdgeRings = new ArrayList();
            DirectedEdge de           = _startDe;

            do
            {
                if (de.MinEdgeRing == null)
                {
                    EdgeRing minEr = new MinimalEdgeRing(de, _geometryFactory, _cga);
                    minEdgeRings.Add(minEr);
                }
                de = de.Next;
            } while (de != _startDe);
            return(minEdgeRings);
        }         // public ArrayList BuildMinimalRings()
Esempio n. 3
0
		} // public void LinkDirectedEdgesForMinimalEdgeRings()

		public ArrayList BuildMinimalRings()
		{
			ArrayList minEdgeRings = new ArrayList();
			DirectedEdge de = _startDe;
			do 
			{
				if ( de.MinEdgeRing == null  ) 
				{
					EdgeRing minEr = new MinimalEdgeRing( de, _geometryFactory, _cga ) ;
					minEdgeRings.Add( minEr );
				}
				de = de.Next;
			} while ( de != _startDe );
			return minEdgeRings;
		} // public ArrayList BuildMinimalRings()