Skip to content

Commit

Permalink
[test] Test case for polygon with multiple points representing South …
Browse files Browse the repository at this point in the history
…pole
  • Loading branch information
vissarion committed May 16, 2024
1 parent 7fa6b8b commit 997dfd1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/algorithms/covered_by/covered_by_sph_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ void test_point_polygon()
BOOST_CHECK_EQUAL(bg::covered_by(Point(-1, -61), poly_s_complex_5edges, ws), false);
BOOST_CHECK_EQUAL(bg::covered_by(Point(15, -81), poly_s_complex_5edges, ws), false);
BOOST_CHECK_EQUAL(bg::covered_by(Point(7, -50), poly_s_complex_5edges, ws), false);

//multiple points representing South pole
bg::model::polygon<Point> poly_multiple_poles;
bg::read_wkt("POLYGON((75 -90, 75 -6, 120 -45, 163 -90, 75 -90))", poly_multiple_poles);
BOOST_CHECK_EQUAL(bg::covered_by(Point(119, -46), poly_multiple_poles, ws), true);
}
// Polygon covering nearly half of the globe but no poles
{
Expand Down

0 comments on commit 997dfd1

Please sign in to comment.