convexHull method
Computes the smallest convex Polygon
that contains all the
points in the Geometry
. This obviously applies only to Geometry
s which contain 3 or more points; the results for degenerate cases are
specified as follows:
Number of Point s in argument Geometry |
Geometry class of result |
---|---|
0 | empty GeometryCollection |
1 | Point |
2 | LineString |
3 or more | Polygon |
@return the minimum-area convex polygon containing this Geometry
'
s points
Implementation
Geometry convexHull() {
return ConvexHull(this).getConvexHull();
}