nearest neighbor search from xyz coordinates

From: Andreas Jochem <andruit(at)gmx(dot)de>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: nearest neighbor search from xyz coordinates
Date: 2008-10-27 10:50:32
Message-ID: 49059CF8.5010403@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I have a table containing x y z coordinates. But I have no geometry column?
Is it possible to find the k nearest neighbors of any point. Is there
something like a kd-tree Index in postgres???

I know, if i had a geometry column I could make use of the distance
function to find the k nearest neighbors. But my table has millions of
records, thus it would take a very long time to use the distance
function for each point.

Thanks in advance.

Andi

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Abdul Rahman 2008-10-27 11:17:38 Replication with slony-I
Previous Message Peter Eisentraut 2008-10-27 10:49:58 Re: psql screen size