ST_LineInterpolatePoint¶
Returns a point interpolated along a line.
Usage¶
geometry ST_LineInterpolatePoint(geom: geometry, fraction: double)
Arguments¶
- geom (geometry): Input geometry
- fraction (double)
Description¶
Returns a point interpolated along a line. First argument must be a LINESTRING. Second argument is a double between 0 and 1 representing fraction of total linestring length the point has to be located.
Examples¶
SELECT ST_LineInterpolatePoint(ST_GeomFromWKT('LINESTRING(25 50, 100 125, 150 190)'), 0.2);
┌──────────────────────────────────────────────────────────────────────────────┐
│ st_lineinterpolatepoint(st_geomfromwkt(Utf8("LINESTRING(25 50, 100 125, 150 │
│ 190)")),Float64(0.2))… │
╞══════════════════════════════════════════════════════════════════════════════╡
│ POINT(51.5974135047432 76.5974135047432) │
└──────────────────────────────────────────────────────────────────────────────┘