Here is a solution in postgis that fits the use-case (image) that you describe. There are some assumptions though:
- It assumes simple (non multi) polygons
- Every polygon is only intersected by 1 other polygon (you can fix that, but it requires more coding).
- There will be a straight line between the cutting points of the polygon (that may not be the center line that you are looking for)
WITH polygons AS (
SELECT 1 as id, ST_Buffer(ST_MakePoint(10,10),3) geom
SELECT 2 as id, ST_Buffer(ST_MakePoint(5,10),3) geom
--Uncomment this to see what happens when multiple polygons overlap
--SELECT 3 as id, ST_Buffer(ST_MakePoint(7.5,7.5),3) geom
,cut_polygons AS (
FROM polygons a
LEFT JOIN polygons b ON (ST_Intersects(a.geom, b.geom) AND a.id != b.id)
SELECT id, ST_MakePolygon(ST_AddPoint(geom, ST_StartPoint(geom))) geom
The trick is that the polygons are first converted to linestrings (ST_ExteriorRing) that are cookie-cut by an overlapping polygon (ST_Difference). The result is a linestring (ST_LineMerge) with a gap. When you fill that gap with a straight line (ST_AddPoint) you have a polygon (ST_MakePolygon) that is more or less split at the center of the overlap.