Constructs the set-theoretic intersection between two geometries.
public static Geometry Intersection(this Geometry geometry1, Geometry geometry2)
The first geometry.
The second geometry of dimension equal to or greater than the elements of the first geometry.
A geometry that represents the intersection of the two input geometries.
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.
Platforms and versions
|.NET Standard 2.0||100.3 - 200.1|
|.NET 6.0||100.13 - 200.1|
|.NET 6.0 Windows||100.13 - 200.1|
|.NET 6.0 Android||200.0 - 200.1|
|.NET 6.0 iOS||200.0 - 200.1|
|.NET Framework||100.0 - 200.1|
|.NET 5||100.10 - 100.12|
|.NET Core 3.1||100.7 - 100.12|
|Android||100.0 - 100.15|
|iOS||100.0 - 100.15|
|UWP||100.0 - 200.1|