[postgis-devel] Lacking of exact knn-gist?

Paul Ramsey pramsey at cleverelephant.ca
Fri Jan 17 05:54:35 PST 2014


Hi Alex,
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?”
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.
P.

-- 
Paul Ramsey
http://cleverelephant.ca
http://postgis.net

On January 17, 2014 at 8:51:41 AM, Alexander Korotkov (aekorotkov at gmail.com) wrote:

Hi, PostGIS developers!

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.
Do you know PostGIS users lacking of such exact knn? If so, could you give some example where <-> and <#> operators are really insufficient?

------
With best regards,
Alexander Korotkov.
_______________________________________________  
postgis-devel mailing list  
postgis-devel at lists.osgeo.org  
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20140117/d04f5a78/attachment.html>


More information about the postgis-devel mailing list