On Friday, May 30, 2014, Adam Wulkiewicz <adam.wulkiewicz@gmail.com> wrote:
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.

Sorry, didn't seem like top posting since I had inline replies in the other portion. 
 
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 

I just tried this with exactly the same code except declaring multi_polygon instead of polygon and it too didn't compile.  

Lots is asserts on not implemented for this geometry type. However the types are ring box and multipoly so I'm not sure why. 
 
Another thing is that the library should probably inform explicitly what's wrong.


I agree. 
 
Regards,
Adam




--

Cheers!
Andrew Hundt