Boost C++ Libraries: Ticket #10643: point_on_surface bug, computed point isn't on the surface of polygon https://svn.boost.org/trac10/ticket/10643 <p> The attached test program demonstrates this bug. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10643 Trac 1.4.3 petr@… Fri, 10 Oct 2014 08:27:41 GMT <link>https://svn.boost.org/trac10/ticket/10643#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10643#comment:1</guid> <description> <p> I do not have permission to add attachments. Code is below in this comment. </p> <pre class="wiki">#include &lt;boost/geometry.hpp&gt; #include &lt;boost/geometry/geometries/point_xy.hpp&gt; #include &lt;boost/geometry/geometries/polygon.hpp&gt; #include &lt;assert.h&gt; void test_point_on_surface() { typedef boost::geometry::model::point&lt;double, 2, boost::geometry::cs::cartesian&gt; Point; boost::geometry::model::polygon&lt;Point&gt; poly; boost::geometry::read_wkt("POLYGON((1074699.93 703064.65, 1074702.10 703054.62, 1074704.53 703061.40, 1074703.90 703064.58, 1074699.93 703064.65))",poly); boost::geometry::correct(poly); Point point; boost::geometry::point_on_surface(poly,point); //computed point isn't on the surface of polygon //[0] 1074839.1013086310 double //[1] 703154.77900308778 double bool res = boost::geometry::within(point,poly); assert(res==true); // res is false :-( } int main(int argc, char* argv[]) { test_point_on_surface(); return 0; } </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>awulkiew</dc:creator> <pubDate>Fri, 10 Oct 2014 18:49:04 GMT</pubDate> <title>status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/10643#comment:2 https://svn.boost.org/trac10/ticket/10643#comment:2 <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> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.57.0</span> </li> </ul> Ticket