From 52c2ce2df91467ed4949b5a006211ad132a67d4b Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Wed, 26 Feb 2014 12:55:56 +0200 Subject: [PATCH] added example used by Barend in his email to discuss the output of set operations --- test/algorithms/difference1.cpp | 12 ++++++++++++ test/algorithms/intersection1.cpp | 6 ++++++ test/algorithms/sym_difference1.cpp | 7 +++++++ test/algorithms/union1.cpp | 7 +++++++ 4 files changed, 32 insertions(+) diff --git a/test/algorithms/difference1.cpp b/test/algorithms/difference1.cpp index 7a11b528c..f7e7bd24d 100644 --- a/test/algorithms/difference1.cpp +++ b/test/algorithms/difference1.cpp @@ -51,6 +51,18 @@ BOOST_AUTO_TEST_CASE( test_difference_linestring_linestring ) typedef test_difference_of_geometries tester; + tester() + (from_wkt("LINESTRING(0 0,1 1,2 1,3 2)"), + from_wkt("LINESTRING(0 2,1 1,2 1,3 0)"), + from_wkt("MULTILINESTRING((0 0,1 1),(2 1,3 2))"), + "lldf00"); + + tester() + (from_wkt("LINESTRING(0 2,1 1,2 1,3 0)"), + from_wkt("LINESTRING(0 0,1 1,2 1,3 2)"), + from_wkt("MULTILINESTRING((0 2,1 1),(2 1,3 0))"), + "lldf00-1"); + tester() (from_wkt("LINESTRING(0 0,5 0)"), from_wkt("LINESTRING(3 0,4 0)"), diff --git a/test/algorithms/intersection1.cpp b/test/algorithms/intersection1.cpp index 9e95f3b7b..808d0e357 100644 --- a/test/algorithms/intersection1.cpp +++ b/test/algorithms/intersection1.cpp @@ -51,6 +51,12 @@ BOOST_AUTO_TEST_CASE( test_intersection_linestring_linestring ) typedef test_intersection_of_geometries tester; + tester() + (from_wkt("LINESTRING(0 0,1 1,2 1,3 2)"), + from_wkt("LINESTRING(0 2,1 1,2 1,3 0)"), + from_wkt("MULTILINESTRING((1 1,2 1))"), + "lli00"); + tester() (from_wkt("LINESTRING(0 0,5 0)"), from_wkt("LINESTRING(3 0,4 0)"), diff --git a/test/algorithms/sym_difference1.cpp b/test/algorithms/sym_difference1.cpp index 8fcfd5ffb..e67dd26af 100644 --- a/test/algorithms/sym_difference1.cpp +++ b/test/algorithms/sym_difference1.cpp @@ -51,6 +51,13 @@ BOOST_AUTO_TEST_CASE( test_sym_difference_linestring_linestring ) typedef test_sym_difference_of_geometries tester; + tester() + (from_wkt("LINESTRING(0 0,1 1,2 1,3 2)"), + from_wkt("LINESTRING(0 2,1 1,2 1,3 0)"), + from_wkt("MULTILINESTRING((0 0,1 1),(2 1,3 2),\ + (0 2,1 1),(2 1,3 0))"), + "llsdf00"); + tester() (from_wkt("LINESTRING(0 0,5 0)"), from_wkt("LINESTRING(3 0,4 0)"), diff --git a/test/algorithms/union1.cpp b/test/algorithms/union1.cpp index a0f0cf17b..552adf4db 100644 --- a/test/algorithms/union1.cpp +++ b/test/algorithms/union1.cpp @@ -51,6 +51,13 @@ BOOST_AUTO_TEST_CASE( test_difference_linestring_linestring ) typedef test_union_of_geometries tester; + tester() + (from_wkt("LINESTRING(0 0,1 1,2 1,3 2)"), + from_wkt("LINESTRING(0 2,1 1,2 1,3 0)"), + from_wkt("MULTILINESTRING((0 0,1 1),(2 1,3 2),(1 1,2 1),\ + (0 2,1 1),(2 1,3 0))"), + "lldf00"); + tester() (from_wkt("LINESTRING(0 0,5 0)"), from_wkt("LINESTRING(3 0,4 0)"),