I am not an expert in Sqlite R-tree, but it seems that if you want to solve a nearest neighbor you need not only to search the objects in the leaf containing the object you testing, but also some adjacent leaves around.
Another option would be to search for objects inside a centered box or sphere over the object, starting with a small box containing anything else other than the object and start increasing the size until you get one or more objects inside...From there you would just have to select the closest one... Probably there is some much easier way and I am not familiar with it... -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: quinta-feira, 21 de Agosto de 2014 23:09 To: General Discussion of SQLite Database Subject: Re: [sqlite] Sqlite RTree nearest neighbour On 21 Aug 2014, at 10:32pm, skywind mailing lists <mailingli...@skywind.eu> wrote: > does anybody have any experience with implementing a nearest neighbor search using SQLite's RTree functionality? Is a nearest neighbor search possible? How much have you read ? Are you familiar with SpaciaLite ? Have you tried implementing Nearest Neighbour without RTree ? Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users