According to R-Trees: Theory and Applications by Yannis Manolopoulos, 
Alexandros Nanopoulos, Apostolos N. Papadopoulos and Yannis Theodoridis, there 
are a number of algorithms for efficiently determining the nearest neighbor(s) 
using an R-Tree (an internet search on the two terms will pull up several).  
There are two things to keep in mind about this:
        1. You would need to access SQLite's R-Tree "shadow" tables (xx_node, 
xx_parent, xx_rowid) directly in to perform the traversals required by all of 
the algorithms -- I don't know if this is officially supported by SQLite's 
developers, or if these tables are guaranteed not to change;
        2. If your dimension is > 1, the R-Tree alone can't give you a reliable 
answer about who is closer, you would also need a method to calculate the 
minimum distance between two indexed objects.
Peter


On Thursday, August 21, 2014 2:32 PM, skywind mailing lists 
<mailingli...@skywind.eu> wrote:
 

>
>
>Hello,
>
>does anybody have any experience with implementing a nearest neighbor search 
>using SQLite's RTree functionality? Is a nearest neighbor search possible?
>
>Regards,
>Hartwig
>
>
>_______________________________________________
>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

Reply via email to