[Boost-bugs] [Boost C++ Libraries] #9628: boost.geometry.within - not working for point in polygon

Subject: [Boost-bugs] [Boost C++ Libraries] #9628: boost.geometry.within - not working for point in polygon
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-03 10:16:47


#9628: boost.geometry.within - not working for point in polygon
------------------------------+---------------------------
 Reporter: adrian_brutus@… | Owner: barendgehrels
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
  Version: Boost 1.55.0 | Severity: Showstopper
 Keywords: |
------------------------------+---------------------------
 //If the point that is tested with within function is aligned with //the
 first segment of the polygon the function fails..
 {{{
    typedef boost::geometry::model::d2::point_xy<double> BoostPoint2d;
    typedef boost::geometry::model::polygon< BoostPoint2d > BoostPolygon2d;

    BoostPolygon2d oBoostPolygon2d;
    // Plygon points
 // -19155.669324773193,54820.312032458620
 // -13826.169324773080,54820.312032458627
 // -13826.169324773078,52720.312032458663
 // -12755.169324773129,52720.312032458663
 // -12755.169324773129,51087.312032458671
 // -12760.669324773080,51087.312032458671
 // -12760.669324773082,51070.312032458627
 // -19155.669324779392,51070.312032458620
 // -19155.669324773193,54820.312032458620

    boost::geometry::correct( oBoostPolygon2d );

    BoostPoint2d oPoint( -12260.669324773118, 54820.312032458634 );

    bool bWithin = boost::geometry::within( oPoint, oBoostPolygon2d );
    assert( bWithin == false );
 }}}


 // This bug was reproduced with version 1.49 and 1.55 (maybe also with
 other versions...)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9628>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC