geopandas.GeoSeries.interiors#

property GeoSeries.interiors#

返回一个 Series 表示GeoSeries中每个多边形的内环的列表。

适用于仅包含多边形的GeoSeries。

退货
INNER_RING:列表系列

GeoSeries中每个多边形的内环。

参见

GeoSeries.exterior

外边界

示例

>>> from shapely.geometry import Polygon
>>> s = geopandas.GeoSeries(
...     [
...         Polygon(
...             [(0, 0), (0, 5), (5, 5), (5, 0)],
...             [[(1, 1), (2, 1), (1, 2)], [(1, 4), (2, 4), (2, 3)]],
...         ),
...         Polygon([(1, 0), (2, 1), (0, 0)]),
...     ]
... )
>>> s
0    POLYGON ((0.00000 0.00000, 0.00000 5.00000, 5....
1    POLYGON ((1.00000 0.00000, 2.00000 1.00000, 0....
dtype: geometry
>>> s.interiors
0    [LINEARRING (1 1, 2 1, 1 2, 1 1), LINEARRING (...
1                                                   []
dtype: object