shapely.count_coordinates#

count_coordinates(geometry)#

Counts the number of coordinate pairs in a geometry array.

Parameters
geometryGeometry or array_like

Examples

>>> from shapely import LineString, Point
>>> count_coordinates(Point(0, 0))
1
>>> count_coordinates(LineString([(2, 2), (4, 2)]))
2
>>> count_coordinates(None)
0
>>> count_coordinates([Point(0, 0), None])
1