Method Union
Union(Geometry, Geometry)
The union operation constructs the set-theoretic union of the geometries in the input array.
Declaration
public static Geometry Union(Geometry geometry1, Geometry geometry2)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geometry1 | The first geometry to union with. |
Geometry | geometry2 | The second geometry to union with. |
Returns
Type | Description |
---|---|
Geometry | The union of the two geometries. |
Remarks
GeometryEngine.Union returns all parts of the two input geometries combined into a single geometry. This means that the
order of the input parameters is irrelevant. In a theoretical variable format
you can think of the GeometryEngine.Union equation like:
A (Union) B = C
B (Union) A = C
The following is a visual illustration of two polygon geometries and how the output result would be from the GeometryEngine.Union operation:
If the two geometries have different dimensionality, returns a copy of the geometry with the higher dimensionality. E.g. if given a polygon and a point, returns the polygon.
Supports true curves.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.0 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 100.15 |
Relevant samples
Union(IEnumerable<Geometry>)
Calculates the union of a collection of geometries
Declaration
public static Geometry Union(IEnumerable<Geometry> geometries)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Geometry> | geometries | A collection of geometries. |
Returns
Type | Description |
---|---|
Geometry | The union of all the geometries in the given collection. |
Remarks
There must be at least one geometry in the given collection. The geometries must have consistent spatial references. If the collection contains geometries of differing dimensionality, returns the union of the subset of geometries with the highest dimensionality. E.g. given a collection of polygons, polylines and points, returns the union of the polygons.
Supports true curves.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.1 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.1 - 100.15 |
Xamarin.iOS | 100.1 - 100.15 |
UWP | 100.1 - 100.14 |