shapely.convex_hull#

convex_hull(geometry, **kwargs)#

Computes the minimum convex geometry that encloses an input geometry.

Parameters
geometryGeometry or array_like
**kwargs

For other keyword-only arguments, see the NumPy ufunc docs.

Examples

>>> from shapely import MultiPoint, Polygon
>>> convex_hull(MultiPoint([(0, 0), (10, 0), (10, 10)]))
<POLYGON ((0 0, 10 10, 10 0, 0 0))>
>>> convex_hull(Polygon())
<GEOMETRYCOLLECTION EMPTY>