Returns an interpolated measure (M) value at the location on a linear measured geometry closest to a given point.
Syntax
float8 ST_InterpolatePoint(geometry line, geometry point);Parameters
| Parameter | Description |
|---|---|
line | The LineString object that you want to specify. |
point | The point to project onto the line. |
Description
The function supports 3D geometries and preserves Z coordinates.
Example
SELECT ST_InterpolatePoint('LINESTRING M (0 0 0, 2 0 2)', 'POINT(1 1)');Output:
st_interpolatepoint
---------------------
1
(1 row)