Gratton, Michael wrote:
I'm trying to adapt polygons using Eigen::Vector2d point types (http://eigen.tuxfamily.org) 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:

<snip>

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: https://github.com/boostorg/geometry/pull/351

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:
https://github.com/awulkiew/geometry/blob/ccd671f5aca5813ac7ffc2494438182ad281c807/include/boost/geometry/strategies/cartesian/cart_intersect.hpp

Regards,
Adam