因此,boost以R树的形式提供了不错的空间索引功能。这很整洁,但是一旦树被构建,似乎还无法序列化,我错了吗?常规的“out_archive 所以第一个问题:有人知道如何使用boost序列化R树吗?如果不是,那么我的第二个问题是:您将如何将索引永久存储在磁盘上,以避免每次都重新构建索引? (我有一个包含1.45亿个条目的数据集,构建索引需要花费几个小时,所以我真的不想多次构建索引!) 最佳答案 打包算法和批量加载可以加载包(使用打包算法)。 Additionally there are also algorithms creating R-tree containing some, number of objects. This technique is called bulk loading and is done by use of packing algorithm [5] [6]. This method is faster and results in R-trees with better internal structure. This means that the query performance is increased. [5] Leutenegger, Scott T.; Edgington, Jeffrey M.; Lopez, Mario A. (1997). STR: A Simple and Efficient Algorithm for R-Tree Packing [6] Garcia, Yvan J.; Lopez, Mario A.; Leutenegger, Scott T. (1997). A Greedy Algorithm for Bulk Loading R-trees更多详细信息:http://www.boost.org/doc/libs/1_57_0/libs/geometry/doc/html/geometry/spatial_indexes/introduction.html 使用内存映射文件您可以将内存映射文件与自定义分配器一起使用。这样,您可以使用任何希望的表示形式,它将自动持久化更多详细信息:http://www.boost.org/doc/libs/1_57_0/libs/geometry/doc/html/geometry/spatial_indexes/rtree_examples/index_stored_in_mapped_file_using_boost_interprocess.html关于c++ - boost : persistent storage of R-trees?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/27945299/
10-11 23:05
查看更多