Boost logo

Geometry :

Subject: Re: [geometry] intersects( polygon, box )
From: Barend Gehrels (barend_at_[hidden])
Date: 2012-02-16 13:03:54


Hi,

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.

I cannot try it myself tonight or tomorrow but will do this weekend, if
it is still a problem or suspicious by then.

Regards, Barend


Geometry list run by mateusz at loskot.net