Hi Andrew,

2014-05-31 0:45 GMT+02:00 Andrew Hundt <athundt@gmail.com>:
I was able to create a minimal example that reproduces the error, any suggestions on how to correctly register the models would be greatly appreciated!


#include <boost/geometry.hpp>


    struct legacy_point

{

    double x, y;

};


BOOST_GEOMETRY_REGISTER_POINT_2D(legacy_point, double, cs::cartesian, x, y)



int main( int /*argc*/, const char** /*argv*/ ){


   boost::geometry::model::polygon<legacy_point> poly;

   boost::geometry::model::ring<legacy_point> ring;

   boost::geometry::model::box<legacy_point> box;

   

   boost::geometry::intersection(box, ring, poly);

}



Please don't top post.

The last argument of intersection() should be MultiPolygon in this case, not Polygon, see: http://www.boost.org/doc/libs/1_55_0/libs/geometry/doc/html/geometry/reference/algorithms/intersection.html

Another thing is that the library should probably inform explicitly what's wrong.

Regards,
Adam