Example #1
0
        public override bool IsIntersects(Geometry other)
        {
            switch (other)
            {
            case Point point:
                return(IntersectCheckOperator.IsIntersects(point, this));

            case MultiPoint multiPoint:
                return(IntersectCheckOperator.IsIntersects(multiPoint, this));

            default:
                throw new Exception("Not supported type!");
            }
        }
Example #2
0
        public override bool IsIntersects(Geometry other)
        {
            switch (other)
            {
            case Point point:
                return(IntersectCheckOperator.IsIntersects(point, this));

            case MultiPoint multiPoint:
                foreach (Point pt in multiPoint.Geometries)
                {
                    if (IntersectCheckOperator.IsIntersects(pt, this))
                    {
                        return(true);
                    }
                }
                return(false);

            case Polygon polygon:
            default:
                throw new Exception("Not supported type!");
            }
        }