Returns the elements of a geometry whose m coordinates fall within the specified range.
Syntax
geometry ST_LocateBetween(geometry geomA, float8 measureStart, float8 measureEnd, float8 offset);Parameters
| Parameter | Description |
|---|---|
geomA | The input geometry. |
measureStart | The minimum m coordinate that is allowed. |
measureEnd | The maximum m coordinate that is allowed. |
offset | The offset that is applied during the computation. |
Usage notes
Polygon geometries are not supported.
When
offsetis specified, the result is shifted laterally along the input line by that many units. A positive value shifts left; a negative value shifts right.
Examples
Return the points with m coordinates between 3 and 6:
SELECT ST_AsText(ST_LocateBetween(ST_GeomFromText('MultiPointM((1 2 3),(4 5 6),(7 8 9))'),3,6));Output:
st_astext
----------------------------
MULTIPOINT M (1 2 3,4 5 6)
(1 row)该文章对您有帮助吗?