Method ConvexHull
ConvexHull(Geometry)
Returns the minimum bounding geometry that completely encloses the given geometry.
Declaration
public static Geometry ConvexHull(Geometry geometry)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | geometry | Specifies the input geometry. |
Returns
| Type | Description |
|---|---|
| Geometry | A geometry that represents the convex hull. |
Remarks
A convex hull is the smallest polygon that encloses a group of objects, such as points. Visually, the boundary of a convex hull polygon is the shape a rubber band would take around a group of objects.
Exceptions
| Type | Condition |
|---|---|
| System.NotImplementedException | A true curve geometry was used as input when it is not supported by this operation. |
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
ConvexHull(IEnumerable<Geometry>, Boolean)
Returns the convex hull for the geometries in the given collection.
Declaration
public static IEnumerable<Geometry> ConvexHull(IEnumerable<Geometry> geometries, bool merge)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<Geometry> | geometries | A collection of geometries. |
| Boolean | merge | Whether to return a single geometry that encloses all the geometries ( |
Returns
| Type | Description |
|---|---|
| IEnumerable<Geometry> | If |
Remarks
The geometries must have consistent spatial references.
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 |