boost_geometry_correct
boost_geometry_correct copied to clipboard
problems in Visual Studio + boost v1.75
WHen I try to compile, correct.hpp is not deducing my custom boost geometry types. ( I register OpenCV points as my point type via BOOST_GEOMETRY_REGISTER_POINT_2D and use polygons that like " boost::geometry::model::polygon<point, true, false>" etc.)
If I explicitly put my types in angle brackets of geometry::correct like geometry::correct<my::point, my::polygon, my::ring, my::polygons>(...), I get compilation errors in correct.hpp where it tries to call internal functions that do not deduce these types correctly.
So I just changed the correct,hpp source file to use my types, but i still get compilation errors. Now I am getting
"self_turn_points.hpp(156,75): error C2039: 'get_envelope_strategy': is not a member of 'boost::geometry::strategies::cartesian
I'm wondering if the library code is targeting a different version of boost.geometry?
okay, the get_envelope_strategy thing is resolved by updating my code to use boost 1.80. The type deduction issue remains but I can work around it by changing the library code to use my types as their defaults. other than that, looks good. I owe you beer.
The type deduction error looks like this (where ch::point is my point type)
1>C:\work\crosshatching\src\crosshatching\correct.hpp(347,1): error C2440: 'return': cannot convert from 'std::vector<std::pair<boost::geometry::model::ring<point_t,true,true,std::vector,std::allocator>,double>,std::allocator<std::pair<boost::geometry::model::ring<point_t,true,true,std::vector,std::allocator>,double>>>' to 'std::vector<std::pair<boost::geometry::model::ringch::point,true,false,std::vector,std::allocator,double>,std::allocator<std::pair<boost::geometry::model::ringch::point,true,false,std::vector,std::allocator,double>>>' 1> with 1> [ 1> point_t=boost::geometry::model::d2::point_xy<double,boost::geometry::cs::cartesian> 1> ]