跳转至
🎉 Apache Sedona 1.9.1 已正式发布!🗺️ 新增 Geography SQL 函数、Box2D 与 Box3D 类型、栅格 Python UDF 等。查看发布说明 →

ST_MakeLine

Introduction: Creates a LineString containing the points of Point, MultiPoint, or LineString geometries. Other geometry types cause an error.

ST_MakeLine

Format:

ST_MakeLine(geom1: Geometry, geom2: Geometry)

Return type: Geometry

ST_MakeLine(geoms: Geometry) This Geometry must be a GeometryCollection of the geometry types listed above.

SQL Example:

SELECT ST_AsText( ST_MakeLine(ST_Point(1,2), ST_Point(3,4)) );

Output:

LINESTRING(1 2,3 4)

SQL Example:

SELECT ST_AsText( ST_MakeLine( 'LINESTRING(0 0, 1 1)', 'LINESTRING(2 2, 3 3)' ) );

Output:

 LINESTRING(0 0,1 1,2 2,3 3)