Mungkin ini bukan solusi yang sangat elegan dan didasarkan pada metode menjawab pertanyaan: /gis//a/295348/120129 .
Ini adalah salah satu varian dari penyelesaian pertanyaan Anda, buat geoinstrument (bagi saya ini adalah jalan dengan nama "road_border" selebar 11 m, tipe - line (MultiLineString)),
jalankan geoinstrument :-),
WITH
tbla AS (SELECT id, ((ST_DumpPoints(geom)).geom) geom FROM road_border),
tblb AS (SELECT (ST_Buffer((ST_Dump(geom)).geom, 0.0001)) geom FROM tbla),
tblc AS (SELECT ST_Centroid(ST_UnaryUnion(Unnest(ST_ClusterWithin(geom, 0.0001)))) geom FROM tblb),
tbld AS (SELECT ((ST_Dump(ST_DelaunayTriangles(ST_Collect(geom)))).geom) geom FROM tblc),
tble AS (SELECT (ST_Boundary(geom)) geom FROM ST_Dump((SELECT ST_Polygonize(geom) geom FROM (SELECT ST_Union(geom) geom FROM
(SELECT ST_ExteriorRing(geom) geom FROM tbld) AS lines) AS foo))),
tblf AS (SELECT ST_MakeLine(p1, p2) geom FROM (SELECT ST_PointN(geom, generate_series(1, ST_NPoints(geom)-1)) p1,
ST_PointN(geom, generate_series(2, ST_NPoints(geom))) p2 FROM tble) AS geom),
tblj AS (SELECT ST_Buffer((ST_Dump(ST_Union(ST_Buffer(geom, 0.0005)))).geom, -0.0005) geom FROM road_border)
SELECT ST_Intersection (a.geom, b.geom) geom FROM tblf a JOIN tblj b ON ST_Within (a.geom, b.geom);
dan lihat hasilnya.
Semoga sukses untuk semua orang :-),
Solusi asli ...
Script ini disebut - ST_RoadAxisFromDelaunayTriangulation ...