Name

ST_LocateBetween — Return a derived geometry collection value with elements that match the specified range of measures inclusively. Polygonal elements are not supported.

Synopsis

geometry ST_LocateBetween(geometry geomA, float8 measure_start, float8 measure_end, float8 offset);

Description

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 by old name ST_Locate_Between_Measures.

Changed: 2.0.0 - in prior versions this used to be called ST_Locate_Between_Measures. The old name has been deprecated and will be removed in the future but is still available for backward compatibility.

This function supports M coordinates.

Examples

SELECT ST_AsText(the_geom)
		FROM
		(SELECT ST_LocateBetween(
			ST_GeomFromText('MULTILINESTRING M ((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
------------------------------------------------------------------------
 GEOMETRYCOLLECTION M (LINESTRING M (1 2 3,3 4 2,9 4 3),POINT M (1 2 3))

--Geometry collections are difficult animals so dump them
--to make them more digestable
SELECT ST_AsText((ST_Dump(the_geom)).geom)
		FROM
		(SELECT ST_LocateBetween(
			ST_GeomFromText('MULTILINESTRING M ((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
--------------------------------
 LINESTRING M (1 2 3,3 4 2,9 4 3)
 POINT M (1 2 3)

See Also

ST_Dump, ST_LocateAlong