简体   繁体   English

提升几何图形交集 <polygon_2d> 不起作用

[英]Boost geometry intersection_inserter<polygon_2d> does not work

I am using boost geometry library C++. 我正在使用升压几何库C ++。 The code works well in the old version of Eclipse (which is installed from pythonxy). 该代码在旧版本的Eclipse(从pythonxy安装)中运行良好。 Now I install latest version of eclipse and Mingw (x86_64-w64-mingw32). 现在,我安装了最新版本的eclipse和Mingw(x86_64-w64-mingw32)。 the errors appear at the function intersection_inserter() and boost::geometry::enrich_intersection_points(). 错误出现在函数intersection_inserter()和boost :: geometry :: enrich_intersection_points()处。

        typedef std::vector<polygon_2d > polygon_list;
    polygon_list v;
    intersection_inserter<polygon_2d>(square, *polygon_iterator,
                                            std::back_inserter(v));

the error is as following: 错误如下:

c:\program files\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/
../../../../include/boost/geometry/algorithms/intersection.hpp:293:27:
required from 'OutputIterator boost::geometry::intersection_inserter(
const Geometry1&, const Geometry2&, OutputIterator) [with GeometryOut = 
boost::geometry::polygon<boost::geometry::point_xy<double,  
boost::geometry::cs::cartesian> >; Geometry1 = 
boost::geometry::box<boost::geometry::point_xy<double, 
boost::geometry::cs::cartesian> >; Geometry2 = 
boost::geometry::polygon<boost::geometry::point_xy<double,
boost::geometry::cs::cartesian> >; OutputIterator = 
std::back_insert_iterator<std::vector<boost::geometry::polygon<boost::
geometry::point_xy<double, boost::geometry::cs::cartesian> > > >]'
..\src\VoronoiPolygons.cpp:397:85:   required from here
c:\program files\mingw64\bin\../lib/gcc/x86_64-w64-
mingw32/4.7.1/../../../../include/boost/geometry/algorithms/overlay/
enrich_intersection_points.hpp:198:20: error: 'compare_distances' was not
declared in this scope, and no declarations were found by 
argument-dependent lookup at the point of instantiation [-fpermissive]

compare_distances is currently not used on the mentioned line, nor in the whole file. 当前未在提到的行上或整个文件中使用compare_distances Are you using a (very) old version of Boost? 您是否正在使用(非常旧版本的)Boost?

Probably yes, I advice to upgrade. 可能是的,我建议升级。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM