Method Intersection
Intersection(Geometry, Geometry)
Calculates the intersection of two geometries.
Declaration
public static Geometry Intersection(this Geometry geometry1, Geometry geometry2)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geometry1 | The first geometry. |
Geometry | geometry2 | The second geometry of dimension equal to or greater than the elements of the first geometry. |
Returns
Type | Description |
---|---|
Geometry | A geometry that represents the intersection of the two input geometries. |
Remarks
GeometryEngine.Intersection returns those parts of the two input geometries that have things in common. This means that the
order of the input parameters of the GeometryEngine.Intersection is irrelevant. In a theoretical variable format
you can think of the GeometryEngine.Intersection equation like:
A (Intersection) B = C
B (Intersection) A = C
The following is a visual illustration of two polygon geometries and how the output result would be from the GeometryEngine.Intersection operation:
The result has the same dimensionality as the lower dimensionality of the two intersecting geometries. If there is no intersection with this dimensionality, returns an empty geometry. For example, the intersection of two polygons (geometries with area, so they have dimensionality of 2) or, say, a polygon and an envelope (also an area) is a polygon. Similarly, the intersection of a polyline (a line, so dimensionality of 1) and another polyline is always a polyline. Therefore when computing the intersection of polylines, this function does not return points where they cross, but rather lines of overlap. If there are no lines of overlap, an empty polyline is returned even if the input lines cross. To obtain all intersections, irrespective of dimensionality, see Intersections(Geometry, Geometry). Returns an empty geometry if the two input geometries do not intersect.
Supports true curves.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |