I am curious about the internal working of ST_ApproximateMedialAxis(geometry) when a complex polygon is passed to this function.
How does it calculate the medial axis internally?
I am curious about the internal working of ST_ApproximateMedialAxis(geometry) when a complex polygon is passed to this function.
How does it calculate the medial axis internally?
The PostGIS ST_ApproximateMedialAxis uses the SFCGAL approximateMedialAxis function (code here). This function computes the straight skeleton using CGAL. It then returns only skeleton edges which are considered to form the medial axis according to the logic in this function.