I have the same problem. Is there any other method for calculating centroid? Or is still the calculateCentroids valid?
calculateCentroids