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

ST_Length2D

Introduction: Returns the perimeter of A. This function is an alias of ST_Length.

Warning

Since v1.7.0, this function only supports LineString, MultiLineString, and GeometryCollections containing linear geometries. Use ST_Perimeter for polygons.

ST_Length2D

Format: ST_Length2D (A:geometry)

Return type: Double

Since: v1.6.1

Example:

SELECT ST_Length2D(ST_GeomFromWKT('LINESTRING(38 16,38 50,65 50,66 16,38 16)'))

Output:

123.0147027033899