Ejemplo n.º 1
0
 public override bool Covers(IGeometry g)
 {
     // short-circuit test
     if (!EnvelopeCovers(g))
     {
         return(false);
     }
     // optimization for rectangle arguments
     if (_isRectangle)
     {
         return(true);
     }
     return(PreparedPolygonCovers.Covers(this, g));
 }
Ejemplo n.º 2
0
        ///<summary>
        /// Computes the <c>Covers</c> spatial relationship predicate for a <see cref="PreparedPolygon"/> relative to all other <see cref="IGeometry"/> classes.
        ///</summary>
        /// <param name="prep">The prepared polygon</param>
        /// <param name="geom">A test geometry</param>
        /// <returns>true if the polygon covers the geometry</returns>
        public static bool Covers(PreparedPolygon prep, IGeometry geom)
        {
            PreparedPolygonCovers polyInt = new PreparedPolygonCovers(prep);

            return(polyInt.Covers(geom));
        }