shapely.minimum_bounding_radius#

minimum_bounding_radius(geometry, **kwargs)#

Computes the radius of the minimum bounding circle that encloses an input geometry.

Note

‘minimum_bounding_radius’ requires at least GEOS 3.8.0.

Parameters
geometryGeometry or array_like
**kwargs

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

Examples

>>> from shapely import GeometryCollection, LineString, MultiPoint, Point, Polygon
>>> minimum_bounding_radius(Polygon([(0, 5), (5, 10), (10, 5), (5, 0), (0, 5)]))
5.0
>>> minimum_bounding_radius(LineString([(1, 1), (1, 10)]))
4.5
>>> minimum_bounding_radius(MultiPoint([(2, 2), (4, 2)]))
1.0
>>> minimum_bounding_radius(Point(0, 1))
0.0
>>> minimum_bounding_radius(GeometryCollection())
0.0