geopandas.GeoSeries.minimum_bounding_radius#

GeoSeries.minimum_bounding_radius()[来源]#

返回一个 Series,其中包含包围每个几何图形的最小边界圆的半径。

另请参阅

GeoSeries.minumum_bounding_circle

最小包围圆(几何)

示例

>>> from shapely.geometry import Point, LineString, Polygon
>>> s = geopandas.GeoSeries(
...     [
...         Polygon([(0, 0), (1, 1), (0, 1), (0, 0)]),
...         LineString([(0, 0), (1, 1), (1, 0)]),
...         Point(0,0),
...     ]
... )
>>> s
0    POLYGON ((0 0, 1 1, 0 1, 0 0))
1        LINESTRING (0 0, 1 1, 1 0)
2                       POINT (0 0)
dtype: geometry
>>> s.minimum_bounding_radius()
0    0.707107
1    0.707107
2    0.000000
dtype: float64