Boost logo

Geometry :

Subject: [ggl] spacial index construction interface
From: Adam Wulkiewicz (adam.wulkiewicz)
Date: 2011-02-15 12:47:37


Barend Gehrels wrote:
> Great! Sorry for the late reaction. I just did the rtree_filters.cpp and
> I really like the syntax.
>
> Then I tried to adapt the test using points instead of boxes. I
> (probably) need translators for this and I looked into the other
> example, and into the mails you send, but cannot figure out the right
> syntax for this. Can you add this as another example or into that filter
> example?

I haven't modified the rtree yet so the translators are standalone.
Firstly I'd like to talk about how the interface should look like.

Lets start with the template parameters. IMO it should look like this:

index::rtree<Box> rtb;
index::rtree<Point> rtp;
index::rtree<UserDefinedPoint, UserDefinedTranslator> rtud;

Then every method which takes Box as a parameter (e.g. find(...)) should
just take an arbirtary object which is adapted to the box concept. This
allows us to have whatever we want in the internal structure of the
rtree (arbitrary type of box).

Methods like insert should take everything which translator is able to
translate to some object adapted to point or box concept.

Regards,
Adam


Geometry list run by mateusz at loskot.net