[postgis-devel] Prepared Geometry API

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Mon Oct 6 05:50:13 PDT 2008


Obe, Regina wrote:

> Ah okay. Yes I'm in agreement with you on this one.  Introducing an
> index key to use prepared geometry will be annoying and I need it mostly
> in subselects. I suppose we can't figure out some way to dynamically
> define an index by some hash algorithm, or are we doing that already? 

It's not so much an index, just a unique identifier for each geometry 
that can be used to determine whether it is already in the prepared 
cache. At the moment, synthetic keys are used with an extended API so as 
to provide a direct key into the cache. I'm wondering if we could use 
something else such as a CRC32 (assuming the PostgreSQL hash 
implementation handles collisions using memcmp() internally).

*thinks*... maybe GEOS should generate a CRC32 hash key as part of the 
creation of the prepared geometry? Assuming we could access this using a 
the GEOS CAPI, it would just be a case of handling the few collisions 
using memcmp()...

> I didn't understand most of what Paul said so take my affirmation and
> comments with a grain of salt. 

At the end of the day, if there is compelling enough use case for new 
APIs to implement this, then perhaps we should consider it. My main 
concern at the moment is the lack of evidence for justifying them.


ATB,

Mark.

-- 
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063



More information about the postgis-devel mailing list