<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">Hey,<br></div><div class="gmail_default" style="font-family:monospace,monospace">sorry to say it's very difficult to understand what you want to do.<br></div><div class="gmail_default" style="font-family:monospace,monospace">Please either do a schema or a precise description (with math: you have setA, set B, setC , and you want to find ...).<br></div><div class="gmail_default" style="font-family:monospace,monospace">Cheers,<br></div><div class="gmail_default" style="font-family:monospace,monospace">Rémi-C<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-02-20 5:57 GMT+01:00 Saranya Kuniyil <span dir="ltr"><<a href="mailto:saranyak578@gmail.com" target="_blank">saranyak578@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi all,<br>I am new to postgis and I need to find intersection of three polygons.<br></div>In my table named "mytable" contains large no of polygon coordinates and grouped into three categories by adding a field called "filename".I labelled the category names as part1, part2, part3 in filename . Now I need to find all polygon which spacially intersect in three categories. <br></div>I write my code as:<br> SELECT ST_Intersection(a.geom, b.geom) as intersect_ab <br>FROM mytable a INNER JOIN mytable b ON ST_Intersects(a.geom,b.geom) INNER JOIN mytable c ON ST_Intersects(a.geom,c.geom)<br>WHERE ST_Overlaps(a.geom, b.geom) AND ST_Overlaps(b.geom, c.geom) AND ST_Overlaps(a.geom, c.geom) AND ST_isvalid(a.geom)='t' AND ST_isvalid(b.geom)='t' AND ST_isvalid(c.geom)='t' AND a.filename = 'part1'<br>   AND b.filename = 'part2' AND c.filename = 'part3') ;<br></div>Is it correct?????<br></div>
<br>______________________________<wbr>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>