问题
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