ST_M — Returns the M coordinate of a Point
double ST_M(bytea Point);
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.
| 2D | 3D | M |
|---|---|---|
![]() | ![]() | ![]() |
| 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.2 | 6.1.6 |
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: org.cartosig.jaspa.exceptions.JASPAException: The geometry must be a Point: found MultiPoint