Boost C++ Libraries: Ticket #6443: Convex hull does not cover polygon with zero area https://svn.boost.org/trac10/ticket/6443 <p> A polygon with points (0,0) and (0,2) should have an area of 0 and a perimeter of 4, I think? (If I'm wrong on the specification please let me know). </p> <p> The attached code says otherwise - it gives a convex hull with zero perimeter. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6443 Trac 1.4.3 cooperch@… Tue, 24 Jan 2012 17:01:23 GMT attachment set https://svn.boost.org/trac10/ticket/6443 https://svn.boost.org/trac10/ticket/6443 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_geom_test_no_multipoint.cpp</span> </li> </ul> <p> c++ code to reproduce problem </p> Ticket viboes Mon, 28 May 2012 17:36:14 GMT component changed; owner set https://svn.boost.org/trac10/ticket/6443#comment:1 https://svn.boost.org/trac10/ticket/6443#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Barend Gehrels</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">geometry</span> </li> </ul> <p> Please set the component in the future if you want it to be analyzed. </p> Ticket Barend Gehrels Fri, 01 Jun 2012 19:39:53 GMT <link>https://svn.boost.org/trac10/ticket/6443#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6443#comment:2</guid> <description> <p> Thanks for the report - because the component was not set, it did not reach my inbox. However, will now have a look at the problem soon. </p> </description> <category>Ticket</category> </item> <item> <author>Sarat Chandra Addepalli <s.addepalli@…></author> <pubDate>Tue, 03 Jul 2012 10:26:51 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6443#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6443#comment:3</guid> <description> <p> Hi. This seems to me to be more of a question on convention followed, than a bug. If a point set S has only two elements (p1 and p2, say) Should the Convex_hull(S) have two edges or one? One edge would mean that the Convex_hull is not a 'closed' polygon. Two edges, on the other hand, would mean that the perimeter calculation is correct. </p> <div class="wikipage" style="font-size: 80%"><p> On a side note, I had to include the <code>#include&lt;boost/geometry/geometries/point_xy.hpp&gt;</code> line to avoid compilation errors in the attached file. </p> </div> </description> <category>Ticket</category> </item> <item> <author>Rong Xiao <akelux@…></author> <pubDate>Thu, 05 Dec 2013 18:52:38 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6443#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6443#comment:4</guid> <description> <p> I think this IS a bug according to the mathematical definition of a convex hull of a set of points, c.f. <a class="ext-link" href="http://en.wikipedia.org/wiki/Convex_hull"><span class="icon">​</span>http://en.wikipedia.org/wiki/Convex_hull</a>. The convex hull one point is the point itself; the convex hull of two distinct points are the line segment between the two points. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>awulkiew</dc:creator> <pubDate>Sun, 04 Jan 2015 16:12:59 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6443#comment:5 https://svn.boost.org/trac10/ticket/6443#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> This was fixed in 1.57 as a side effect of fixing <a class="ext-link" href="https://svn.boost.org/trac/boost/ticket/10562"><span class="icon">​</span>https://svn.boost.org/trac/boost/ticket/10562</a>. Since 1.57 a Polygon containing the minimal correct number of Points is returned (3 for open and 4 for closed Polygons) so "correct" area and perimeter can be calculated. Note that according to OGC specification Polygons with area = 0 are invalid. </p> Ticket