id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 10658,sym_difference yields bad result for int polygons,Volker Schöch ,Barend Gehrels,"My ""_TPolygon"" type is actually a '''multi-polygon''', based on a polygon type that is oriented '''counter-clockwise''' and '''open''' (not closed). Please consider the following example, which apparently works fine: {{{ _TPolygon polygonA; // _TPolygon<...> is actually a MULTIPOLYGON, with polygons oriented COUNTER-CLOCKWISE and OPEN (not closed). boost::geometry::read_wkt(""MULTIPOLYGON(((516 1608,1308 1932,2094 2466,2094 32767,516 32767,516 1608)))"", polygonA); // does not throw boost::geometry::correct(polygonA); // read_wkt(...) does not deal correctly with closing point _TPolygon polygonB; boost::geometry::read_wkt(""MULTIPOLYGON(((516 2484,1308 3066,2094 3150,2094 32767,516 32767,516 2484)))"", polygonB); // does not throw boost::geometry::correct(polygonB); // read_wkt(...) does not deal correctly with closing point _TPolygon polygonC; boost::geometry::sym_difference(polygonA, polygonB, polygonC); // does not throw // polygonC is now ""MULTIPOLYGON(((516 2484,516 1608,1308 1932,2094 2466,2094 3150,1308 3066,516 2484)))"" }}} Now, simply replace '''double''' by '''int''': {{{ _TPolygon polygonA; // _TPolygon<...> is actually a MULTIPOLYGON, with polygons oriented COUNTER-CLOCKWISE and OPEN (not closed). boost::geometry::read_wkt(""MULTIPOLYGON(((516 1608,1308 1932,2094 2466,2094 32767,516 32767,516 1608)))"", polygonA); // does not throw boost::geometry::correct(polygonA); // read_wkt(...) does not deal correctly with closing point _TPolygon polygonB; boost::geometry::read_wkt(""MULTIPOLYGON(((516 2484,1308 3066,2094 3150,2094 32767,516 32767,516 2484)))"", polygonB); // does not throw boost::geometry::correct(polygonB); // read_wkt(...) does not deal correctly with closing point _TPolygon polygonC; boost::geometry::sym_difference(polygonA, polygonB, polygonC); // does not throw // polygonC is now ""MULTIPOLYGON(((516 2484,516 1608,1308 1932,2094 2466,2094 *!*32725*!*,1308 3066,516 2484)))"" }}} As you can see, one value is completely off. This seems to happen reliably whenever the input is based on int and contains large numbers. However, the particular example '''worked well with boost 1.55.0'''. This issue may be related to Ticket #8380.",Bugs,closed,Boost 1.58.0,geometry,Boost 1.57.0,Regression,fixed,"sym_difference, polygon, large numbers, domain of definition, integer",