Boost C++ Libraries: Ticket #9556: within fails on simple case https://svn.boost.org/trac10/ticket/9556 <p> the attached case illustrates to me that with fails on a simple case. </p> <pre class="wiki">// simple test of boost geometry function within bool test1(){ typedef boost::geometry::model::d2::point_xy&lt;float&gt; point; typedef boost::geometry::model::ring&lt;point, false, false&gt; ring; ring r; r.push_back(point(-2054781.4f, 1327536.6f)); r.push_back(point(-2042300.1f, 1275254.1f)); r.push_back(point(-2142418.5f, 1333733.5f)); r.push_back(point(-2122850.5f, 1553784.4f)); //r.push_back(point(-2054781.4f, 1327536.6f)); point pt(-2238243.8f, 1523654.5f); bool result = boost::geometry::within(pt, r); // result should be false - but returns true if(result != false) return false; point pt2(-210000.8f, 1350000.5f); result = boost::geometry::within(pt2, r); // result should be true - but returns false if(result != true) return false; // if we made here - fine return true; } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9556 Trac 1.4.3 Robert Ramey Thu, 09 Jan 2014 18:24:39 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9556#comment:1 https://svn.boost.org/trac10/ticket/9556#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">invalid</span> </li> </ul> <p> OK - looks ike I'm at fault here. </p> <pre class="wiki">point pt2(-210000.8f, 1350000.5f); should be point pt2(-2100000.8f, 1350000.5f); </pre><p> With this change - test passes </p> Ticket Barend Gehrels Fri, 10 Jan 2014 20:51:33 GMT <link>https://svn.boost.org/trac10/ticket/9556#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9556#comment:2</guid> <description> <p> OK - thanks for finding it out and closing. </p> </description> <category>Ticket</category> </item> </channel> </rss>