Name

ST_EndM — Returns the M coordinate of the last point of a LineString, CircularLineString, or NURBSCurve.

Synopsis

float8 ST_EndM(geometry geom);

Beskrivning

Returns the M coordinate of the last point of a LINESTRING, CIRCULARLINESTRING, or NURBSCURVE geometry. Returns NULL if the input geometry does not have an M dimension or is not a LINESTRING, CIRCULARLINESTRING, or NURBSCURVE.

Denna metod stöder cirkulära strängar och kurvor.

Exempel

End M value of a LineString

SELECT ST_EndM('LINESTRING M(0 0 10, 1 1 20, 2 0 30)'::geometry);
 st_endm
---------
      30

End M value of a CircularString

SELECT ST_EndM('CIRCULARSTRING M(0 0 5, 1 1 10, 2 0 15)'::geometry);
 st_endm
---------
      15

End M value of a NURBSCurve

SELECT ST_EndM('NURBSCURVE M(2, (0 0 100, 1 1 200, 2 0 300))'::geometry);
 st_endm
---------
     300

Geometry without M dimension returns NULL

SELECT ST_EndM('LINESTRING(0 0, 1 1)'::geometry) IS NULL AS is_null;
 is_null
---------
 t