Class ConvexHull
Computes the convex hull of a Geometry. The convex hull is the smallest convex Geometry that contains all the points in the input Geometry. Uses the Graham Scan algorithm.
Inherited Members
Namespace: NetTopologySuite.Algorithm
Assembly: NetTopologySuite.dll
Syntax
public class ConvexHull
Constructors
| Improve this Doc View SourceConvexHull(Geometry)
Create a new convex hull construction for the input Geometry
.
Declaration
public ConvexHull(Geometry geometry)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geometry |
ConvexHull(IEnumerable<Coordinate>, GeometryFactory)
Create a new convex hull construction for the input Coordinate array.
Declaration
public ConvexHull(IEnumerable<Coordinate> pts, GeometryFactory geomFactory)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Coordinate> | pts | |
GeometryFactory | geomFactory |
Methods
| Improve this Doc View SourceCreate(IEnumerable<Geometry>)
Computes the convex hull for the given sequence of Geometry instances.
Declaration
public static Geometry Create(IEnumerable<Geometry> geoms)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Geometry> | geoms | The Geometry instances whose convex hull to compute. |
Returns
Type | Description |
---|---|
Geometry | The convex hull of |
GetConvexHull()
Returns a Geometry
that represents the convex hull of the input point.
The point will contain the minimal number of points needed to
represent the convex hull. In particular, no more than two consecutive
points will be collinear.
Declaration
public Geometry GetConvexHull()
Returns
Type | Description |
---|---|
Geometry | If the convex hull contains 3 or more points, a |