sqlite: add (currently unused) in-memory rtree creation code
This commit is contained in:
parent
4ab17c9690
commit
e92d0362a6
1 changed files with 19 additions and 0 deletions
|
@ -256,6 +256,25 @@ void sqlite_datasource::bind() const
|
||||||
<< "," << key_field_
|
<< "," << key_field_
|
||||||
<< " FROM ("
|
<< " FROM ("
|
||||||
<< geometry_table_ << ")";
|
<< geometry_table_ << ")";
|
||||||
|
|
||||||
|
/*
|
||||||
|
std::vector<sqlite_utils::rtree_type> rtree_list;
|
||||||
|
{
|
||||||
|
boost::shared_ptr<sqlite_resultset> rs = dataset_->execute_query(query.str());
|
||||||
|
sqlite_utils::build_tree(rs,rtree_list);
|
||||||
|
}
|
||||||
|
if (sqlite_utils::create_spatial_index2(index_db,index_table_,rtree_list))
|
||||||
|
{
|
||||||
|
//extent_initialized_ = true;
|
||||||
|
has_spatial_index_ = true;
|
||||||
|
if (boost::filesystem::exists(index_db))
|
||||||
|
{
|
||||||
|
dataset_->execute("attach database '" + index_db + "' as " + index_table_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
boost::shared_ptr<sqlite_resultset> rs = dataset_->execute_query(query.str());
|
boost::shared_ptr<sqlite_resultset> rs = dataset_->execute_query(query.str());
|
||||||
if (sqlite_utils::create_spatial_index(index_db,index_table_,rs))
|
if (sqlite_utils::create_spatial_index(index_db,index_table_,rs))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue