which is inside a Polygon-data-structure used internally in my code computing the union of two polygons.
std::vector<Molecule> molList({mol1, mol2});
std::vector<std::vector<Eigen::Vector2d>> polyList({mol1.getPositionsOfAllAtoms(), mol2.getPositionsOfAllAtoms()});
std::vector<Eigen::Vector2d> convexClusterHull;
boost::geometry::correct(polyList.at(0));
boost::geometry::correct(polyList.at(1));
//The compiler errors are induced by the following line:
boost::geometry::convex_hull(polyList, convexClusterHull);
double areaConvexClusterHull = boost::geometry::area(convexClusterHull);
This now throws several compiler errors, which I am having trouble to understand. The errors are:
/usr/include/boost/geometry/algorithms/not_implemented.hpp:69: error: no matching function for call to ‘assertion_failed<false>(mpl_::failed************ (boost::geometry::nyi::not_implemented_error<void, void, void>::THIS_OPERATION_IS_NOT_OR_NOT_YET_IMPLEMENTED::************)(mpl_::assert_::types<void, void, void, mpl_::na>))’
BOOST_MPL_ASSERT_MSG
^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/geometry/algorithms/is_empty.hpp:162: error: ‘apply’ is not a member of ‘boost::geometry::dispatch::is_empty<std::vector<std::vector<Eigen::Matrix<double, 2, 1> > >, void>’
return dispatch::is_empty<Geometry>::apply(geometry);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/boost/geometry/core/point_type.hpp:45: error: no matching function for call to ‘assertion_failed<false>(mpl_::failed************ (boost::geometry::traits::point_type<std::vector<std::vector<Eigen::Matrix<double, 2, 1> > > >::NOT_IMPLEMENTED_FOR_THIS_POINT_TYPE::************)(mpl_::assert_::types<std::vector<std::vector<Eigen::Matrix<double, 2, 1> > >, mpl_::na, mpl_::na, mpl_::na>))’
BOOST_MPL_ASSERT_MSG
^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/geometry/core/point_type.hpp:66: error: no type named ‘type’ in ‘struct boost::geometry::traits::point_type<std::vector<std::vector<Eigen::Matrix<double, 2, 1> > > >’
>::type type;
^~~~
/usr/include/boost/geometry/core/coordinate_dimension.hpp:122: error: no type named ‘type’ in ‘struct boost::geometry::dimension<const std::vector<std::vector<Eigen::Matrix<double, 2, 1> > > >’
BOOST_STATIC_ASSERT(( static_cast<size_t>(dimension<G1>::type::value) == static_cast<size_t>(dimension<G2>::type::value) ));
^~~~~~~~~~~~~~~~~~~
I suppose this revers to wrongly used or missing registration-macros? But I cannot get behind what I can do to fix this.
To sum my question up: I have the problem that I need to compute the convex hull of several polygons (which should be possible refering to the boost-documentation) but for some reasons the boost::geometry::convex_hull algorithm does not accept my input and throws a compiler error.
I would be really greatful if someone has a suggestion for me how to fix this.
Best regards.