[postgis-devel] SP-GIST: what to do

Paul Ramsey pramsey at boundlessgeo.com
Tue Sep 30 11:45:23 PDT 2014

Hey all,

So, I’ve now got a working sp-gist implementation


(Build and install, and after enabling postgis also run the commands in gserialized_spgist_2d.sql to add the spgist functions and opclass)

This is a copy of the quadtree implementation Teodor put into PgSQL, but bound to our ‘geometry’ type. It is also restricted to points only (though, non-optimally, I cannot throw a “not a point” error until I get into the picksplit routine, so it’s possible to build a small index on non-point features… just how to handle that corner case is something I have yet to figure out).

The question is whether to continue to pursue this work for 2.2. Given the lack of a “compress” hook for spgist, support for anything other than points seems problematic. Similarly, the corner case above could have potentially deleterious effects. Also, since we have a cast from geometry::point (for geometries that are points), it’s possible for people to build functional spgist indexes *already*, if they like (though they won’t have as good stats/planning as geometry, since the spatial stats code in postgresql proper is lacking)

I feel like the lack of support for all geometry variants, and the inability to cleanly restrict the index to just a point variant in combination make spending more effort on a direct geometry binding probably not worth it, though I’m willing to entertain counter arguments.


Paul Ramsey
pramsey at boundlessgeo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20140930/92e9f16e/attachment.html>

More information about the postgis-devel mailing list