Boost C++ Libraries: Ticket #12118: Problems performing boolean operations on polygons with shared edges https://svn.boost.org/trac10/ticket/12118 <p> I have described problems with illustrations in mailing list: <a class="ext-link" href="http://lists.boost.org/geometry/2016/04/3518.php"><span class="icon">​</span>http://lists.boost.org/geometry/2016/04/3518.php</a> </p> <p> But forgot to mention there that despite the fact that I use same data every program restart, boost geometry union_ makes described problems not in same places. So WKT representation below is slightly different from pictures in mailing list post. </p> <p> WKT representations: </p> <p> Current Path polygon: MULTIPOLYGON(((13.0894 -70.9842,12.8138 -67.5544,12.6048 -63.5792,13.5644 -54.9161,13.8057 -43.6207,13.0006 -33.8524,9.29665 -33.2341,19.6687 -14.4204,-5.96064 -17.1987,-14.8704 -6.9988,-22.5081 -27.9248,-22.1616 -45.1548,-22.4244 -54.0161,-23.1383 -59.2863,-23.1831 -68.0194,-22.8694 -72.7853,-23.0297 -72.7676,-22.8192 -73.5476,-18.6568 -73.2505,3.16642 -75.6601,12.7528 -76.7187,13.0894 -70.9842))) </p> <p> Appended polygon: MULTIPOLYGON(((3.16642 -75.6601,12.7528 -76.7187,12.95 -74.6186,3.16642 -75.6601)),((-22.8477 -78.4296,-20.9284 -78.2253,3.16642 -75.6601,-23.0297 -72.7676,-22.8477 -78.4296))) </p> <p> Union of current path and appended polygon result: MULTIPOLYGON(((12.8756 -74.6265,13.0894 -70.9842,12.8138 -67.5544,12.6048 -63.5792,13.5644 -54.9161,13.8057 -43.6207,13.0006 -33.8524,9.29665 -33.2341,19.6687 -14.4204,-5.96064 -17.1987,-14.8704 -6.9988,-22.5081 -27.9248,-22.1616 -45.1548,-22.4244 -54.0161,-23.1383 -59.2863,-23.1831 -68.0194,-22.8694 -72.7853,-23.0297 -72.7676,-22.8477 -78.4296,-20.9284 -78.2253,3.16642 -75.6601,-18.6568 -73.2505,-18.6568 -73.2505,3.16642 -75.6601,12.7528 -76.7187,12.95 -74.6186,12.8756 -74.6265))) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12118 Trac 1.4.3 ev.mipt@… Sun, 10 Apr 2016 22:18:40 GMT <link>https://svn.boost.org/trac10/ticket/12118#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12118#comment:1</guid> <description> <p> Same WKT representations but with greater precision (std::setprecision(20)) </p> <p> Current Path polygon: MULTIPOLYGON(((13.08940410614013671875 -70.98416137695312500000,12.81384754180908203125 -67.55441284179687500000,12.60483169555664062500 -63.57923889160156250000,13.56438255310058593750 -54.91608428955078125000,13.80568027496337890625 -43.62073516845703125000,13.00057315826416015625 -33.85240554809570312500,9.29664993286132812500 -33.23409271240234375000,19.66869926452636718750 -14.42036247253417968750,-5.96064376831054687500 -17.19871711730957031250,-14.87041568756103515625 -6.99879980087280273438,-22.50806808471679687500 -27.92480468750000000000,-22.16161727905273437500 -45.15484619140625000000,-22.42436790466308593750 -54.01613616943359375000,-23.13828659057617187500 -59.28628540039062500000,-23.18314933776855468750 -68.01937866210937500000,-22.86939430236816406250 -72.78530883789062500000,-23.02970123291015625000 -72.76760864257812500000,-22.81921195983886718750 -73.54760742187500000000,-18.65677833557128906250 -73.25045776367187500000,3.16641521453857421875 -75.66014099121093750000,12.75282478332519531250 -76.71865844726562500000,13.08940410614013671875 -70.98416137695312500000))) </p> <p> Appended polygon: MULTIPOLYGON(((3.16641521453857421875 -75.66014099121093750000,12.75282478332519531250 -76.71865844726562500000,12.95001888275146484375 -74.61856842041015625000,3.16641521453857421875 -75.66014099121093750000)),((-22.84768676757812500000 -78.42963409423828125000,-20.92837524414062500000 -78.22530364990234375000,3.16641521453857421875 -75.66014099121093750000,-23.02970123291015625000 -72.76760864257812500000,-22.84768676757812500000 -78.42963409423828125000))) </p> <p> Union of current path and appended polygon result: MULTIPOLYGON(((12.87562274932861328125 -74.62648773193359375000,13.08940410614013671875 -70.98416137695312500000,12.81384754180908203125 -67.55441284179687500000,12.60483169555664062500 -63.57923889160156250000,13.56438255310058593750 -54.91608428955078125000,13.80568027496337890625 -43.62073516845703125000,13.00057315826416015625 -33.85240554809570312500,9.29664993286132812500 -33.23409271240234375000,19.66869926452636718750 -14.42036247253417968750,-5.96064376831054687500 -17.19871711730957031250,-14.87041568756103515625 -6.99879980087280273438,-22.50806808471679687500 -27.92480468750000000000,-22.16161727905273437500 -45.15484619140625000000,-22.42436790466308593750 -54.01613616943359375000,-23.13828659057617187500 -59.28628540039062500000,-23.18314933776855468750 -68.01937866210937500000,-22.86939430236816406250 -72.78530883789062500000,-23.02970123291015625000 -72.76760864257812500000,-22.84768676757812500000 -78.42963409423828125000,-20.92837524414062500000 -78.22530364990234375000,3.16641521453857421875 -75.66014099121093750000,-18.65678787231445312500 -73.25045776367187500000,-18.65677833557128906250 -73.25045776367187500000,3.16641521453857421875 -75.66014099121093750000,12.75282478332519531250 -76.71865844726562500000,12.95001888275146484375 -74.61856842041015625000,12.87562274932861328125 -74.62648773193359375000))) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Barend Gehrels</dc:creator> <pubDate>Wed, 20 Apr 2016 15:18:04 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12118#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12118#comment:2</guid> <description> <p> The output is indeed invalid, though its area is correct. There is apparently a spike generated which should not be there. You can try using remove_spikes but I don't know if it helps in this case. </p> <p> For next release, or release after that, we will remove the rescaling and that will hopefully fix also this problem. I added the input to the unit test cases. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Barend Gehrels</dc:creator> <pubDate>Wed, 20 Apr 2016 15:18:15 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/12118#comment:3 https://svn.boost.org/trac10/ticket/12118#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Barend Gehrels Wed, 20 Apr 2016 15:18:27 GMT milestone changed https://svn.boost.org/trac10/ticket/12118#comment:4 https://svn.boost.org/trac10/ticket/12118#comment:4 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.63.0</span> </li> </ul> Ticket barend Wed, 30 Dec 2020 13:38:54 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12118#comment:5 https://svn.boost.org/trac10/ticket/12118#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed for already quite some time. </p> <p> This is included in the unit test under the name ticket_12118 </p> Ticket