Create numerous polygons to divide by lines (split)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Create numerous polygons to divide by lines (split)

teddy guerin
Hi everybody,

I apologize for my english.
I have create an another post on georezo (french geomatic  :
I would like create numerous polygons (like divide main polygons by lines).
In attachment 2 screenshots (theoric results and problems) and datas for tests (2 shapes)

I use this query (I add st_snaptogrid for more precisions) :
select p.id_triangle, array_agg(l.geom)||st_exteriorring(p.geom) as t
from "CTRL_SONDE_7123"."7123_TRIANGLE_non_intersect_Delau" p, "CTRL_SONDE_7123"."7123_line_intertriangle_Delau_step1_sel" l
WHERE st_intersects(st_snaptogrid(p.geom,0.0000001), st_snaptogrid(l.geom,0.0000001)) group by p.id_triangle,p.geom),
u AS (SELECT id_triangle, st_dump(st_node(st_collect(t))) d FROM t)

SELECT (st_dump(st_polygonize((d).geom ORDER BY (d).path))).geom FROM u
GROUP BY id_triangle;

Best regards

postgis-users mailing list
[hidden email]