On Wed, Jun 04, 2008 at 06:03:45PM +0200, Christophe Leske scratched on the 
wall:
> 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?

  The "R" in "R-Tree" is for rectangle.  The structure is designed to
  hold spaces, not points.  You want to do something like:

  ... rtree(id, long-min, long-max, lat-min, lat-max)

  For cities where you only have point locations, enter each lat and
  long twice.

  -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"'People who live in bamboo houses should not throw pandas.' Jesus said that."
   - "The Ninja", www.AskANinja.com, "Special Delivery 10: Pop!Tech 2006"
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to