Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78700 - in trunk/libs/geometry: doc test/algorithms/overlay/robustness
From: barend.gehrels_at_[hidden]
Date: 2012-05-27 17:44:47


Author: barendgehrels
Date: 2012-05-27 17:44:47 EDT (Sun, 27 May 2012)
New Revision: 78700
URL: http://svn.boost.org/trac/boost/changeset/78700

Log:
[geometry] commit of robustness test for touches, and updated release note
Text files modified:
   trunk/libs/geometry/doc/release_notes.qbk | 1 +
   trunk/libs/geometry/test/algorithms/overlay/robustness/test_overlay_p_q.hpp | 15 +++++++++++++++
   2 files changed, 16 insertions(+), 0 deletions(-)

Modified: trunk/libs/geometry/doc/release_notes.qbk
==============================================================================
--- trunk/libs/geometry/doc/release_notes.qbk (original)
+++ trunk/libs/geometry/doc/release_notes.qbk 2012-05-27 17:44:47 EDT (Sun, 27 May 2012)
@@ -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]
 

Modified: trunk/libs/geometry/test/algorithms/overlay/robustness/test_overlay_p_q.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/overlay/robustness/test_overlay_p_q.hpp (original)
+++ trunk/libs/geometry/test/algorithms/overlay/robustness/test_overlay_p_q.hpp 2012-05-27 17:44:47 EDT (Sun, 27 May 2012)
@@ -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 @@
         }
     }
 
+ 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)


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk