Boost logo

Geometry :

Subject: Re: [geometry] Trouble with polygon/box intersection when polygon/box point types are different
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2016-06-07 11:44:08

Gratton, Michael wrote:
> I'm trying to adapt polygons using Eigen::Vector2d point types ( for use with boost::geometry. Things mostly work great, but the rtree implementation uses the internal boost::geometry box type, and I get errors when attempting to intersect my Eigen polygon with the internal box.
> I made a small program to isolate the compilation error I get:


> then everything builds and works. Looking inside, it looks like the later makes copies of the four points, storing them in the point type of the first segment type. So this change would be a bit of a performance hit compared to what is already there.
> Is this a bug or am I mixing something up with my custom polygon type?

I prepared a fix for this issue:

Could you check if it works for you?
You could either checkout the branch with the fix from my repo or simply
copy this file into your local copy of Boost.Geometry:


Geometry list run by mateusz at