Skip to main content
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

Signature

Parameters

ColumnOrName
required
Polygon or MultiPolygon geometry column to compute the medial axis for.
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.

Returns

Column
MultiLineString representing the approximate medial axis as a geometry column.