示例#1
0
        public static bool AreInIntersectionExtentVsExtent(IPolygonExtent a, IExtent b)
        {
            ICompositeExtent composite = b as ICompositeExtent;

            if (null != composite)
            {
                return(a.Intersects(composite));
            }

            composite = a as ICompositeExtent;
            if (null != composite)
            {
                return(b.Intersects(composite));
            }

            ICircularExtent circle = b as ICircularExtent;

            if (null != circle)
            {
                _tempCircleB.Reset(b);
                return(circle.Intersects(_tempCircleB));
            }

            IPolygonExtent polygon = b as IPolygonExtent;

            if (null != polygon)
            {
                return(a.Intersects(polygon));
            }

            throw new InvalidOperationException("Extent must be a circle or polygon");
        }
示例#2
0
        public static bool AreInIntersectionCircleVsExtent(IPolygonExtent a, IExtent b)
        {
            _tempCircleA.Reset(a);
            ICircularExtent circle = b as ICircularExtent;

            if (null != circle)
            {
                return(circle.Intersects(_tempCircleA));
            }

            IPolygonExtent polygon = b as IPolygonExtent;

            if (null != polygon)
            {
                return(polygon.Intersects(_tempCircleA));
            }

            throw new InvalidOperationException("Extent must be a circle or polygon");
        }
示例#3
0
 public static bool AreInIntersectionExtentVsCircle(IPolygonExtent a, IExtent b)
 {
     _tempCircleB.Reset(b);
     return(a.Intersects(_tempCircleB));
 }