convexHull static method

Geometry convexHull(
  1. Geometry geometry
)

Calculates the minimum bounding geometry (convex hull) that completely encloses the given geometry.

The convex hull is the minimal bounding geometry, consisting of straight segments, that encloses the input geometry, such that all outer angles are convex. If you imagine a rubber band stretched around the input geometry, the rubber band takes the shape of the convex hull.

When a geometry contains curves, the computed convex hull will still consist of straight segments, not curves, so may not fit tightly to the geometry.

Parameters:

  • geometry — A geometry object.

Return Value: The minimum bounding straight-edged geometry that completely encloses the given geometry.