Boost logo

Geometry :

Subject: [geometry] Rtree changes
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2013-02-18 10:16:47


Hi,

For those interested in the spatial index subject, I'd like to share
some news about the rtree.

We've relaxed rtree value_type requirements and simplified the interface.
- It's allowed to store values without default ctor.
- There is only one query() method/function and queried() adaptor.
Nearest query is performed when nearest() predicate is passed to the
query(). Predicates may be connected by &&. It looks like this:

using namespace boost::geometry::index;

tree.query(box, out_it);
tree.query(intersects(box1) && !within(box2), out_it);
tree.query(nearest(pt, k) && intersects(box), out_it);
tree.query(nearest(to_centroid(pt), k) && intersects(box), out_it);

Removed features:
- nearest query returning one value.
- distance predicates (i.e. bounded(), min_bounded(), max_bounded()),
we'd like to design better alternative in the future.

What do you think about the changes?

Regards,
Adam


Geometry list run by mateusz at loskot.net