I am trying to compile a program that uses boost::geometry::within but I am getting the following error:
/usr/include/boost/geometry/algorithms/within.hpp: In instantiation of ‘bool boost::geometry::within(const Geometry1&, const Geometry2&) [with Geometry1 = legacy_point; Geometry2 = std::vector]’: glcanvas.cpp:1460:57: required from here /usr/include/boost/geometry/algorithms/within.hpp:295:55: error: ‘apply’ is not a member of ‘boost::geometry::dispatch::within, boost::geometry::point_tag, boost::geometry::multi_point_tag>
My geometry is defined as follows:
struct legacy_point{
float x, y, z;
};
BOOST_GEOMETRY_REGISTER_POINT_3D(legacy_point, float, cs::cartesian, x, y, z)
BOOST_GEOMETRY_REGISTER_MULTI_POINT(decltype(std::vector< legacy_point>{}))
And I am calling the following function:
boost::geometry::within(point, conv_layer);
where point
is of legacy_point
type and conv_layer
is a vector of legacy_point
. I can use the boost::geometry::distance function but getting the above error for within.