Boost C++ Libraries: Ticket #6584: Point to linestring distance calculation https://svn.boost.org/trac10/ticket/6584 <p> distance() is using comparable distance for first segment and real distance to the rest of the segments of a linestring. If real distance is smaller than comp distance to first segment, then it is selected as min distance and distance to first segment is effectively ignored. </p> <p> I've attached patch and test application. In test application: </p> <p> Actual result: 707107 1e+06 </p> <p> Expected result: 707107 707107 Since point is closer to the first segment. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6584 Trac 1.4.3 aleksey.tulinov@… Mon, 20 Feb 2012 23:38:25 GMT attachment set https://svn.boost.org/trac10/ticket/6584 https://svn.boost.org/trac10/ticket/6584 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">distance.patch</span> </li> </ul> <p> Patch for point-to-linestring calculation </p> Ticket aleksey.tulinov@… Mon, 20 Feb 2012 23:39:05 GMT attachment set https://svn.boost.org/trac10/ticket/6584 https://svn.boost.org/trac10/ticket/6584 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test2.cpp</span> </li> </ul> <p> Test application </p> Ticket Barend Gehrels Fri, 24 Feb 2012 12:43:08 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/6584#comment:1 https://svn.boost.org/trac10/ticket/6584#comment:1 <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.50.0</span> </li> </ul> <p> Thanks for this patch. </p> <p> It is applied. </p> <p> After that I got differences in the unit tests. That was because the comparable strategy (eps) for integers selected the wrong return type. That has been fixed as well. </p> <p> Unit tests are updated. </p> <p> This problem was reported earlier (5730) but at that time I did not see the severity of this bug, so glad you reported it again. </p> <p> Alas it is too late for 1.49 </p> Ticket