Boost logo

Geometry :

Subject: Re: [geometry] intersects( polygon, box )
From: Barend Gehrels (barend_at_[hidden])
Date: 2012-06-02 07:34:52


Hi Albert, Volker,

On 31-5-2012 20:16, alzi wrote:
> On 16-2-2012 18:30, Volker Schöch wrote:
>>> Hi once more,
>>> I have found the following problem:
>>>
>>> A = POLYGON((1992 3240,1992 1440,3792 1800,3792 3240))
>>> B1 = Box(1941;2066;2055;2166) // wkt for box outputs a clockwise, closed
>>> polygon which is confusing in this context
>>> B2 = POLYGON((1941 2066,2055 2066,2055 2166,1941 2166)) // the same shape
>>> as B1, but type polygon
>>>
>>> boost::geometry::intersects( A, B1 ) = false (wrong)
>>> boost::geometry::intersects( A, B2 ) = true (correct)
>>>
>>> As always, I am using boost 1.48.0, my polygon type is oriented
>>> counter-clockwise and not closed, my point type is based on int.
>>
>> Without trying, I think this is fixed in 1.49 too. There was one issue
>> in intersects which was positively false (not intersecting) while it
>> should have been true. This looks like your problem.
>>
> Hi,
>
> I noticed this bug by myself some time ago and now tried the situation
> described by Volker Schöch with 1.49 and trunk.
> It seams not to be fixed yet.
>

The problem is now solved in Trunk. Thanks for the report and the reminder.

It was a few lines fix (a bit different than Albert's but the same
effect), I hope to get it in 1.50 as soon as the release branch is opened.

Regards, Barend


Geometry list run by mateusz at loskot.net