> ## 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_StraightSkeleton

Computes the straight skeleton of a polygonal geometry. The straight skeleton is a method of representing a polygon by a topological skeleton, formed by a continuous shrinking process where each edge moves inward in parallel at a uniform speed.

This function uses the weighted straight skeleton algorithm based on Felkel's approach.

This function may have significant performance limitations when processing polygons with a very large number of vertices. For very large polygons (e.g., 10,000+ vertices), applying vertex reduction or simplification is essential to achieve practical computation times.

## Signatures

```sql theme={"system"}
ST_StraightSkeleton(geom: Geometry)
```

## Parameters

<ParamField body="geom" type="Geometry" required>
  The input geometry.
</ParamField>

## Return type

<ResponseField type="Geometry">
  The resulting geometry.
</ResponseField>

## Examples

```sql theme={"system"}
SELECT ST_StraightSkeleton(
  ST_GeomFromWKT('POLYGON ((45 0, 55 0, 55 40, 70 40, 70 50, 30 50, 30 40, 45 40, 45 0))')
)
```

```
MULTILINESTRING ((50 5, 50 45), (50 45, 35 45), (50 45, 65 45), (35 45, 30 45), (35 45, 40 40), (65 45, 70 45), (65 45, 60 40), (50 5, 45 5), (50 5, 55 5))
```

<img src="https://mintcdn.com/wherobots/wLm_IRUSNlHZTHJP/images/sql-functions/ST_StraightSkeleton/ST_StraightSkeleton.svg?fit=max&auto=format&n=wLm_IRUSNlHZTHJP&q=85&s=fdc5d86b437db302355b1befaaca3e41" alt="ST_StraightSkeleton" width="400" height="230" data-path="images/sql-functions/ST_StraightSkeleton/ST_StraightSkeleton.svg" />

### Simple Square

```sql theme={"system"}
SELECT ST_StraightSkeleton(
  ST_GeomFromWKT('POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))')
)
```

```
MULTILINESTRING ((5 5, 0 5), (5 5, 5 0), (5 5, 10 5), (5 5, 5 10))
```
