> ## 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_ApproximateMedialAxis (Python)

> Compute an approximate medial axis of an areal geometry by computing the straight skeleton and filtering to keep only interior edges.

Compute an approximate medial axis of an areal geometry by computing the straight skeleton
and filtering to keep only interior edges. The medial axis provides a centerline representation
of polygons that is useful for various spatial analysis tasks.

SQL reference: [`ST_ApproximateMedialAxis`](/reference/wherobots-db/geometry-data/processing/ST_ApproximateMedialAxis)

## Signature

```python theme={"system"}
from sedona.spark.sql.st_functions import ST_ApproximateMedialAxis

ST_ApproximateMedialAxis(
    geometry: ColumnOrName,
    max_vertices: Optional[Union[ColumnOrName, int]] = None,
) -> Column
```

## Parameters

<ParamField path="geometry" type="ColumnOrName" required>
  Polygon or MultiPolygon geometry column to compute the medial axis for.
</ParamField>

<ParamField path="max_vertices" type="Optional[Union[ColumnOrName, int]]" default="None">
  Optional maximum number of vertices to keep in the input geometry before computing.
  If the geometry has more vertices, it will be simplified. This improves performance for complex geometries.
</ParamField>

## Returns

<ResponseField name="return" type="Column">
  MultiLineString representing the approximate medial axis as a geometry column.
</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.