
Geometry : 
Subject: Re: [geometry] [Spatial Index] bug & question
From: TONGARI (tongari95_at_[hidden])
Date: 20130616 22:19:10
2013/6/17 Adam Wulkiewicz <adam.wulkiewicz_at_[hidden]>
> Adam Wulkiewicz wrote:
>
>>
>> Unfortunately it doesn't compile, but I'll add those operations today
>> (for cartesian cs).
>>
>>
> Ok, please check if it works for you. You should be able to do e.g.
> something like this:
>
> bgi::rtree<MyCircle, ..., MyIndexable> rt;
>
> or
>
> bgi::rtree<std::pair<MyPoint, size_t>, ...> rt; // center and index
>
> and then either adapt your circle to the NSphere concept or use
> model::nsphere:
>
> typedef bg::model::point<T, 2, bg::cs::cartesian> point;
> typedef nsphere<point, T> nsphere;
>
> nsphere s(point(x, y), some_query_radius + circles_radius);
>
> rt.query(bgi::intersects(s), std::back_inserter(...));
I guess I could use:
bgi::rtree<nsphere, ...> rt;
rt.query(bgi::intersects(point(...)), std::back_inserter(...));
I'll try that if I get the github update.
BTW, didn't we miss a 'contains' predicate (within in reverse order)?
Thanks
Geometry list run by mateusz at loskot.net