$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r75575 - in trunk/libs/geometry/test: algorithms multi/algorithms
From: barend.gehrels_at_[hidden]
Date: 2011-11-20 09:55:10
Author: barendgehrels
Date: 2011-11-20 09:55:09 EST (Sun, 20 Nov 2011)
New Revision: 75575
URL: http://svn.boost.org/trac/boost/changeset/75575
Log:
Linestring/polygon overlay, unit tests for phase 6
Text files modified: 
   trunk/libs/geometry/test/algorithms/intersection.cpp             |    11 +++++++++--                             
   trunk/libs/geometry/test/multi/algorithms/multi_intersection.cpp |     4 ++++                                    
   2 files changed, 13 insertions(+), 2 deletions(-)
Modified: trunk/libs/geometry/test/algorithms/intersection.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/intersection.cpp	(original)
+++ trunk/libs/geometry/test/algorithms/intersection.cpp	2011-11-20 09:55:09 EST (Sun, 20 Nov 2011)
@@ -287,7 +287,7 @@
 
 
 template <typename Polygon, typename LineString>
-void test_polygon_linestring()
+void test_areal_linear()
 {
     std::string const poly_simplex = "POLYGON((1 1,1 3,3 3,3 1,1 1))";
 
@@ -321,6 +321,10 @@
     // Compile test - arguments in any order:
     test_one<LineString, Polygon, LineString>("simplex", poly_simplex, "LINESTRING(0 2,4 2)", 1, 2, 2.0);
     test_one<LineString, LineString, Polygon>("simplex", "LINESTRING(0 2,4 2)", poly_simplex, 1, 2, 2.0);
+
+    typedef typename bg::point_type<Polygon>::type Point;
+    test_one<LineString, bg::model::ring<Point>, LineString>("simplex", poly_simplex, "LINESTRING(0 2,4 2)", 1, 2, 2.0);
+
 }
 
 
@@ -338,7 +342,10 @@
 
     std::string clip = "box(2 2,8 8)";
 
-    test_polygon_linestring<polygon, linestring>();
+    test_areal_linear<polygon, linestring>();
+    test_areal_linear<polygon_open, linestring>();
+    test_areal_linear<polygon_ccw, linestring>();
+    test_areal_linear<polygon_ccw_open, linestring>();
 
     // Test polygons clockwise and counter clockwise
     test_areal<polygon>();
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	2011-11-20 09:55:09 EST (Sun, 20 Nov 2011)
@@ -156,9 +156,13 @@
 {
     typedef typename boost::range_value<MultiPolygon>::type Polygon;
     typedef typename boost::range_value<MultiLineString>::type LineString;
+    typedef typename bg::point_type<Polygon>::type Point;
+    typedef bg::model::ring<Point> Ring;
+
     test_one_lp<LineString, MultiPolygon, LineString>("case_mp_ls_1", case_multi_simplex[0], "LINESTRING(2 0,2 5)", 2, 4, 3.70);
     test_one_lp<LineString, Polygon, MultiLineString>("case_p_mls_1", case_single_simplex, "MULTILINESTRING((2 0,2 5),(3 0,3 5))", 2, 4, 7.5);
     test_one_lp<LineString, MultiPolygon, MultiLineString>("case_mp_mls_1", case_multi_simplex[0], "MULTILINESTRING((2 0,2 5),(3 0,3 5))", 4, 8, 6.8333333);
+    test_one_lp<LineString, Ring, MultiLineString>("case_r_mls_1", case_single_simplex, "MULTILINESTRING((2 0,2 5),(3 0,3 5))", 2, 4, 7.5);
 }
 
 template <typename P>