On 3 February 2013 09:16, Dean Rasheed <dean.a.rash...@gmail.com> wrote:
>> It looks like what the code is actually computing is the average X
>> position and average Y position of the points listed in the polygon.

Although, if that's really how it's being calculated, then that's not
really the centroid.

Consider for example adding an extra redundant point to one side of a square:

polygon '((-1,-1),(-1,0),(-1,1),(1,1),(1,-1))')

that will shift the average X position over to the left, but the
centroid is still at (0,0).

Regards,
Dean


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to