看来R-tree http://www.boost.org/doc/libs/1_61_0/libs/geometry/doc/html/geometry/reference/spatial_indexes/boost__geometry__index__rtree.htmlBoost中不支持层次结构遍历。
具体来说,我想得到root
R 树的节点,然后获取该节点的子节点。
Boost R-tree支持层次遍历吗?
如果这是 XY 问题。您到底想做什么?
关于你的问题。官方不支持用户定义的树遍历。但是,如果您不害怕深入了解内部结构,那么您可以编写自己的节点访问者,如下所示:
https://github.com/boostorg/geometry/blob/develop/include/boost/geometry/index/detail/rtree/utilities/print.hpp#L133 https://github.com/boostorg/geometry/blob/develop/include/boost/geometry/index/detail/rtree/utilities/print.hpp#L133
并像这样使用它:
https://github.com/boostorg/geometry/blob/develop/include/boost/geometry/index/detail/rtree/utilities/print.hpp#L200 https://github.com/boostorg/geometry/blob/develop/include/boost/geometry/index/detail/rtree/utilities/print.hpp#L200
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)