shapely.get_m#
- get_m(point, **kwargs)#
Return the m-coordinate of a point.
Note
‘get_m’ requires at least GEOS 3.12.0.
Added in version 2.1.0.
- Parameters:
- pointGeometry or array_like
Non-point geometries or geometries without M dimension will result in NaN being returned.
- **kwargs
See NumPy ufunc docs for other keyword arguments.
Examples
>>> from shapely import Point, from_wkt >>> get_m(from_wkt("POINT ZM (1 2 3 4)")) 4.0 >>> get_m(from_wkt("POINT M (1 2 4)")) 4.0 >>> get_m(Point(1, 2, 3)) nan >>> get_m(from_wkt("MULTIPOINT M ((1 1 1), (2 2 2))")) nan