[Qgis-user] Why polygons created with "Avoid intersections" over lap their neighbors in Postgis?

Cao Minh Tu caominhtuvn at gmail.com
Wed Jun 26 00:16:01 PDT 2013


Dear Paolo,

I just notice this behavior a few days ago. Right now I can reproduce this
problem:
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

My postgis layer creation sql:
CREATE TABLE polygon_layer
(
  id serial primary key,
  geom geometry(MultiPolygon,3857),
);
CREATE INDEX polygon_layer_idx
  ON polygon_layer
  USING gist
  (geom);

Over lap detecting sql:
select a.id, b.id
from
    polygon_layer as a
    inner join
    polygon_layer as b
    on st_overlaps(a.geom, b.geom)
where a.id < b.id;

My system versions:
    Client: Qgis 1.8 on Debian 7 64 bit
    Server: Postgis 2.0 on PosgreSQL 9.2, Ubuntu 12.04 64 bit

Thanks.


2013/6/26 Paolo Cavallini <cavallini at faunalia.it>

> Il 26/06/2013 05:04, Cao Minh Tu ha scritto:
>
> > My question is: Is there an easier way to make Qgis "Avoid
> intersections" plays well
> > with Postgis "st_overlaps" so I can avoid the other dreaded way?
>
> Dear Cao,
> I did not notice this problem for PostGIS layers. Could you please be more
> specific
> (which version of qgis? when exactly do you encounter this issue?). If
> confirmed,
> better solve it upstream, in qgis code, than fix it with ad hoc solutions
> (pg triggers).
> All the best.
> --
> Paolo Cavallini - Faunalia
> www.faunalia.eu
> Full contact details at www.faunalia.eu/pc
> Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20130626/36c81602/attachment.html>


More information about the Qgis-user mailing list