shapely.has_z

Contents

shapely.has_z#

has_z(geometry, **kwargs)#

Returns True if a geometry has Z coordinates.

Note that for GEOS < 3.12 this function returns False if the (first) Z coordinate equals NaN.

Parameters:
geometryGeometry or array_like
**kwargs

See NumPy ufunc docs for other keyword arguments.

Examples

>>> from shapely import Point
>>> has_z(Point(0, 0))
False
>>> has_z(Point(0, 0, 0))
True
>>> has_z(Point())
False