shapely.get_exterior_ring#

get_exterior_ring(geometry, **kwargs)#

Returns the exterior ring of a polygon.

Parameters
geometryGeometry or array_like
**kwargs

For other keyword-only arguments, see the NumPy ufunc docs.

Examples

>>> from shapely import Point, Polygon
>>> get_exterior_ring(Polygon([(0, 0), (0, 10), (10, 10), (10, 0), (0, 0)]))
<LINEARRING (0 0, 0 10, 10 10, 10 0, 0 0)>
>>> get_exterior_ring(Point(1, 1)) is None
True