Boost logo

Geometry :

Subject: Re: [geometry] Rtree changes
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2013-02-18 11:41:56


On 18 February 2013 15:16, Adam Wulkiewicz <adam.wulkiewicz_at_[hidden]> wrote:
> 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);

Adam,

Consistent, expressive and discoverable [1].
I like the new proposed interface.

[1] http://accu.org/index.php/journals/1572

Best regards,

--
Mateusz Loskot, http://mateusz.loskot.net

Geometry list run by mateusz at loskot.net