Solution for: #118: postgis ST_Intersects fails with invalid multipolygons

clean it up

1
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;