Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-general

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.



pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group