geopandas.GeoSeries.interiors

property GeoSeries.interiors

Returns a Series of List representing the inner rings of each polygon in the GeoSeries.

Applies to GeoSeries containing only Polygons.

Returns
inner_rings: Series of List

Inner rings of each polygon in the GeoSeries.

See also

GeoSeries.exterior

outer boundary

Examples

>>> 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