shapely.get_x

Contents

shapely.get_x#

get_x(point, **kwargs)#

Returns the x-coordinate of a point

Parameters:
pointGeometry or array_like

Non-point geometries will result in NaN being returned.

**kwargs

See NumPy ufunc docs for other keyword arguments.

See also

get_y, get_z

Examples

>>> from shapely import MultiPoint, Point
>>> get_x(Point(1, 2))
1.0
>>> get_x(MultiPoint([(1, 1), (1, 2)]))
nan