Re: postgres 9.2.2 point conversion from polygon doesn't always give accurate center

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: postgres 9.2.2 point conversion from polygon doesn't always give accurate center
Дата
Msg-id CAEZATCUoN5VmO5=wOpEi6qJFzf=OcE15pStegBr04qPmykmkTg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: postgres 9.2.2 point conversion from polygon doesn't always give accurate center  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: postgres 9.2.2 point conversion from polygon doesn't always give accurate center  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On 3 February 2013 09:16, Dean Rasheed <dean.a.rasheed@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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: postgres 9.2.2 point conversion from polygon doesn't always give accurate center
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: postgres 9.2.2 point conversion from polygon doesn't always give accurate center