[postgis-users] GEOSIntersects: TopologyException: side location conflict at

Christoph Lingg | komoot christoph at komoot.de
Tue Mar 11 08:31:28 PDT 2014


Hello everybody!

I encountered an unexpected behavior which could be bug. I have a table „areas“ with multipolygons and some of them are invalid. This is an example where "area 34172" is invalid:

> SELECT a2.id, st_isvalid(a2.area) FROM areas a1, areas a2 WHERE st_intersects(a1.area, a2.area) AND a1.id = 121229321;
> NOTICE:  Self-intersection at or near point 17.018970899999999 48.108382500000005
>     id     | st_isvalid 
> -----------+------------
>  121229321 | t
>      16239 | t
>      34172 | f
>     112050 | t
>      77189 | t
>     933011 | t
> (6 rows)

As far as I read you have to consider invalid geometries due to rounding errors, ok. The same query with an additional WHERE clause behaves unexpectedly:

> SELECT a2.id, st_isvalid(a2.area) FROM areas a1, areas a2 WHERE st_intersects(a1.area, a2.area) AND ((a2.annotations->'area') = 'yes') AND a1.id = 121229321;
> ERROR:  GEOSIntersects: TopologyException: side location conflict at 17.018970899999999 48.108382500000005


annotations is actually of type store. However, I expected results similar to the first query do I do something wrong?

Cheers,
Christoph


More information about the postgis-users mailing list