[postgis-devel] PATCH: New positional operators based on Y position of bounding boxes

Mark Cave-Ayland m.cave-ayland at webbased.co.uk
Wed Jan 12 01:10:31 PST 2005


Hi strk, 

> -----Original Message-----
> From: strk at refractions.net [mailto:strk at refractions.net] 
> Sent: 11 January 2005 17:46
> To: Mark Cave-Ayland
> Cc: 'PostGIS Development Discussion'
> Subject: Re: [postgis-devel] PATCH: New positional operators 
> based on Y position of bounding boxes

(cut)

> > Well, I've been working on some code that opens the GiST index 
> > relation directly and reads in the root node to calculate 
> the extents 
> > of the root node. Of course this does not reflect the true extents 
> > since we do not know the visibility of each of the index entries 
> > without reading the tuples themselves; however it is a very good 
> > starting point. Here is the code that I have experimenting 
> with (add 
> > to the end of lwgeom_gist.c):
> 
> Wow.. I've been trying myself but didn't get feedback from 
> pgsql-hackers and coudln't find documentation myself. Sounds 
> good and simpler then I tought... Anyway, consider also the 
> already present estimated_extent(), returning the extent of 
> the computed histogram (but only works on 800). BTW, which 
> pgsql versions will support your GiST root extractor ?

I think it should work on most PG versions - my inspirational code was the
Gevel module which can be found at
http://www.sai.msu.su/~megera/postgres/gist/. The plan was to use the root
extractor to find the largest possible extent and then binary search inwards
to find the real extent. I guess it really depends on whether people would
find it useful as to whether to spend the time working on it - IIRC the main
group of people that have asked about this are the CadCorp guys, however I
know I would find it useful when working on larger tables consisting of
millions of rows.


Kind regards,

Mark.

------------------------
WebBased Ltd
South West Technology Centre
Tamar Science Park
Plymouth
PL6 8BT 

T: +44 (0)1752 791021
F: +44 (0)1752 791023
W: http://www.webbased.co.uk





More information about the postgis-devel mailing list