Using Polygon centroids and LWGeom library for invalid featureshttp://monde-geospatial.com/using-polygon-centroids-lwgeom-library-invalid-features/