Boost logo

Geometry :

Subject: [ggl] ggl::equals
From: Chris Browet (cbro)
Date: 2009-07-10 09:38:42


Dear,

In the context of ggl::index, is this ggl:equals code right?

template <typename B1, typename B2, std::size_t D, std::size_t N>
> struct box_box
> {
> static inline bool apply(B1 const& box1, B2 const& box2)
> {
> if (!math::equals(get<max_corner, D>(box1), get<min_corner,
> D>(box2))
> || !math::equals(get<min_corner, D>(box1), get<max_corner,
> D>(box2)))
> {
> return false;
> }
> return box_box<B1, B2, D + 1, N>::apply(box1, box2);
> }
> };
>

If I understand well, 2 geometries are not considered equal if *max*(box1)
<> *min*(box2) || *min*(box1) <> *max*(box2) ????

I'm asking because of this code in ggl::index::rtree

            if (leaf->elements() < m_min_elems_per_node && elements() >
> m_min_elems_per_node)
> {
> q_leaves = leaf->get_leaves();
>
> // we remove the leaf_node in the parent node because now
> it's empty
>
> leaf->get_parent()->remove(leaf->get_parent()->get_box(leaf));
> }
>

where the leaf is not actually removed...

- Chris -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20090710/dd14fa94/attachment.html


Geometry list run by mateusz at loskot.net