<div dir="ltr"><div><div><div><div>Dear Paolo,<br><br></div><div>I just notice this behavior a few days ago. Right now I can reproduce this problem:<br></div><div>Using Qgis to draw polygons on a clean Postgis layer with "Avoid Intersections" turned on and check every time I create a new polygon, this is the number of polygons until an over-lap is detected: 4, 7, 6, 15, 7<br>
<br>My postgis layer creation sql: <br>CREATE TABLE polygon_layer<br>(<br>  id serial primary key,<br>  geom geometry(MultiPolygon,3857),<br>);<br>CREATE INDEX polygon_layer_idx<br>  ON polygon_layer<br>  USING gist<br>  (geom);<br>
<br></div><div>Over lap detecting sql:<br></div><div>select <a href="http://a.id">a.id</a>, <a href="http://b.id">b.id</a><br>from<br>    polygon_layer as a<br>    inner join<br>    polygon_layer as b<br>    on st_overlaps(a.geom, b.geom)<br>
where <a href="http://a.id">a.id</a> < <a href="http://b.id">b.id</a>;<br></div><div><br></div>My system versions:<br></div>    Client: Qgis 1.8 on Debian 7 64 bit<br></div>    Server: Postgis 2.0 on PosgreSQL 9.2, Ubuntu 12.04 64 bit<br>
<br></div>Thanks.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/6/26 Paolo Cavallini <span dir="ltr"><<a href="mailto:cavallini@faunalia.it" target="_blank">cavallini@faunalia.it</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Il 26/06/2013 05:04, Cao Minh Tu ha scritto:<br>
<div class="im"><br>
> My question is: Is there an easier way to make Qgis "Avoid intersections" plays well<br>
> with Postgis "st_overlaps" so I can avoid the other dreaded way?<br>
<br>
</div>Dear Cao,<br>
I did not notice this problem for PostGIS layers. Could you please be more specific<br>
(which version of qgis? when exactly do you encounter this issue?). If confirmed,<br>
better solve it upstream, in qgis code, than fix it with ad hoc solutions (pg triggers).<br>
All the best.<br>
<span class="HOEnZb"><font color="#888888">--<br>
Paolo Cavallini - Faunalia<br>
<a href="http://www.faunalia.eu" target="_blank">www.faunalia.eu</a><br>
Full contact details at <a href="http://www.faunalia.eu/pc" target="_blank">www.faunalia.eu/pc</a><br>
Nuovi corsi QGIS e PostGIS: <a href="http://www.faunalia.it/calendario" target="_blank">http://www.faunalia.it/calendario</a><br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</font></span></blockquote></div><br></div>