[geometry] commit of robustness test for touches, and updated release note

[SVN r78700]
This commit is contained in:
Barend Gehrels 2012-05-27 21:44:47 +00:00
parent a93168b1cf
commit dd5cb6fe6b
2 changed files with 16 additions and 0 deletions

View File

@ -33,6 +33,7 @@
* [@https://svn.boost.org/trac/boost/ticket/6696 6696] invalid intersection output, was (by chance) already fixed in Trunk before reported
[*Additional functionality]
* added algorithm "touches" (OGC SF compliant) for *polygon/*polygon
[*Documentation]

View File

@ -31,6 +31,8 @@
#include <boost/geometry/extensions/io/svg/svg_mapper.hpp>
#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
#include <boost/geometry/algorithms/intersects.hpp>
#include <boost/geometry/algorithms/touches.hpp>
struct p_q_settings
{
@ -103,6 +105,19 @@ static bool test_overlay_p_q(std::string const& caseid,
}
}
if (true)
{
if ((area_i > 0 && bg::touches(p, q))
|| (area_i <= 0 && bg::intersects(p, q) && ! bg::touches(p, q)))
{
std::cout << "Wrong 'touch'! "
<< " Intersection area: " << area_i
<< " Touch gives: " << std::boolalpha << bg::touches(p, q)
<< std::endl;
wrong = true;
}
}
bool svg = settings.svg;
if (wrong || settings.wkt)