#9628 closed Bugs (fixed)
boost.geometry.within - not working for point in polygon
Reported by: | Owned by: | awulkiew | |
---|---|---|---|
Milestone: | Boost 1.56.0 | Component: | geometry |
Version: | Boost 1.55.0 | Severity: | Showstopper |
Keywords: | Cc: |
Description
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...)
Change History (3)
comment:1 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 8 years ago
Milestone: | To Be Determined → Boost 1.56.0 |
---|
Note:
See TracTickets
for help on using tickets.
It also fails for this, simplified case:
Fixing progress: https://github.com/boostorg/geometry/pull/95