From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Colin Dunklau <colin.dunklau@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: postgres 9.2.2 point conversion from polygon doesn't always give accurate center
Date: Sun, 03 Feb 2013 11:02:26 -0500
Message-ID: <7650.1359907346@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEZATCUoN5VmO5=wOpEi6qJFzf=OcE15pStegBr04qPmykmkTg@mail.gmail.com>
References: <CAMTx_3Aa-JYja-=yUqtRQ92DNLVrbmrFBEySPV2h1sMwZZaDJw@mail.gmail.com>
<24313.1359757005@sss.pgh.pa.us>
<CAEZATCXPokwKBGEBLkPEyH_kWhoUA6Ua9hJxQgLxiOtjtopDWA@mail.gmail.com>
<CAEZATCUoN5VmO5=wOpEi6qJFzf=OcE15pStegBr04qPmykmkTg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, dean.a.rasheed@gmail.com, colin.dunklau@gmail.com
Subject: Re: postgres 9.2.2 point conversion from polygon doesn't always give accurate center
In-Reply-To: <7650.1359907346@sss.pgh.pa.us>
References: <CAMTx_3Aa-JYja-=yUqtRQ92DNLVrbmrFBEySPV2h1sMwZZaDJw@mail.gmail.com> <24313.1359757005@sss.pgh.pa.us> <CAEZATCXPokwKBGEBLkPEyH_kWhoUA6Ua9hJxQgLxiOtjtopDWA@mail.gmail.com> <CAEZATCUoN5VmO5=wOpEi6qJFzf=OcE15pStegBr04qPmykmkTg@mail.gmail.com> <7650.1359907346@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox