Ejemplo n.º 1
0
        /// <summary>
        /// Union a pair of geometries,
        /// using the more performant overlap union algorithm if possible.
        /// </summary>
        /// <param name="g0">A geometry to union</param>
        /// <param name="g1">A geometry to union</param>
        /// <param name="unionFun">Function to union two geometries</param>
        /// <returns>The union of the inputs</returns>
        public static Geometry Union(Geometry g0, Geometry g1, UnionStrategy unionFun)
        {
            var union = new OverlapUnion(g0, g1, unionFun);

            return(union.Union());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Union a pair of geometries,
        /// using the more performant overlap union algorithm if possible.
        /// </summary>
        /// <param name="g0">A geometry to union</param>
        /// <param name="g1">A geometry to union</param>
        /// <returns>The union of the inputs</returns>
        public static Geometry Union(Geometry g0, Geometry g1)
        {
            var union = new OverlapUnion(g0, g1);

            return(union.Union());
        }
        /// <summary>
        /// Encapsulates the actual unioning of two polygonal geometries.
        /// </summary>
        /// <param name="g0">A geometry to union</param>
        /// <param name="g1">A geometry to union</param>
        /// <returns>The union of the inputs</returns>
        private static Geometry UnionActual(Geometry g0, Geometry g1)
        {
            var union = OverlapUnion.Union(g0, g1);;

            return(RestrictToPolygons(union));
        }