Thread: Direct access to GIST structure

Direct access to GIST structure

From
"Tim Keitt"
Date:
I was wondering if there is a way to get access to the tree structure
underlying at GIST index? What I would like to do is perform a
breadth-first search on the tree in order to find nearest neighbors
(using PostGIS data types). Nearest neighbor searchers are not very
efficient using only range queries as it is not known a priori how
large a range to sample. Searching the tree is very fast as the tree
encode spatial proximity. Is there an API (backend C-level is fine) to
access a GIST index?

THK

--
Timothy H. Keitt, Assistant Professor
University of Texas at Austin http://www.keittlab.org/
Contact info and schedule at http://www.keittlab.org/~tkeitt/
Please support open document formats http://opendocument.xml.org/

Re: Direct access to GIST structure

From
Teodor Sigaev
Date:
> encode spatial proximity. Is there an API (backend C-level is fine) to
> access a GIST index?

The best way is to extend existing interface to GiST to support KNN-search. But
you can see how to get access to index structure from module in gevel module
(http://www.sigaev.ru/cvsweb/cvsweb.cgi/gevel/). GiST-related functions in this
module is invented to help to developers, not for production use, so they
acquire exclusive lock on index.

--
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/

Re: Direct access to GIST structure

From
"Tim Keitt"
Date:
On Fri, Apr 4, 2008 at 4:58 PM, Teodor Sigaev <teodor@sigaev.ru> wrote:
>
>
> > encode spatial proximity. Is there an API (backend C-level is fine) to
> > access a GIST index?
> >
>
>  The best way is to extend existing interface to GiST to support KNN-search.
> But you can see how to get access to index structure from module in gevel
> module (http://www.sigaev.ru/cvsweb/cvsweb.cgi/gevel/). GiST-related
> functions in this module is invented to help to developers, not for
> production use, so they acquire exclusive lock on index.

Thanks that helps.

I just stumbled on http://www.cs.purdue.edu/spgist/ which seems like
exactly what I need.

THK

>
>  --
>  Teodor Sigaev                                   E-mail: teodor@sigaev.ru
>                                                    WWW:
> http://www.sigaev.ru/
>



--
Timothy H. Keitt, Assistant Professor
University of Texas at Austin http://www.keittlab.org/
Contact info and schedule at http://www.keittlab.org/~tkeitt/
Please support open document formats http://opendocument.xml.org/

Re: Direct access to GIST structure

From
Teodor Sigaev
Date:
> I just stumbled on http://www.cs.purdue.edu/spgist/ which seems like
> exactly what I need.

It doesn't work with 8.2 and up, because since 8.2 index should take care about
concurrent access itself and that implementation doesn't do it.

--
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/

Re: Direct access to GIST structure

From
Oleg Bartunov
Date:
Tim,

we have this in our TODO
http://www.sai.msu.su/~megera/wiki/TODO
Current interface doesn't allow tree navigation.
We're looking for sponsorships of this project.

Oleg
On Fri, 4 Apr 2008, Tim Keitt wrote:

> I was wondering if there is a way to get access to the tree structure
> underlying at GIST index? What I would like to do is perform a
> breadth-first search on the tree in order to find nearest neighbors
> (using PostGIS data types). Nearest neighbor searchers are not very
> efficient using only range queries as it is not known a priori how
> large a range to sample. Searching the tree is very fast as the tree
> encode spatial proximity. Is there an API (backend C-level is fine) to
> access a GIST index?
>
> THK
>
>

     Regards,
         Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83