-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[test] Add test case for goegrphic intersection for polygons touching North Pole #1320
Conversation
boost::geometry::intersection(bigTileOn90,usa,out1); | ||
boost::geometry::intersection(bigTile,usa,out2); | ||
BOOST_CHECK(out1.size() == 1); | ||
BOOST_CHECK(boost::geometry::area(out1) == boost::geometry::area(out2)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we use a floating-point check with epsilon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be OK without epsilon because the two computed polygons are exactly the same and thus their areas.
|
||
BOOST_AUTO_TEST_CASE(usaIntersectBigTile90) { | ||
auto bigTileWKt = "POLYGON((-182.25 -2.25,-182.25 85,-90 85,4.5 85,4.5 -2.25,-90 -2.25,-182.25 -2.25))"; | ||
auto bigTileWKtOn90 = "POLYGON((-182.25 -2.25,-182.25 90,-90 90,4.5 90,4.5 -2.25,-90 -2.25,-182.25 -2.25))"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we never use this camelCase convention...
Also (minor), can be const
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks you are right, I was just copy-pasting here from the original issue. Fixed now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments but looks good to me
3fe91f5
to
5c78d67
Compare
Adding test case from issue #480