> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ST_Length2D

Returns the perimeter of A. This function is an alias of [ST\_Length](/reference/wherobots-db/geometry-data/measurement/ST_Length).

<Warning>
  Since `v1.7.0`, this function only supports LineString, MultiLineString, and GeometryCollections containing linear geometries. Use [ST\_Perimeter](/reference/wherobots-db/geometry-data/measurement/ST_Perimeter) for polygons.
</Warning>

<img src="https://mintcdn.com/wherobots/fqh3gPDE0J25Lra_/images/sql-functions/ST_Length2D/ST_Length2D.svg?fit=max&auto=format&n=fqh3gPDE0J25Lra_&q=85&s=54e0ec3a4c623ec3fc2a0e76a7d50f07" alt="ST_Length2D" width="500" height="300" data-path="images/sql-functions/ST_Length2D/ST_Length2D.svg" />

## Return type

<ResponseField type="Double">
  A numeric value.
</ResponseField>

## Example

```sql theme={"system"}
SELECT ST_Length2D(ST_GeomFromWKT('LINESTRING(38 16,38 50,65 50,66 16,38 16)'))
```

```
123.0147027033899
```
