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

Christoph Lingg | komoot christoph at komoot.de
Tue Mar 11 08:49:16 PDT 2014


Hi Sandro,

thanks for your reply!

> ST_Intersects() is expected to possibly throw an exception
> when the input is invalid.
So why does the first query not throw an exception?

> Where did you read that we consider geometries invalid due
> to rounding errors ?
I was told that invalid geometries are quite common in real life, and rounding errors being one source of that. Maybe that’s wrong!?

Invalid geometries are giving my a hard time at the moment, so I was thinking about adding a validity check:

> WHERE st_intersects(a1.area, a2.area) AND st_isvalid(a2.area)

or

> WHERE st_intersects(a1.area, st_makevalid(a2.area))

But I don’t know if this is the way to go, since i’am concerned about performance overhead of st_isvalid. Do you know how performant this function is?

Thanks for your help,
Christoph



More information about the postgis-users mailing list