<div dir="ltr">Sounds good to me. Adding it as a "hidden" function will make it easier for others to test, so we can develop good heuristics about when to use it vs current distance calcs.<div><br></div><div>Would also be interesting to compare it to GEOSDistanceIndexed on the same cases.</div><div><br></div><div>Dan<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 20, 2018 at 2:25 PM, Paul Ramsey <span dir="ltr"><<a href="mailto:pramsey@cleverelephant.ca" target="_blank">pramsey@cleverelephant.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey all,<br>
I've had a branch running for a while, that Nik has tested a little,<br>
for tree-based distance calculations. I've been doing some testing on<br>
it and finding that when it's good, it's very very good (10x<br>
improvements when dealing with large geometries) and when it's bad,<br>
it's not so great (3x worse than existing naive distance on<br>
small-vs-small geometries).<br>
All this so far without also reaching into the next obvious<br>
enhancement, adding a caching behaviour, like the<br>
point-in-polygon/geos code. That will make everything about 2x faster<br>
yet, as about 50% of the time seems to be spent in building up trees.<br>
I'd like to merge my branch in, along with a temporary testing<br>
function _ST_DistanceRectTree(geom, geom) so that we can figure out<br>
how we exactly want to put this code to use. Any objections? If<br>
nothing else, it will replace the current dead code lying in lwtree.c.<br>
<br>
P.<br>
______________________________<wbr>_________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/postgis-devel</a></blockquote></div><br></div></div></div>