Does Boost R-tree support hierarchy traverse?

喜欢而已 提交于 2019-12-11 00:43:05

问题


It seems that the R-tree in Boost does not support hierarchy traverse.

To be specific, I want to get root node of the R-tree, and then get the children of the node.

Does Boost R-tree support hierarchy traverse ?


回答1:


In case this was XY problem. What would you like to do exactly?

Regarding your question. User-defined tree traversal is not officially supported. However if you're not affraid to dig in the internals then you could write your own node visitor, like this one:

https://github.com/boostorg/geometry/blob/develop/include/boost/geometry/index/detail/rtree/utilities/print.hpp#L133

And use it like this:

https://github.com/boostorg/geometry/blob/develop/include/boost/geometry/index/detail/rtree/utilities/print.hpp#L200



来源:https://stackoverflow.com/questions/37337758/does-boost-r-tree-support-hierarchy-traverse

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!