If you're trying to get more than 6 or 7 significant digits, yes.... And if you're dealing with lat/lon 1 degree = 69.04 miles or 364531.2 feet So if youi're trying to get sub-foot accuracy/precision you need the digits. Not quite so important for the RTree I would think as it is for the actual points you retrieve. Without double prec: sqlite> CREATE VIRTUAL TABLE demo_index USING rtree( ...> id, -- Integer primary key ...> minX, maxX, -- Minimum and maximum X coordinate ...> minY, maxY -- Minimum and maximum Y coordinate ...> ); sqlite> insert into demo_index values(1,-80.98754321,-80.1234576789,30.43219756,30.567891234); sqlite> select * from demo_index; 1|-80.9875411987305|-80.1234588623047|30.4321975708008|30.567892074585 With double precision. sqlite> CREATE VIRTUAL TABLE demo_index USING rtree( ...> id, -- Integer primary key ...> minX, maxX, -- Minimum and maximum X coordinate ...> minY, maxY -- Minimum and maximum Y coordinate ...> ); sqlite> insert into demo_index values(1,-80.98754321,-80.1234576789,30.43219756,30.567891234); sqlite> select * from demo_index; 1|-80.98754321|-80.1234576789|30.43219756|30.567891234 Michael D. Black Senior Scientist Advanced Analytics Directorate Northrop Grumman Information Systems
________________________________ From: sqlite-users-boun...@sqlite.org on behalf of Ben Harper Sent: Thu 11/4/2010 10:27 AM To: General Discussion of SQLite Database Subject: EXTERNAL:Re: [sqlite] R*Tree module and double precision? Are you sure that double precision in the RTree is necessary for your purposes? Here is a table of floating point precision at various values: The 'flip' values are the 'org' values with the lowest bit flipped. org flip ( delta) 0.01 0.01 ( 0.000000) (lowest bit is 10 ^ -9.030900) 0.10 0.10 ( 0.000000) (lowest bit is 10 ^ -8.127810) 1.00 1.00 ( 0.000000) (lowest bit is 10 ^ -7.224720) 10.00 10.00 ( 0.000001) (lowest bit is 10 ^ -6.020600) 100.00 100.00 ( 0.000008) (lowest bit is 10 ^ -5.117510) 1000.00 1000.00 ( 0.000061) (lowest bit is 10 ^ -4.214420) 10000.00 10000.00 ( 0.000977) (lowest bit is 10 ^ -3.010300) 99999.99 99999.98 ( 0.007813) (lowest bit is 10 ^ -2.107210) 999999.94 999999.88 ( 0.062500) (lowest bit is 10 ^ -1.204120) 9999999.00 9999998.00 ( 1.000000) (lowest bit is 10 ^ 0.000000) 99999992.00 99999984.00 ( 8.000000) (lowest bit is 10 ^ 0.903090) 999999936.00 999999872.00 (64.000000) (lowest bit is 10 ^ 1.806180) -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Black, Michael (IS) Sent: 04 November 2010 02:51 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] R*Tree module and double precision? I'll send the patched C file to your email address. I think the 1M patched version is a bit much for the email list. Normally you would just use the "patch" utility to apply the patch to your file. Michael D. Black Senior Scientist Advanced Analytics Directorate Northrop Grumman Information Systems ________________________________ From: sqlite-users-boun...@sqlite.org on behalf of jsarc...@nanotronicsimaging.com Sent: Wed 11/3/2010 10:22 AM To: sqlite-users@sqlite.org Subject: EXTERNAL:Re: [sqlite] R*Tree module and double precision? >From: "Black, Michael (IS)" <michael.bla...@ngc.com> I made a patch >which seems to do this for you... >Use this switch to enable double precision on RTREE /DRTREE_DOUBLE I am interested in this as well. Will this patch be included in a future version of SQLite? Or, if not, how best to make use of this patch if I normally use the amalgamation from C++. Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com <330>819.4615 _______________________________________________ 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
_______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users