Nombre

ST_3DLineInterpolatePoint — Returns a point interpolated along a 3D line at a fractional location.

Sinopsis

geometry ST_3DLineInterpolatePoint(geometry a_linestring, float8 a_fraction);

Descripción

Devuelve un punto interpolado a lo largo de una línea. El primer argumento debe ser un LINESTRING. El segundo argumento es un float8 entre 0 y 1 que representa la fracción de la longitud total de la cadena de línea del punto tiene que ser localizado.

[Nota]

ST_LineInterpolatePoint computes points in 2D and then interpolates the values for Z and M, while this function computes points in 3D and only interpolates the M value.

Disponibilidad: 2.1.0

This function supports 3d and will not drop the z-index.

Ejemplos

Return point 20% along 3D line

Code
SELECT ST_3DLineInterpolatePoint(
'LINESTRING(25 50 70,100 125 90,150 190 200)',
0.20);
Output
POINT Z (59.06758929108215 84.06758929108216 79.0846904776219)
Figure
Geometry figure for visual-st-3dlineinterpolatepoint-01