Method Within
Within(Geometry, Geometry)
Returns true
if geometry1 is within geometry2.
Declaration
public static bool Within(this Geometry geometry1, Geometry geometry2)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geometry1 | The first geometry to calculate intersection with. |
Geometry | geometry2 | The second geometry to calculate intersection with. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Remarks
This method is one of several that determines the spatial relationship between two geometries. If the spatial relationship exists between the two input geometries then true is returned. If the spatial relationship does not exist between the two input geometries then false is returned. The spatial relationship test used by this method is based on the Dimensionally Extended 9 Intersection Model (DE-9IM) developed Clementini, et al., and is discussed further in the web pages: DE-9IM and Understanding spatial relations.
The GeometryEngine.Within Method returns true if geometry1 lies in the interior of geometry2. The boundary and interior of the geometry1 is not allowed to intersect the exterior of the geometry2 and the geometry1 may not equal the geometry2. The following is a visual example of when this method returns true:
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 |