
Geometry : 
Subject: [ggl] boost geometry rtree
From: Adam Wulkiewicz (adam.wulkiewicz)
Date: 20110713 07:54:11
Barend Gehrels wrote:
> OK. Anyway, it should, so please report if it does not.
Ok thanks. It seems to be ok now. I think that it didn't compile because
I didn't include some files which needed strategies were defined in.
Btw, gc this may be the cause of your error. Try to include geometry.hpp
instead of just point.hpp and box.hpp.
Still within don't work for boxes with different point types because it
can't convert between box<point> and box<point_xy>.
for typedef bg::model::d2::point_xy<double> P;

D:\lib\boost_geometry\boost/geometry/algorithms/within.hpp(241): error
C2664:
'boost::geometry::detail::within::box_in_box_helper<Box1,Box2,Strategy,Dimension,DimensionCount>::apply'
: cannot convert parameter 2 from 'const
boost::geometry::model::box<Point>' to 'const
boost::geometry::model::box<Point> &'
with
[
Box1=boost::geometry::model::box<P>,
Box2=boost::geometry::model::box<P>,
Strategy=strategy_type,
Dimension=0,
DimensionCount=2
]
and
[
Point=boost::geometry::model::point<double,2,boost::geometry::cs::cartesian>
]
and
[
Point=P
]
Reason: cannot convert from 'const boost::geometry::model::box<Point>'
to 'const boost::geometry::model::box<Point>'
with
[
Point=boost::geometry::model::point<double,2,boost::geometry::cs::cartesian>
]
and
[
Point=P
]
No userdefinedconversion operator available that can perform this
conversion, or the operator cannot be called

The same with geometry::convert :

D:\lib\boost_geometry\boost/geometry/algorithms/convert.hpp(111): error
C2679: binary '=' : no operator found which takes a righthand operand
of type 'const boost::geometry::model::box<Point>' (or there is no
acceptable conversion)
with
[
Point=P
]
D:\lib\boost_geometry\boost/geometry/geometries/box.hpp(74): could be
'boost::geometry::model::box<Point>
&boost::geometry::model::box<Point>::operator =(const
boost::geometry::model::box<Point> &)'
with
[
Point=boost::geometry::model::point<double,2,boost::geometry::cs::cartesian>
]
while trying to match the argument list
'(boost::geometry::model::box<Point>, const
boost::geometry::model::box<Point>)'
with
[
Point=boost::geometry::model::point<double,2,boost::geometry::cs::cartesian>
]
and
[
Point=P
]

> Content is the right word for that. It was reserved for that but it was not implemented.
Ok, I'll rename index::area to index::content and wait for the official
version.
>
>
>> (http://mathworld.wolfram.com/Content.html) because in dimensions greater than 4 3d volume may have different meaning. Hypersurface of a 4d object is 3dimensional and someone may call it the volume, like 2d surface of a 3d object is called the surface.
>>
>> I use also a function calculating the margin of a box (this term is taken from: R*tree: An Efficient and Robust Access Method for Points and Rectangles by Beckmann at al.). I assumed that this is nD hypersurface so for 2d it's the perimeter of a box, for 3d it's surface, for 4d it's 3d hypersurface etc. (http://mathworld.wolfram.com/Hypersurface.html).
>
>
> OK, good idea. If "margin" is the right term for that, we should use that. Thanks.
In the original paper 'margin' refers to 'perimeter' but they only
describe 2d. I've searched for the meaning of this in 3d but didn't find
anything. I think the best is to check which one gives best results in
dimensions greater than 2  perimeter or hypersurface.
> This is the "comparable_distance" which is implemented long ago. Please use that one, I prefer that index is using the standard functionality instead of its own ones. Again, if something is not working the way you expect, please report that.
Ok thanks.
Regards,
Adam
Geometry list run by mateusz at loskot.net