<div dir="ltr"><div class="gmail_extra">Hi Paul!</div><div class="gmail_extra"><br></div><div class="gmail_extra">You may take a look at my patch to PostgreSQL enabling exact knn-gist:</div><div class="gmail_extra"><a href="http://www.postgresql.org/message-id/CAPpHfdu_qBLNRnv-r=_tofZYYa6-r=Z5_MGF4_phAOkWcYxfRg@mail.gmail.com">http://www.postgresql.org/message-id/CAPpHfdu_qBLNRnv-r=_tofZYYa6-r=Z5_MGF4_phAOkWcYxfRg@mail.gmail.com</a><br>

</div><div class="gmail_extra">Ideally, it could be in 9.4. But I expect serious critics about accessing heap from gist is fundamentally bad design.</div><div class="gmail_extra">Test cases are very welcome. It would be very nice to have them before January 19. I know it very soon, but in this case I can include them to PGCon proposal.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:13px">------</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">With best regards,</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">Alexander Korotkov.</span><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 17, 2014 at 5:54 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">

Hi Alex,</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">I’d say in general it’s a pretty huge drawback, and most users go “yeah, KNN, awsome! oh, wait, really? that’s all it does?”</div>

<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">Almost any example with non-point data gives the wrong answer to “give me the N nearest” when using the bounding boxes instead of the actual objects. I can put together some test cases if you like, but any road data set will display it, “show me the nearest roads to this point”. Inevitably some long highway segment with a huge box that’s otherwise not anywhere near the test point shows up in the list of nearest things.</div>

<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">P.</div> <div><div><br></div><span style="font-family:helvetica,arial;font-size:13px"></span>-- <br>Paul Ramsey<br><a href="http://cleverelephant.ca" target="_blank">http://cleverelephant.ca</a><div>

<a href="http://postgis.net" target="_blank">http://postgis.net</a></div></div><div><div class="h5"> <br><p style="color:rgb(160,160,168)">On January 17, 2014 at 8:51:41 AM, Alexander Korotkov (<a href="mailto://aekorotkov@gmail.com" target="_blank">aekorotkov@gmail.com</a>) wrote:</p>

 </div></div><blockquote type="cite"><span><div><div><div><div class="h5">






<div dir="ltr">
<div><span style="font-family:arial,sans-serif;font-size:13px">Hi,
PostGIS developers!</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">Currently, PostGIS
supports knn-gist with <-> and <#> operators which are
distance to centroid and MBR, but not exact distance to geometrical
object, because of knn-gist limitation. However, it's not so
fundamental limitation, in principle index distance could be
rechecked from heap providing exact knn.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">Do
you know PostGIS users lacking of such exact knn? If so, could you
give some example where <-> and <#> operators are
really insufficient?</span></div>
<div><br></div>
<span style="font-family:arial,sans-serif;font-size:13px">------</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">With best
regards,</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">Alexander
Korotkov.</span><br></div></div></div>


_______________________________________________
<br>postgis-devel mailing list
<br><a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a>
<br><a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel</a></div></div></span></blockquote></div></blockquote></div><br></div>

</div>