Boost logo

Geometry :

Subject: [ggl] spacial index construction interface
From: Bruno Lalande (bruno.lalande)
Date: 2011-03-12 14:26:37


Hi

>
> In the current implementation it's often used. But it's highly probable
> that storing it isn't required. Algorithms uses currently available
> interface. If we change the interface we'll have to rewrite algorithms. Maby
> we should write the spatial index from scratch? With new data representation
> and algorithms adapted to it.
>

Yep, if you rewrite the tree using Boost.Variant or any other approach
different from the current one, you'll have to re-write your algorithms from
scratch unfortunately. I think the right approach is to keep your current
design handy, and reimplement the algorithms progressively with the new
design, using the current ones as a base for regression testing.

So thanks to variants we might be able to get rid of virtualily. Now, what
about dynamic memory? The biggest problem is that if you manage your nodes
with a vector, each copy of an element copies the whole underlying subtree.
A solution would then be to switch from vector to list, but it defeats the
purpose of avoiding dynamically allocated memory since list nodes are
dynamically allocated themselves... So I'd be inclined to keep dynamic
memory but maybe I'm overlooking another solution?

Regards
Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20110312/fc26473e/attachment.html


Geometry list run by mateusz at loskot.net