ST_LocateBetween

更新时间:
复制 MD 格式

Returns a GeometryCollection containing the portions of a geometry whose m coordinates fall within the specified range.

Syntax

geometry ST_LocateBetween(geometry geomA, float8 measureStart, float8 measureEnd, float8 offset);

Parameters

ParameterDescription
geomAThe input geometry.
measureStartThe minimum m coordinate value.
measureEndThe maximum m coordinate value.
offsetThe lateral offset applied to the result. A positive value offsets to the left; a negative value offsets to the right.

Usage notes

  • Polygon geometries are not supported.

  • When offset is non-zero, the result is shifted the specified number of units left or right along the input line.

Examples

SELECT ST_AsText(ST_LocateBetween(ST_GeomFromText('MultiPointM((1 2 3),(4 5 6),(7 8 9))'),3,6));
         st_astext
----------------------------
 MULTIPOINT M (1 2 3,4 5 6)
(1 row)