我正在试图编译一个使用boost::几何学::within的程序,但是我得到了以下错误:
/usr/include/boost/geometry/algorithms/within.hpp:在实例化‘bool boost::几何学::In (ConstGetimy1&,ConstGetimey2&)和Geometry1 = legacy_point;Geometry2 =std::载体’:glcanvas.cpp:1460:57: required:‘apply’不是‘boost::几何学::分派:内部,boost::geometry::point_tag,boost::geometry::multi_point_tag>’的成员。
我的几何定义如下:
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>{}))我调用以下函数:
boost::geometry::within(point, conv_layer);其中point是legacy_point型的,conv_layer是legacy_point的向量。我可以使用助推::几何学::距离函数,但得到上述错误的内部。
发布于 2019-01-11 23:52:46
boost::geometry::within似乎不支持检查multipoint是否在multipoint中。
请参阅帮助页面上的表“支持的几何图形”,它在表上的多点和多点的交集处有一个大的红色X。

https://stackoverflow.com/questions/54155286
复制相似问题