Skip to content
πŸŽ‰ SedonaDB 0.4.0 is out now! πŸ—ΊοΈ Python DataFrame API, R dplyr, Geography support & GPU-accelerated spatial joins. Read the release blog β†’

ST_Length

Introduction: Returns the perimeter of A.

Warning

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

ST_Length

Format: ST_Length (A: Geometry)

Return type: Double

Since: v1.0.0

SQL Example

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

Output:

123.0147027033899