Class ConvexHull
- Namespace
- NetTopologySuite.Algorithm
- Assembly
- NetTopologySuite.dll
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.
public class ConvexHull
- Inheritance
-
ConvexHull
- Inherited Members
Constructors
ConvexHull(Geometry)
Create a new convex hull construction for the input Geometry
.
public ConvexHull(Geometry geometry)
Parameters
geometry
Geometry
ConvexHull(IEnumerable<Coordinate>, GeometryFactory)
Create a new convex hull construction for the input Coordinate array.
public ConvexHull(IEnumerable<Coordinate> pts, GeometryFactory geomFactory)
Parameters
pts
IEnumerable<Coordinate>geomFactory
GeometryFactory
Methods
Create(IEnumerable<Geometry>)
Computes the convex hull for the given sequence of Geometry instances.
public static Geometry Create(IEnumerable<Geometry> geoms)
Parameters
geoms
IEnumerable<Geometry>The Geometry instances whose convex hull to compute.
Returns
- Geometry
The convex hull of
geoms
.
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.
public Geometry GetConvexHull()
Returns
- Geometry
If the convex hull contains 3 or more points, a
Polygon
; 2 points, aLineString
; 1 point, aPoint
; 0 points, an emptyGeometryCollection
.