Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75571 - trunk/libs/geometry/test/multi/algorithms
From: barend.gehrels_at_[hidden]
Date: 2011-11-20 08:04:01


Author: barendgehrels
Date: 2011-11-20 08:03:59 EST (Sun, 20 Nov 2011)
New Revision: 75571
URL: http://svn.boost.org/trac/boost/changeset/75571

Log:
Linestring/polygon overlay, unit tests for phase 5
Text files modified:
   trunk/libs/geometry/test/multi/algorithms/multi_intersection.cpp | 11 +++++++----
   1 files changed, 7 insertions(+), 4 deletions(-)

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 08:03:59 EST (Sun, 20 Nov 2011)
@@ -151,11 +151,14 @@
     test_point_output<box, multi_polygon>("box(3 0,4 6)", case_multi_simplex[0], 8);
 }
 
-template <typename LineString, typename MultiPolygon, typename MultiLineString>
-void test_polygon_linestring()
+template <typename MultiPolygon, typename MultiLineString>
+void test_areal_linear()
 {
- //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, 10.0);
+ typedef typename boost::range_value<MultiPolygon>::type Polygon;
+ typedef typename boost::range_value<MultiLineString>::type LineString;
     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);
 }
 
 template <typename P>
@@ -191,7 +194,7 @@
     typedef bg::model::multi_linestring<linestring> multi_linestring;
 
     test_linear<linestring, multi_linestring, box>();
- test_polygon_linestring<linestring, multi_polygon, multi_linestring>();
+ test_areal_linear<multi_polygon, multi_linestring>();
 #endif
 
     test_point_output<P>();


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