shapely.convex_hull

Contents

shapely.convex_hull#

convex_hull(geometry, **kwargs)#

Computes the minimum convex geometry that encloses an input geometry.

Parameters:
geometryGeometry or array_like
**kwargs

See NumPy ufunc docs for other keyword arguments.

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>