Re: application of KNN code to US zipcode searches?

Поиск
Список
Период
Сортировка
От Mark Stosberg
Тема Re: application of KNN code to US zipcode searches?
Дата
Msg-id ijjge9$qtt$1@dough.gmane.org
обсуждение исходный текст
Ответ на Re: application of KNN code to US zipcode searches?  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: application of KNN code to US zipcode searches?  (Mark Stosberg <mark@summersault.com>)
Список pgsql-performance
> PostGIS, geometry columns, and UTM..  I'm not sure where they are wrt
> adding KNN support, but it's something they've been anxious to have for
> a while, so I expect support will come quickly.

I've looked into this a little more.

One approach seems to be to project the lat/long pairs on to a flat
plane using the Albers projection (which would be a one-time
calculation), and then the current KNN point/distance calculations could
be used.

Here's a Perl module that references the Albers projection (although
it's not yet clear to me how to use it):

http://search.cpan.org/dist/PDL/

And a Wikipedia page on various calculation possibilities:
http://en.wikipedia.org/wiki/Geographical_distance#Flat-surface_formulae

Further suggestions welcome.

   Thanks,

    Mark

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: application of KNN code to US zipcode searches?
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: application of KNN code to US zipcode searches?