geopandas.GeoSeries.boundary

property GeoSeries.boundary

Returns a GeoSeries of lower dimensional objects representing each geometries’s set-theoretic boundary.

See also

GeoSeries.exterior

outer boundary (without interior rings)

Examples

>>> from shapely.geometry import Polygon, LineString, Point
>>> s = geopandas.GeoSeries(
...     [
...         Polygon([(0, 0), (1, 1), (0, 1)]),
...         LineString([(0, 0), (1, 1), (1, 0)]),
...         Point(0, 0),
...     ]
... )
>>> s
0    POLYGON ((0.00000 0.00000, 1.00000 1.00000, 0....
1    LINESTRING (0.00000 0.00000, 1.00000 1.00000, ...
2                              POINT (0.00000 0.00000)
dtype: geometry
>>> s.boundary
0    LINESTRING (0.00000 0.00000, 1.00000 1.00000, ...
1        MULTIPOINT (0.00000 0.00000, 1.00000 0.00000)
2                             GEOMETRYCOLLECTION EMPTY
dtype: geometry