shapely.point_on_surface#

point_on_surface(geometry, **kwargs)#

Returns a point that intersects an input geometry.

Parameters
geometryGeometry or array_like
**kwargs

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

Examples

>>> from shapely import LineString, MultiPoint, Polygon
>>> point_on_surface(Polygon([(0, 0), (10, 0), (10, 10), (0, 10), (0, 0)]))
<POINT (5 5)>
>>> point_on_surface(LineString([(0, 0), (2, 2), (10, 10)]))
<POINT (2 2)>
>>> point_on_surface(MultiPoint([(0, 0), (10, 10)]))
<POINT (0 0)>
>>> point_on_surface(Polygon())
<POINT EMPTY>