diff --git a/test/algorithms/intersection1.cpp b/test/algorithms/intersection1.cpp index 744f83e54..81ea256e5 100644 --- a/test/algorithms/intersection1.cpp +++ b/test/algorithms/intersection1.cpp @@ -359,7 +359,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_linestring_linestring ) -#if 0 + BOOST_AUTO_TEST_CASE( test_intersection_linestring_multilinestring ) { #ifdef GEOMETRY_TEST_DEBUG @@ -374,6 +374,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_linestring_multilinestring ) typedef test_intersection_of_geometries tester; +#if 0 // disjoint linestrings tester() (from_wkt("LINESTRING(0 0,10 0,20 1)"), @@ -539,6 +540,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_linestring_multilinestring ) from_wkt("MULTILINESTRING((0 0,1 0),(19 0,30 0))"), "lmli18a" ); +#endif } @@ -559,26 +561,31 @@ BOOST_AUTO_TEST_CASE( test_intersection_multilinestring_linestring ) typedef test_intersection_of_geometries tester; + // the inertsection code automatically reverses the order of the + // geometries according to the geometry IDs. + // all calls below are actually reversed, and internally the + // intersection of the linestring with the multi-linestring is + // computed. + // disjoint linestrings tester() (from_wkt("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"), from_wkt("LINESTRING(1 1,2 2,4 3)"), - from_wkt("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"), + from_wkt("MULTILINESTRING()"), "mlli01" ); tester() (from_wkt("MULTILINESTRING((0 0,10 0,20 1),(1 0,7 0))"), from_wkt("LINESTRING(1 1,2 0,4 0)"), - from_wkt("MULTILINESTRING((0 0,2 0),(4 0,10 0,20 1),\ - (1 0,2 0),(4 0,7 0))"), + from_wkt("MULTILINESTRING((2 0,4 0))"), "mlli02" ); tester() (from_wkt("MULTILINESTRING((0 0,101 0))"), from_wkt("LINESTRING(-1 -1,1 0,101 0,200 -1)"), - from_wkt("MULTILINESTRING((0 0,1 0))"), + from_wkt("MULTILINESTRING((1 0,101 0))"), "mlli03" ); @@ -586,7 +593,8 @@ BOOST_AUTO_TEST_CASE( test_intersection_multilinestring_linestring ) (from_wkt("MULTILINESTRING((0 0,20 0))"), from_wkt("LINESTRING(0 1,1 0,19 0,20 1,19 1,18 0,2 0,\ 1 1,2 1,3 0,17 0,18 1,17 1,16 0,4 0,3 1)"), - from_wkt("MULTILINESTRING((0 0,1 0),(19 0,20 0))"), + from_wkt("MULTILINESTRING((1 0,19 0),(18 0,2 0),\ + (3 0,17 0),(16 0,4 0))"), "mlli04" ); } @@ -596,7 +604,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_multilinestring_linestring ) - +#if 0 BOOST_AUTO_TEST_CASE( test_intersection_multilinestring_multilinestring ) { #ifdef GEOMETRY_TEST_DEBUG