#118: postgis ST_Intersects fails with invalid multipolygons

But it fails silently, often only intersecting with one of the constituent polygons if the polgyon as a whole is invalid.

clean it up

To test whether the geom is valid:

SELECT ST_IsValid(geom) FROM your_table WHERE id = XXX;

This guy wrote a handy function to fix geoms: http://www.kappasys.ch/pgtools/cleangeometry/cleanGeometry.sql. Download it and

psql your_database < cleanGeometry.sql
UPDATE your_table SET geom = cleanGeometry(geom) WHERE id = XXX;

Think you've got a better solution? Help 148c663fd665c53518538e093ce3c2ab_small kueda out by posting your solution