Ok,

so i got the rtree extension to work. It does load and creates the 
tables wanted.

Now I am studying the ReadMe 
(http://www.sqlite.org/cvstrac/fileview?f=sqlite/ext/rtree/README&v=1.4) 
and there is this requirement:

All r-tree virtual tables have an odd number of columns between
    3 and 11. Unlike regular SQLite tables, r-tree tables are strongly 
    typed. 

    The leftmost column is always the pimary key and contains 64-bit 
    integer values. Each subsequent column contains a 32-bit real
    value. For each pair of real values, the first (leftmost) must be 
    less than or equal to the second.


Hmm - well, how is one supposed to make longitude and latitude data fit 
in there?

I have this so far:

sqlite> create virtual table cityLookUp using rtree(id, longitude, latitude)

But longitude can be bigger than latitude, and vice versa, so how would 
one fill and use this table for queries?

I reckon I would further use the IDs I got back from the query to look 
up the corresponding records in my normal table, right?

Something like

select * from cities where cities.id=(select id from cityLookUp where 
??? Long and Lat clause)



-- 
Christophe Leske

www.multimedial.de - [EMAIL PROTECTED]
http://www.linkedin.com/in/multimedial
Lessingstr. 5 - 40227 Duesseldorf - Germany
0211 261 32 12 - 0177 249 70 31


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to