On 06/27/2013 09:19 PM, Tobias Kolb wrote:
Hi,I'm currently experimenting with the R*Tree support in SQLite. I have to collect some log data over a timespan and save it linked to the area (not the exact path, just a minimum bounding rect around) it was collected (min/max latitude and min/max longitude). Based on this data I want to do range queries like "get all records within a area (rectangle)". R*Trees seems perfect for this use case. So I've created my log data table (but that doesn't matter) and a virtual rtree table: CREATE VIRTUAL TABLE log_chunks_geoindex USING rtree( id, latitude_min, latitude_max, longitude_min, longitude_max ); The latitude/longitude values are stored as floating point values (e.g. 49.12345, 8.67890). I generated a million records for testing and tried inserting them in the virtual table. A few hundrets inserted fine, then I got stucked with this one: insert into log_chunks_geoindex (id, latitude_min, latitude_max, longitude_min, longitude_max) values(473, 49.000472, 49.000473, 8.000472, 8.000473);
That works here. Is there already a record with id=473 in the table? _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

