ST_Locate_Between_Measures — Return a derived geometry collection value with elements that match the specified range of measures inclusively. Polygonal elements are not supported.
geometry ST_Locate_Between_Measures(geometry geomA, float measure_start, float measure_end);
Return a derived geometry collection value with elements that match the specified range of measures inclusively. Polygonal elements are not supported.
Semantic is specified by: ISO/IEC CD 13249-3:200x(E) - Text for Continuation CD Editing Meeting
Availability: 1.1.0
This function supports M coordinates.
SELECT ST_AsEWKT(the_geom)
FROM
(SELECT ST_Locate_Between_Measures(
ST_GeomFromEWKT('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3),
(1 2 3, 5 4 5))'),1.5, 3) As the_geom) As foo;
st_asewkt
-----------------------------------------------------------------
GEOMETRYCOLLECTIONM(LINESTRING(1 2 3,3 4 2,9 4 3),POINT(1 2 3))
--Geometry collections are difficult animals so dump them
--to make them more digestable
SELECT ST_AsEWKT((ST_Dump(the_geom)).geom)
FROM
(SELECT ST_Locate_Between_Measures(
ST_GeomFromEWKT('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3),
(1 2 3, 5 4 5))'),1.5, 3) As the_geom) As foo;
st_asewkt
--------------------------------
LINESTRINGM(1 2 3,3 4 2,9 4 3)
POINTM(1 2 3)