shapely.has_z#
- has_z(geometry, **kwargs)#
Returns True if a geometry has a Z coordinate.
Note that this function returns False if the (first) Z coordinate equals NaN or if the geometry is empty.
- Parameters:
- geometryGeometry or array_like
- **kwargs
For other keyword-only arguments, see the NumPy ufunc docs.
See also
Examples
>>> from shapely import Point >>> has_z(Point(0, 0)) False >>> has_z(Point(0, 0, 0)) True >>> has_z(Point(0, 0, float("nan"))) False