id summary reporter owner description type status milestone component version severity resolution keywords cc 8375 sym_difference of non-closed polygons returns closed polygon Volker Schöch Barend Gehrels "The output multi-polygon from boost::geometry::sym_difference should have the same orientation, closed-ness and underlying scalar data type, as the input (multi-)polygons. My polygon type is oriented '''counter-clockwise''' and '''not closed''', my point type is based on '''int'''. Please find below some code that results in a '''closed''' polygon. This is the data used as input to sym_difference: {{{ _TPolygon const polygonB = _TPolygon(""MULTIPOLYGON(((813 277,1341 319,1863 361,2391 571,2913 361,3441 319,3963 277,3963 32767,813 32767)))"") ^ _TPolygon(""MULTIPOLYGON(((813 277,1341 319,1863 571,2391 571,2913 571,3441 319,3963 277,3963 32767,813 32767)))""); }}} This is the resulting multi-polygon, consisting of two closed polygons: {{{ polygonB: MULTIPOLYGON(((2391 571,1863 571,1341 319,1863 361,2391 571)),((2391 571,2913 361,3441 319,2913 571,2391 571))) }}} This is my code that wraps boost::geometry to implement the operator used above: {{{ template template _TPolygon< T > _TPolygon< T >::operator^(Geometry const& geometry) const { _TPolygon< T > polygonOut; boost::geometry::sym_difference(*this, geometry, polygonOut); // should not be necessary //boost::geometry::correct( polygonOut ); return polygonOut; } }}}" Bugs closed Boost 1.56.0 geometry Boost 1.55.0 Problem fixed sym_difference, multi-polygon, polygon, closed, open, correct