Re: postgres 9.2.2 point conversion from polygon doesn't always give accurate center - Mailing list pgsql-bugs

From Tom Lane
Subject Re: postgres 9.2.2 point conversion from polygon doesn't always give accurate center
Date
Msg-id 7650.1359907346@sss.pgh.pa.us
Whole thread Raw
In response to Re: postgres 9.2.2 point conversion from polygon doesn't always give accurate center  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List pgsql-bugs
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
>>> 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.

Yeah --- according to the wikipedia entry, it's the correct answer if
we consider the polygon vertexes as a disconnected collection of points
... but that's probably not what people really expect.  I think a
"correct" answer in full generality for polygons that are non-convex,
contain duplicate points, etc might be pretty hard.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Simon Riggs
Date:
Subject: Re: postgres 9.2.2 point conversion from polygon doesn't always give accurate center
Next
From: Georgi Georgiev
Date:
Subject: Re: BUG #7823: PGDG packaged pgadmin3_92 removes its /usr/bin/pgadmin3 link