Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80994 - in trunk/libs/geometry/test/multi/algorithms: . overlay
From: barend.gehrels_at_[hidden]
Date: 2012-10-15 17:15:01


Author: barendgehrels
Date: 2012-10-15 17:15:00 EDT (Mon, 15 Oct 2012)
New Revision: 80994
URL: http://svn.boost.org/trac/boost/changeset/80994

Log:
[geometry] Unit tests belonging to bugfix difference problem reported by H2 at Boost.Geometry list at 2012-09-14 and 2012-10-11
Text files modified:
   trunk/libs/geometry/test/multi/algorithms/multi_difference.cpp | 9 ++++++++-
   trunk/libs/geometry/test/multi/algorithms/multi_intersection.cpp | 7 +++++++
   trunk/libs/geometry/test/multi/algorithms/multi_union.cpp | 7 +++++++
   trunk/libs/geometry/test/multi/algorithms/overlay/multi_overlay_cases.hpp | 7 +++++++
   4 files changed, 29 insertions(+), 1 deletions(-)

Modified: trunk/libs/geometry/test/multi/algorithms/multi_difference.cpp
==============================================================================
--- trunk/libs/geometry/test/multi/algorithms/multi_difference.cpp (original)
+++ trunk/libs/geometry/test/multi/algorithms/multi_difference.cpp 2012-10-15 17:15:00 EDT (Mon, 15 Oct 2012)
@@ -10,7 +10,7 @@
 #include <iostream>
 #include <string>
 
-// #define BOOST_GEOMETRY_DEBUG_ASSEMBLE
+ // #define BOOST_GEOMETRY_DEBUG_ASSEMBLE
 //#define BOOST_GEOMETRY_CHECK_WITH_SQLSERVER
 
 //#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
@@ -122,6 +122,13 @@
         ggl_list_20111025_vd_2[0], ggl_list_20111025_vd_2[1],
             1, -999, 10.0, 2, -999, 6.0);
 
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_a",
+ ggl_list_20120915_h2[0], ggl_list_20120915_h2[1],
+ 2, -999, 17.0, 0, -999, 0.0);
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_b",
+ ggl_list_20120915_h2[0], ggl_list_20120915_h2[2],
+ 2, -999, 17.0, 0, -999, 0.0);
+
 
     /* TODO: fix
     test_one<Polygon, MultiPolygon, MultiPolygon>("case_101_multi",

Modified: trunk/libs/geometry/test/multi/algorithms/multi_intersection.cpp
==============================================================================
--- trunk/libs/geometry/test/multi/algorithms/multi_intersection.cpp (original)
+++ trunk/libs/geometry/test/multi/algorithms/multi_intersection.cpp 2012-10-15 17:15:00 EDT (Mon, 15 Oct 2012)
@@ -100,6 +100,13 @@
      test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_4",
          case_recursive_boxes_4[0], case_recursive_boxes_4[1],
          13, 157, 67.0); // Area from SQL Server
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_a",
+ ggl_list_20120915_h2[0], ggl_list_20120915_h2[1],
+ 2, 10, 6.0); // Area from SQL Server
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_b",
+ ggl_list_20120915_h2[0], ggl_list_20120915_h2[2],
+ 2, 10, 6.0); // Area from SQL Server
 }
 
 template <typename Polygon, typename MultiPolygon, typename Box>

Modified: trunk/libs/geometry/test/multi/algorithms/multi_union.cpp
==============================================================================
--- trunk/libs/geometry/test/multi/algorithms/multi_union.cpp (original)
+++ trunk/libs/geometry/test/multi/algorithms/multi_union.cpp 2012-10-15 17:15:00 EDT (Mon, 15 Oct 2012)
@@ -106,6 +106,13 @@
     test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_3",
         case_recursive_boxes_3[0], case_recursive_boxes_3[1],
         17, 0, 159, 56.5); // Area from SQL Server
+
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_a",
+ ggl_list_20120915_h2[0], ggl_list_20120915_h2[1],
+ 1, 0, 12, 23.0); // Area from SQL Server
+ test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_b",
+ ggl_list_20120915_h2[0], ggl_list_20120915_h2[2],
+ 1, 0, 12, 23.0); // Area from SQL Server
 }
 
 template <typename P>

Modified: trunk/libs/geometry/test/multi/algorithms/overlay/multi_overlay_cases.hpp
==============================================================================
--- trunk/libs/geometry/test/multi/algorithms/overlay/multi_overlay_cases.hpp (original)
+++ trunk/libs/geometry/test/multi/algorithms/overlay/multi_overlay_cases.hpp 2012-10-15 17:15:00 EDT (Mon, 15 Oct 2012)
@@ -426,6 +426,13 @@
     "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)),((4 0,4 2,6 2,6 0,4 0)))"
     };
     
+// Mail of h2 indicating that reversed order (in second polygon) has ix/ix problems
+static std::string ggl_list_20120915_h2[3] =
+ {
+ "MULTIPOLYGON(((-2 5, -1 5, 0 5, 2 5, 2 -2, 1 -2, 1 -1, 0 -1,0 0, -1 0, -2 0, -2 5)))",
+ "MULTIPOLYGON(((0 0, 1 0, 1 -1, 0 -1, 0 0)), ((-1 5, 0 5, 0 0, -1 0, -1 5)))",
+ "MULTIPOLYGON(((-1 5, 0 5, 0 0, -1 0, -1 5)), ((0 0, 1 0, 1 -1, 0 -1, 0 0)))"
+ };
 
 
 #endif // BOOST_GEOMETRY_TEST_MULTI_OVERLAY_CASES_HPP


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