Boost logo

Geometry :

Subject: [ggl] rtree query interface
From: Adam Wulkiewicz (adam.wulkiewicz)
Date: 2011-08-22 22:20:36

Barend Gehrels wrote:
> Hi Adam,
>> I now realize that this may be confusing since everybody thinks that
>> predicates works exactly like filters from Boost.Range but they
>> shouldn't. They should work more like Expressions.
> Yes, actually I did as well. What is exactly the difference?

Well it isn't commutative and transparent like filters which just
operates on iterators. index::filter (or a sequence of index::
predicates) must be passed just after the tree object and it doesn't
operate on iterators but calls some searching routine, stores elements
inside some container (e.g. std::deque) and exposes this container as a

Think of it like if it was std::map. You may call find() method and find
a value in a fast way. But you may treat it like a range, get some
iterator, iterate over all elements and filter some of them. This isn't

>> (...)
>> Because everybody thinks: "Oh! Boost.Ranges. I know how it works!"
>> maby it's better to use something else to distinguish between Geometry
>> query and ranges. Function or operator different than.
> Yes, if they are different, I agree.

It is a matter of choice. How the user should pass the expression or
sequence of predicates or wathever to the spatial index?

There are some examples in the previous email.


Geometry list run by mateusz at