Example #1
0
        /// <summary>
        /// This method will cause the ring to be computed.
        /// It will also check any holes, if they have been assigned.
        /// </summary>
        public bool ContainsPoint(Coordinate p)
        {
            LinearRing shell = m_objRing;
            Envelope   env   = shell.Bounds;

            if (!env.Contains(p))
            {
                return(false);
            }

            if (!CGAlgorithms.IsPointInRing(p, shell.Coordinates))
            {
                return(false);
            }

            for (IEnumerator i = holes.GetEnumerator(); i.MoveNext();)
            {
                EdgeRing hole = (EdgeRing)i.Current;
                if (hole.ContainsPoint(p))
                {
                    return(false);
                }
            }

            return(true);
        }