I was following the boost geometry rtree documentation. I'm able to perform a spatial query with a box in order to retrieve the list of rtree elements that intersect with it.
I'd like to know if there's a way to perform a spatial query between an rtree and another rtree (of the same type).
Something like:
typedef bg::model::point<float, 2, bg::cs::cartesian> point;
typedef bg::model::box<point> box;
typedef std::pair<box, unsigned> value;
bgi::rtree< value, bgi::quadratic<16> > rtree1;
//... create first rtree
bgi::rtree< value, bgi::quadratic<16> > rtree2;
//... create second rtree
std::vector<value> result_s;
rtree1.query(bgi::intersects(rtree2), std::back_inserter(result_s));
// At this point result_s should contain elements of rtree1 that intersect with rtree2
Is is possible something like that or I can only perform query with elements of the same type of rtree template elements?