I'm trying to implement an R-Tree for geo-spatial search on an embedded system. The R-tree will be stored in an SD card. I came across the sqlite implementation of an R*tree. I would like to know if the following is possible before I delve into it further -
1. Bottom-up parsing from the last search. Since I'm using it for planar point location based on gps input, I do not need the search to be repeated every time from the parent node.
2. Running the database directly from the SD card.
Please comment if any additional information is required.
Asked
Active
Viewed 225 times
2

chilljeet
- 302
- 2
- 15
1 Answers
2
SQLite always searches from the top of the tree. This might not hurt because the top-level entries are most likely to be cached.
If you really want to do bottom-up parsing, you have to implement it manually.
Database files can be opened from any accessible file system.
-
would it be possible to implement bottoms-up parsing on the existing r*tree module? Or would I have to write the entire data structure? Please excuse me if this sounds ill researched. – chilljeet Feb 04 '15 at 06:34
-
I doubt that modifying the source code of the R-tree module would be easier than writing the search code separately. But that's your choice. – CL. Feb 04 '15 at 08:39
-
So you're saying it is possible to just write the search code separately and have it parse the r*tree maintained by sqlite? If this is possible, it would be perfect. – chilljeet Feb 04 '15 at 09:59
-
1Yes, the R-tree module is just a thin interface between the virtual table and the actual tables. The transaction semantics imply that there cannot be 'hidden' data. – CL. Feb 04 '15 at 10:52