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

Alexander Korotkov aekorotkov at gmail.com
Fri Jan 17 06:01:12 PST 2014


Hi Paul!

You may take a look at my patch to PostgreSQL enabling exact knn-gist:
http://www.postgresql.org/message-id/CAPpHfdu_qBLNRnv-r=_tofZYYa6-r=Z5_MGF4_phAOkWcYxfRg@mail.gmail.com
Ideally, it could be in 9.4. But I expect serious critics about accessing
heap from gist is fundamentally bad design.
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.

------
With best regards,
Alexander Korotkov.

On Fri, Jan 17, 2014 at 5:54 PM, Paul Ramsey <pramsey at cleverelephant.ca>wrote:

> 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 <//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/a45b1e32/attachment.html>


More information about the postgis-devel mailing list