All Products
Search
Document Center

ApsaraDB RDS:ST_InterpolatePoint

Last Updated:Mar 28, 2026

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

ParameterDescription
lineThe LineString object that you want to specify.
pointThe 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)