Subject: [ggl] rtree documentation?
From: Barend Gehrels (barend.gehrels)
Date: 2010-06-24 04:50:05
> I'm new to Boost.Geometry, and I have already found this
Welcome to the list!
> However, I wonder where I can find the documentation of (or
> some code snippets using) the rtree class?
They are not yet there. Sorry about that. The rtree interface will be
changed (and it was therefore not part of the review).
However, it works and can be used. Herewith a code snippet.
namespace bg = boost::geometry;
// declare a spatial index with an ID (int), the ID can also be e.g. an
index of a vector
bg::index::rtree<bg::box_2d, int> spatial_index(12, 4); // <box, ID>
// fill it somewhere, normally in a loop over polygons (here: polygon)
// get all ID's intersecting a specified box:
std::deque<int> overlapping =
// do things with these ID's / polygons belonging to these ID's or indexes
Geometry list run by mateusz at loskot.net