Boost logo

Geometry :

Subject: [ggl] spacial index
From: Barend Gehrels (barend)
Date: 2011-03-28 12:26:03


Hi Bruno, Adam,

About this:

> One point I wanted to raise before but I thought there was enough
> discussions to address already. It might surprise you, but I think you
> shouldn't propose the user to choose which box type your tree should
> use internally. I.e. the Box template argument shouldn't exist at all.

> This is an implementation detail, which has only to do with the guts
> of your tree. It should be up to you to decide what's the optimal
> choice, and it doesn't seem to me that the optimal choice depends on
> any user-specific context. And it doesn't interact at all with the
> types used by the user. So what's the real justification behind that?

I agree about the Box template argument itself, but there should be
something known (either now or in the future) to the index:
- the coordinate type
- the number of dimensions
- the coordinate system

All of them can be derived from the Box template argument.

But it does not have to be a Box, because the index can indeed use its
own box structure.

One option: having a Geometry there. The index can then easily get the
point type out of it, and construct an own box type from that point
type. And all the properties are set. Besides that it might be natural /
intuitive (indexing a polygon set and setting the Polygon as template
parameter), even if that Polygon is not used itself.

But it does not necessarily have to be a Geometry, the only thing used
is its point-type.

Regards, Barend


Geometry list run by mateusz at loskot.net