shapely.minimum_bounding_radius

shapely.minimum_bounding_radius#

minimum_bounding_radius(geometry, **kwargs)#

Compute the radius of the minimum bounding circle of an input geometry.

Parameters:
geometryGeometry or array_like

Geometry or geometries for which to compute the minimum bounding radius.

**kwargs

See NumPy ufunc docs for other keyword arguments.

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