shapely.get_num_points#
- get_num_points(geometry, **kwargs)#
Return the number of points in a linestring or linearring.
Returns 0 for not-a-geometry values. The number of points in geometries other than linestring or linearring equals zero.
- Parameters:
- geometryGeometry or array_like
Geometry or geometries to get the number of points of.
- **kwargs
See NumPy ufunc docs for other keyword arguments.
See also
Examples
>>> from shapely import LineString, MultiPoint >>> get_num_points(LineString([(0, 0), (1, 1), (2, 2), (3, 3)])) 4 >>> get_num_points(MultiPoint([(0, 0), (1, 1), (2, 2), (3, 3)])) 0 >>> get_num_points(None) 0