<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Hey all,</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">So, I’ve now got a working sp-gist implementation</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">https://github.com/pramsey/postgis/tree/spgist/</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">(Build and install, and after enabling postgis also run the commands in gserialized_spgist_2d.sql to add the spgist functions and opclass)</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">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).</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">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)</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">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.</div><div><br></div>P<br><div class="bloop_sign" id="bloop_sign_1412102364444082944">
        <title></title>
     
     
        <div>
            <br>
        </div>
        -- <br>
        <b>Paul Ramsey</b>
        <div><div>pramsey@boundlessgeo.com
</div>
            <div>250-885-0632
</div>
            <div>@boundlessgeo
</div>
            <div><img src="http://boundlessgeo.com/wp-content/uploads/files/boundless_sig.png"></div>
             
</div>
     
</div></body></html>