Search code examples
c++c++11boostgeometry

boost::geometry::index::rtree get intersection area of boxes from rtree::query


I'm having boost::geometry::index::rtree of a boost::geometry::model::box. With rtree::query I'm getting all boxes that intersects with the set one. Now I need to calculate the intersection square for all the returned boxes. I can write the code that will do it, but probably in boost there is already something that do this job?


Solution

  • boost::geometry::intersection will do it.