Boost logo

Geometry :

Subject: Re: [geometry] Box - Geometry intersection
From: Barend Gehrels (barend_at_[hidden])
Date: 2012-12-11 14:00:02


Hi Adam,

On 10-12-2012 20:06, Barend Gehrels wrote:
> Hi Adam,
>
>
> On 9-12-2012 15:07, Adam Wulkiewicz wrote:
>> Hi,
>>
>> I've noticed that the intersection of a Box with other geometries
>> e.g. a Ring or a Polygon is not implemented. From my understanding,
>> it should be simple (at least for Rings and Polygons):
>> 1. a conversion from Box to a Geometry,
>> 2. call of intersects/intersection for two Geometries.
>>
>> This would allow the user to pass other than Box Geometry to a rtree
>> query. We could e.g. find all Boxes intersecting a Ring or POIs
>> within a Polygon. This could be faster than the common way of doing
>> it, where someone must first perform a query for Polygon's envelope
>> and then test all resulting values again.
>
> Yes, "intersects" is probably not implemented and is easy.
> "intersection" is implemented. It is implemented without conversions,
> and that can also be done for intersects.
>
> Agree that it is important for spatial indexes. I will work on it and
> try to get it in 1.53, which deadline for new functionality is next
> Monday, so I'm positive to get it in.

Yesterday I checked intersection but not intersects. I did check it this
morning - both algorithms are implemented for polygon/box and
polygon/ring. So you must have another problem here, do you know which?
What is the message exactly?

Regards, Barend


Geometry list run by mateusz at loskot.net