shapely.point_on_surface#
- point_on_surface(geometry, **kwargs)#
Returns a point that intersects an input geometry.
- Parameters:
- geometryGeometry or array_like
- **kwargs
See NumPy ufunc docs for other keyword arguments.
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>