use pointOnSurface instead of centroid for QGIS 2.4 or later