Boost logo

Geometry :

Subject: [geometry] intersects( polygon, box )
From: Volker Schöch (vschoech_at_[hidden])
Date: 2012-02-16 12:30:43


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.

Regards,
   Volker

--
Volker Schöch | vschoech_at_[hidden]
Senior Software Engineer
think-cell Software GmbH | Chausseestr. 8/E | 10115 Berlin | Germany
http://www.think-cell.com | phone +49 30 666473-10 | US phone +1 800 891 8091
Amtsgericht Berlin-Charlottenburg, HRB 85229 | European Union VAT Id DE813474306
Directors: Dr. Markus Hannebauer, Dr. Arno Schoedl

Geometry list run by mateusz at loskot.net