Class jsts.algorithm.ConvexHull
- Defined in: ConvexHull.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Computes the convex hull of a Geometry.
|
Method Summary
Class Detail
jsts.algorithm.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.
Method Detail
-
getConvexHull()Returns a Geometry that represents the convex hull of the input geometry. The returned geometry contains the minimal number of points needed to represent the convex hull. In particular, no more than two consecutive points will be collinear.
- Returns:
- if the convex hull contains 3 or more points, a Polygon ; 2 points, a LineString; 1 point, a Point; 0 points, an empty GeometryCollection.