ST_LineInterpolatePoints()¶
按照比例间隔返回线段上的一组规则分布点。
语法¶
ST_LineInterpolatePoints(line, fraction)
参数说明¶
参数 |
说明 |
|---|---|
|
GEOMETRY 或 GEOMETRY32 中的 LINESTRING。 |
|
沿线段的位置,类型为 FLOAT64。 |
返回值¶
返回与输入相同几何类型族的几何值。
使用说明¶
示例¶
DROP DATABASE IF EXISTS geo_operation_demo;
CREATE DATABASE geo_operation_demo;
USE geo_operation_demo;
SELECT ST_AsText(ST_LineInterpolatePoints(ST_GeomFromText('LINESTRING(0 0,10 0)'), 0.25)) AS result_geometry;
DROP DATABASE geo_operation_demo;