Name

ST_M — Returns the M coordinate of a Point

Synopsis

double ST_M(bytea Point);

Alias

M

Description

Returns the M coordinate of a Point. If the M coordinate is not available, returns Null. Input geometry must be a point, otherwise throws an error.

Coordinate Dimensions
2D3DM
Spatial Standards Support
OGC SFS for SQL. 1.1 (1999)OGC SFS for SQL. 1.1.0 (2005)OGC SFS for SQL. 1.2.0 (2006))SQL-MM Part 3
--7.2.9.26.1.6

Examples

SELECT ST_M(ST_GeomFromEWKT('POINT(0 0 0 -8)'));
--Result--
  -8

SELECT ST_M(ST_GeomFromText('POINT(0 0)'));
--Result--
null

SELECT ST_M(ST_GeomFromEWKT('MULTIPOINT(0 0 0 -8,1 1 1 -4)'));
--Result--
ERROR:  es.upv.jaspa.exceptions.JASPAException: The geometry must be a Point: found MultiPoint

Related functions

ST_X , ST_Y , ST_Z