ST_PointAtDistance()¶
Returns the point at an absolute distance along a line.
Syntax¶
ST_PointAtDistance(line, distance)
Arguments¶
Argument |
Description |
|---|---|
|
A LINESTRING in GEOMETRY or GEOMETRY32. |
|
FLOAT64 position along the line. |
Return Value¶
Returns a geometry in the same geometry family as the input.
Usage Notes¶
Examples¶
DROP DATABASE IF EXISTS geo_operation_demo;
CREATE DATABASE geo_operation_demo;
USE geo_operation_demo;
SELECT ST_AsText(ST_PointAtDistance(ST_GeomFromText('LINESTRING(0 0,10 0)'), 3)) AS result_geometry;
DROP DATABASE geo_operation_demo;