/// <summary>
        /// Computes the union of the specified <see cref="IGeometry" /> instances.
        /// </summary>
        /// <param name="geometry">The geometry.</param>
        /// <param name="otherGeometry">The other geometry.</param>
        /// <returns>The union of the <see cref="IGeometry" /> instances.</returns>
        /// <exception cref="System.ArgumentNullException">
        /// The geometry is null.
        /// or
        /// The other geometry is null.
        /// </exception>
        /// <exception cref="System.ArgumentException">The operation is not supported with the specified geometry types.</exception>
        public static IGeometry Union(this IGeometry geometry, IGeometry otherGeometry)
        {
            if (geometry == null)
            {
                throw new ArgumentNullException("geometry", "The geometry is null.");
            }
            if (otherGeometry == null)
            {
                throw new ArgumentNullException("otherGeometry", "The other geometry is null.");
            }

            using (IGeometryOverlayOperator op = GetOverlayOperator(geometry))
            {
                return(op.Union(geometry, otherGeometry));
            }
        }
Beispiel #2
0
 public void Setup()
 {
     _factory  = new GeometryFactory();
     _operator = new HalfedgeGeometryOverlayOperator(_factory);
 }