Do polygon union before getting centroid