Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

after st_union() PgSQL returns a note:

NOTE:  TopologyException: side location conflict at 226.001 39.5158

And in the results there are two rows with empty geometry and other rows are ok.
What causes that problem? How to solve it?

share|improve this question

3 Answers 3

up vote 13 down vote accepted

I've found the problem. It was a self intersecting polygon. I used ST_IsValidReason to find it.

share|improve this answer

Googling found this related post:

So it seems your features may be suffering from rounding errors, and it may be solvable by cleaning up the geometry a bit.

It might be worth creating a minimum reproducible case, and post a message on the postgis mailing list.

share|improve this answer
Thank you for pointing the post, it was very useful. – Pablo May 2 '11 at 18:30

The solution arrived in PostGIS 2.0, ST_IsValid() and ST_MakeValid(). You can ask PostGIS to fix broken geometries. You must be careful with it tough it the source geometry's integrity is important for some reason.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.