簡體   English   中英

提升幾何圖形交集 <polygon_2d> 不起作用

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

我正在使用升壓幾何庫C ++。 該代碼在舊版本的Eclipse(從pythonxy安裝)中運行良好。 現在,我安裝了最新版本的eclipse和Mingw(x86_64-w64-mingw32)。 錯誤出現在函數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));

錯誤如下:

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 您是否正在使用(非常舊版本的)Boost?

可能是的,我建議升級。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM