Subject: | centroid function |
I think the centroid function in Geo::ShapeFile::Shape is incorrect!
When calculating the average it totals up the values then MULTIPLYS by the number of points!
This is the current code:
502: X => ($cx * @points),
503: Y => ($cy * @points),
Which SHOULD be:
502: X => ($cx / @points),
503: Y => ($cy / @points),
Otherwise a perfect module!