Example #1
0
        /// <summary>
        /// Returns true if the intersection of the two geometries results in a geometry whose dimension is less than
        /// the maximum dimension of the two geometries and the intersection geometry is not equal to either.
        /// geometry.
        /// </summary>
        /// <param name="g1"></param>
        /// <param name="g2"></param>
        /// <returns></returns>
        public static bool Crosses(Geometry g1, Geometry g2)
        {
            Geometry g = g2.Intersection(g1);

            return(g.Intersection(g1).Dimension < Math.Max(g1.Dimension, g2.Dimension) && !g.Equals(g1) &&
                   !g.Equals(g2));
        }