Name

ST_LocateAlong — Return a derived geometry collection value with elements that match the specified measure. Polygonal elements are not supported.

Synopsis

geometry ST_LocateAlong(geometry ageom_with_measure, float8 a_measure, float8 offset);

Description

Return a derived geometry collection value with elements that match the specified measure. Polygonal elements are not supported.

If an offset is provided, the resultant will be offset to the left or right of the input line by the specified number of units. A positive offset will be to the left, and a negative one to the right.

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_Along_Measure.

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

[Note]

Use this function only for geometries with an M component

This function supports M coordinates.

Examples

SELECT ST_AsText(the_geom)
		FROM
		(SELECT ST_LocateAlong(
			ST_GeomFromText('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3),
		(1 2 3, 5 4 5))'),3) As the_geom) As foo;

						 st_asewkt
-----------------------------------------------------------
 MULTIPOINT 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_LocateAlong(
			ST_GeomFromText('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3),
	(1 2 3, 5 4 5))'),3) As the_geom) As foo;

   st_asewkt
---------------
 POINTM(1 2 3)
 POINTM(9 4 3)
 POINTM(1 2 3)
	

See Also

ST_Dump, ST_LocateBetween