Show / Hide Table of Contents

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.

Convex hull diagram.

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
TargetVersions
.NET Standard 2.0100.3 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.0 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 100.15
Relevant samples
Convex hull: Create a convex hull for a given set of points. The convex hull is a polygon with shortest perimeter that encloses a set of points. As a visual analogy, consider a set of points as nails in a board. The convex hull of the points would be like a rubber band stretched around the outermost nails.

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 (true), or one enclosing geometry for each in the collection (false).

Returns
Type Description
IEnumerable<Geometry>

If merge is true, returns a collection with a single convex hull that encloses all geometries. If merge is false, returns a collection with separate convex hulls for each of the geometries. If geometries is empty, returns an empty enumerable.

Remarks

The geometries must have consistent spatial references.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.1 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.1 - 100.15
Xamarin.iOS100.1 - 100.15
UWP100.1 - 100.14
Relevant samples
Convex hull list: Generate convex hull polygon(s) from multiple input geometries.
In This Article
Back to top Copyright © 2022 Esri.