[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    [postgis-users] Create numerous polygons to divide by lines (split)
From:       teddy guerin <teddyguerin () yahoo ! fr>
Date:       2017-05-12 17:13:44
Message-ID: 909225491.15904820.1494609224848 () mail ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi everybody, 

I apologize for my english.I have create an another post on georezo (french geomatic  \
:https://georezo.net/forum/viewtopic.php?pid=295258#p295258).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) :WITH t AS ( 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 regardsTed


[Attachment #5 (text/html)]

<html><head></head><body><div style="color:#000; background-color:#fff; \
font-family:times new roman, new york, times, serif;font-size:16px"><div \
id="yui_3_16_0_ym19_1_1494608093366_3780">Hi everybody, <br></div><div \
id="yui_3_16_0_ym19_1_1494608093366_3784"><br></div><div \
id="yui_3_16_0_ym19_1_1494608093366_3785">I apologize for my english.</div><div \
id="yui_3_16_0_ym19_1_1494608093366_3846" dir="ltr">I have create an another post on \
georezo (french geomatic&nbsp; \
:https://georezo.net/forum/viewtopic.php?pid=295258#p295258).</div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1494608093366_3847">I would like create numerous polygons (like \
divide main polygons by lines). <br></div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1494608093366_5405">In attachment 2 screenshots (theoric \
results and problems) and datas for tests (2 shapes)</div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1494608093366_5576"><br></div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1494608093366_5614">I use this query (I add st_snaptogrid for \
more precisions) :</div><pre id="yui_3_16_0_ym19_1_1494608093366_5615"><font \
id="yui_3_16_0_ym19_1_1494608093366_5616" size="2">WITH t AS (<br \
id="yui_3_16_0_ym19_1_1494608093366_5617">select p.id_triangle, \
array_agg(l.geom)||st_exteriorring(p.geom) as t<br \
id="yui_3_16_0_ym19_1_1494608093366_5618">from \
"CTRL_SONDE_7123"."7123_TRIANGLE_non_intersect_Delau" p, \
"CTRL_SONDE_7123"."7123_line_intertriangle_Delau_step1_sel" l<br \
id="yui_3_16_0_ym19_1_1494608093366_5619">WHERE \
st_intersects(st_snaptogrid(p.geom,0.0000001), st_snaptogrid(l.geom,0.0000001)) group \
by  p.id_triangle,p.geom),<br id="yui_3_16_0_ym19_1_1494608093366_5620">u AS (SELECT \
id_triangle, st_dump(st_node(st_collect(t))) d FROM t)<br \
id="yui_3_16_0_ym19_1_1494608093366_5621"><br \
id="yui_3_16_0_ym19_1_1494608093366_5622">SELECT (st_dump(st_polygonize((d).geom \
ORDER BY (d).path))).geom FROM u<br id="yui_3_16_0_ym19_1_1494608093366_5623">GROUP \
BY id_triangle;</font><br id="yui_3_16_0_ym19_1_1494608093366_5624"></pre><div \
dir="ltr" id="yui_3_16_0_ym19_1_1494608093366_5600"><br></div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1494608093366_5588"><br></div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1494608093366_5599"><br></div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1494608093366_5577">Best regards</div><div dir="ltr" \
id="yui_3_16_0_ym19_1_1494608093366_5585">Ted<br></div><br><pre \
id="yui_3_16_0_ym19_1_1494608093366_3903"><br><br></pre></div></body></html>


[Attachment #6 (text/plain)]

_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic