summaryrefslogtreecommitdiff
path: root/libs/geometry/test/multi
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-04-08 03:09:47 +0000
committer <>2015-05-05 14:37:32 +0000
commitf2541bb90af059680aa7036f315f052175999355 (patch)
treea5b214744b256f07e1dc2bd7273035a7808c659f /libs/geometry/test/multi
parented232fdd34968697a68783b3195b1da4226915b5 (diff)
downloadboost-tarball-master.tar.gz
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'libs/geometry/test/multi')
-rw-r--r--libs/geometry/test/multi/Jamfile.v212
-rw-r--r--libs/geometry/test/multi/algorithms/Jamfile.v242
-rw-r--r--libs/geometry/test/multi/algorithms/multi_area.cpp39
-rw-r--r--libs/geometry/test/multi/algorithms/multi_centroid.cpp126
-rw-r--r--libs/geometry/test/multi/algorithms/multi_clear.cpp69
-rw-r--r--libs/geometry/test/multi/algorithms/multi_convert.cpp108
-rw-r--r--libs/geometry/test/multi/algorithms/multi_convex_hull.cpp97
-rw-r--r--libs/geometry/test/multi/algorithms/multi_correct.cpp63
-rw-r--r--libs/geometry/test/multi/algorithms/multi_covered_by.cpp59
-rw-r--r--libs/geometry/test/multi/algorithms/multi_difference.cpp229
-rw-r--r--libs/geometry/test/multi/algorithms/multi_difference_spike.cpp105
-rw-r--r--libs/geometry/test/multi/algorithms/multi_disjoint.cpp130
-rw-r--r--libs/geometry/test/multi/algorithms/multi_envelope.cpp71
-rw-r--r--libs/geometry/test/multi/algorithms/multi_equals.cpp57
-rw-r--r--libs/geometry/test/multi/algorithms/multi_for_each.cpp99
-rw-r--r--libs/geometry/test/multi/algorithms/multi_intersection.cpp240
-rw-r--r--libs/geometry/test/multi/algorithms/multi_intersects.cpp51
-rw-r--r--libs/geometry/test/multi/algorithms/multi_length.cpp38
-rw-r--r--libs/geometry/test/multi/algorithms/multi_num_geometries.cpp62
-rw-r--r--libs/geometry/test/multi/algorithms/multi_num_interior_rings.cpp55
-rw-r--r--libs/geometry/test/multi/algorithms/multi_num_points.cpp72
-rw-r--r--libs/geometry/test/multi/algorithms/multi_perimeter.cpp39
-rw-r--r--libs/geometry/test/multi/algorithms/multi_reverse.cpp57
-rw-r--r--libs/geometry/test/multi/algorithms/multi_simplify.cpp68
-rw-r--r--libs/geometry/test/multi/algorithms/multi_touches.cpp95
-rw-r--r--libs/geometry/test/multi/algorithms/multi_transform.cpp98
-rw-r--r--libs/geometry/test/multi/algorithms/multi_union.cpp165
-rw-r--r--libs/geometry/test/multi/algorithms/multi_unique.cpp60
-rw-r--r--libs/geometry/test/multi/algorithms/multi_within.cpp59
-rw-r--r--libs/geometry/test/multi/algorithms/overlay/Jamfile.v214
-rw-r--r--libs/geometry/test/multi/algorithms/overlay/multi_overlay_cases.hpp458
-rw-r--r--libs/geometry/test/multi/algorithms/overlay/multi_overlay_common.hpp40
-rw-r--r--libs/geometry/test/multi/algorithms/overlay/multi_traverse.cpp448
-rw-r--r--libs/geometry/test/multi/io/Jamfile.v212
-rw-r--r--libs/geometry/test/multi/io/dsv/Jamfile.v215
-rw-r--r--libs/geometry/test/multi/io/dsv/multi_dsv.cpp100
-rw-r--r--libs/geometry/test/multi/io/wkt/Jamfile.v215
-rw-r--r--libs/geometry/test/multi/io/wkt/multi_wkt.cpp103
38 files changed, 0 insertions, 3670 deletions
diff --git a/libs/geometry/test/multi/Jamfile.v2 b/libs/geometry/test/multi/Jamfile.v2
deleted file mode 100644
index b38d8c5ad..000000000
--- a/libs/geometry/test/multi/Jamfile.v2
+++ /dev/null
@@ -1,12 +0,0 @@
-# Boost.Geometry (aka GGL, Generic Geometry Library)
-#
-# Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-# Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-# Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-#
-# Use, modification and distribution is subject to the Boost Software License,
-# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-build-project algorithms ;
-build-project io ; \ No newline at end of file
diff --git a/libs/geometry/test/multi/algorithms/Jamfile.v2 b/libs/geometry/test/multi/algorithms/Jamfile.v2
deleted file mode 100644
index ef1d6b2c8..000000000
--- a/libs/geometry/test/multi/algorithms/Jamfile.v2
+++ /dev/null
@@ -1,42 +0,0 @@
-# Boost.Geometry (aka GGL, Generic Geometry Library)
-#
-# Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
-# Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
-# Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
-#
-# Use, modification and distribution is subject to the Boost Software License,
-# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-test-suite boost-geometry-multi-algorithms
- :
- [ run multi_area.cpp ]
- [ run multi_centroid.cpp ]
- [ run multi_convert.cpp ]
- [ run multi_convex_hull.cpp ]
- [ run multi_correct.cpp ]
- [ run multi_covered_by.cpp ]
- [ run multi_difference.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE <toolset>msvc:<cxxflags>/bigobj ]
- [ run multi_difference_spike.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE <toolset>msvc:<cxxflags>/bigobj ]
- [ run multi_disjoint.cpp ]
- [ run multi_envelope.cpp ]
- [ run multi_equals.cpp ]
- [ run multi_for_each.cpp ]
- [ run multi_intersection.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE <toolset>msvc:<cxxflags>/bigobj ]
- [ run multi_intersects.cpp ]
- [ run multi_length.cpp ]
- [ run multi_num_geometries.cpp ]
- [ run multi_num_interior_rings.cpp ]
- [ run multi_num_points.cpp ]
- [ run multi_perimeter.cpp ]
- [ run multi_reverse.cpp ]
- [ run multi_simplify.cpp ]
- [ run multi_touches.cpp ]
- [ run multi_transform.cpp ]
- [ run multi_union.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE <toolset>msvc:<cxxflags>/bigobj ]
- [ run multi_unique.cpp ]
- [ run multi_within.cpp ]
- ;
-
-build-project overlay
- ;
diff --git a/libs/geometry/test/multi/algorithms/multi_area.cpp b/libs/geometry/test/multi/algorithms/multi_area.cpp
deleted file mode 100644
index 3dbc658e1..000000000
--- a/libs/geometry/test/multi/algorithms/multi_area.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-#include <algorithms/test_area.hpp>
-
-#include <boost/geometry/multi/multi.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-
-
-
-template <typename P>
-void test_all()
-{
- typedef bg::model::multi_polygon<bg::model::polygon<P> > mp;
- test_geometry<mp>("MULTIPOLYGON(((0 0,0 7,4 2,2 0,0 0)))", 16.0);
-}
-
-int test_main( int , char* [] )
-{
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_centroid.cpp b/libs/geometry/test/multi/algorithms/multi_centroid.cpp
deleted file mode 100644
index aec62c2b7..000000000
--- a/libs/geometry/test/multi/algorithms/multi_centroid.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-#include <algorithms/test_centroid.hpp>
-
-#include <boost/core/ignore_unused.hpp>
-
-#include <boost/geometry/multi/core/point_order.hpp>
-#include <boost/geometry/multi/algorithms/centroid.hpp>
-#include <boost/geometry/multi/strategies/cartesian/centroid_average.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-#include <boost/geometry/multi/io/wkt/read.hpp>
-
-
-// #define REPORT_RESULTS
-
-
-template <typename P>
-void test_2d(bool is_integer = false)
-{
- typedef typename bg::coordinate_type<P>::type ct;
- boost::ignore_unused<ct>();
-
-#ifdef REPORT_RESULTS
- std::cout << std::endl << "type: " << typeid(ct).name() << " size: " << sizeof(ct) << std::endl;
-#endif
-
- if (! is_integer)
- {
- // Only working for floating point:
-
- test_centroid<bg::model::multi_point<P> >(
- "MULTIPOINT((1 1),(2 3),(5 0))",
- 2.666666666666667, 1.33333);
-
- test_centroid<bg::model::multi_linestring<bg::model::linestring<P> > >(
- "MULTILINESTRING((0 0,0 2),(1 0,1 2))",
- 0.5, 1.0);
-
-
- test_centroid<bg::model::multi_polygon<bg::model::polygon<P> > >(
- "MULTIPOLYGON(((1 1,1 3,3 3,3 1,1 1)),((4 1,4 3,8 3,8 1,4 1)))",
- 4.666666666666667, 2.0);
-
- test_centroid<bg::model::multi_polygon<bg::model::polygon<P> > >(
- "MULTIPOLYGON(((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2"
- ",3.7 1.6,3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3)),"
- "((10 10,10 12,12 12,12 10,10 10)))",
- 7.338463104108615, 6.0606722055552407);
- }
-
-
-
- // Test using real-world polygon with large (Y) coordinates
- // (coordinates can be used for integer and floating point point-types)
- // Note that this will fail (overflow) if centroid calculation uses float
- test_centroid<bg::model::multi_polygon<bg::model::polygon<P> > >(
- "MULTIPOLYGON(((426062 4527794,426123 4527731"
- ",426113 4527700,426113 4527693,426115 4527671"
- ",426133 4527584,426135 4527569,426124 4527558"
- ",426103 4527547,426072 4527538,426003 4527535"
- ",425972 4527532,425950 4527531,425918 4527528"
- ",425894 4527517,425876 4527504,425870 4527484"
- ",425858 4527442,425842 4527414,425816 4527397"
- ",425752 4527384,425692 4527369,425658 4527349"
- ",425624 4527307,425605 4527260,425598 4527213"
- ",425595 4527167,425582 4527125,425548 4527064"
- ",425535 4527027,425537 4526990,425534 4526943"
- ",425525 4526904,425500 4526856,425461 4526811"
- ",425450 4526798,425381 4526823,425362 4526830"
- ",425329 4526848,425298 4526883,425291 4526897"
- ",425268 4526923,425243 4526945,425209 4526971"
- ",425172 4526990,425118 4527028,425104 4527044"
- ",425042 4527090,424980 4527126,424925 4527147"
- ",424881 4527148,424821 4527147,424698 4527125"
- ",424610 4527121,424566 4527126,424468 4527139"
- ",424426 4527141,424410 4527142,424333 4527130"
- ",424261 4527110,424179 4527073,424024 4527012"
- ",423947 4526987,423902 4526973,423858 4526961"
- ",423842 4526951,423816 4526935,423799 4526910"
- ",423776 4526905,423765 4526911,423739 4526927"
- ",423692 4526946,423636 4526976,423608 4527008"
- ",423570 4527016,423537 4527011,423505 4526996"
- ",423480 4526994,423457 4527012,423434 4527021"
- ",423367 4527008,423263 4526998,423210 4526993"
- ",423157 4526996,423110 4526994,423071 4526984"
- ",423048 4526984,423032 4526994,423254 4527613"
- ",423889 4528156,424585 4528050,425479 4527974"
- ",425795 4527867,426062 4527794)))",
- 424530.6059719588, 4527519.619367547);
-}
-
-
-
-int test_main(int, char* [])
-{
- test_2d<bg::model::d2::point_xy<float> >();
- test_2d<bg::model::d2::point_xy<double> >();
- test_2d<bg::model::d2::point_xy<long int> >(true);
- //test_2d<bg::model::d2::point_xy<long long> >(true);
- //test_2d<bg::model::d2::point_xy<long double> >();
-
-#ifdef HAVE_TTMATH
- test_2d<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_clear.cpp b/libs/geometry/test/multi/algorithms/multi_clear.cpp
deleted file mode 100644
index 39d777930..000000000
--- a/libs/geometry/test/multi/algorithms/multi_clear.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/algorithms/clear.hpp>
-#include <boost/geometry/algorithms/num_points.hpp>
-#include <boost/geometry/multi/algorithms/clear.hpp>
-#include <boost/geometry/multi/algorithms/num_points.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <boost/variant/variant.hpp>
-
-
-template <typename Geometry>
-void test_geometry(std::string const& wkt, unsigned int expected)
-{
- Geometry geometry;
- bg::read_wkt(wkt, geometry);
- boost::variant<Geometry> variant_geometry(geometry);
-
- bg::clear(geometry);
- BOOST_CHECK_EQUAL(bg::num_points(geometry), expected);
-
- bg::clear(variant_geometry);
- BOOST_CHECK_EQUAL(bg::num_points(variant_geometry), expected);
-}
-
-
-template <typename Point>
-void test_all()
-{
- typedef bg::model::polygon<Point> poly;
- typedef bg::model::linestring<Point> ls;
- typedef bg::model::multi_point<Point> mpoint;
- typedef bg::model::multi_linestring<ls> mls;
- typedef bg::model::multi_polygon<poly> mpoly;
-
- test_geometry<Point>("POINT(0 0)", 1);
- test_geometry<ls>("LINESTRING(0 0,0 1)", 0);
- test_geometry<poly>("POLYGON((0 0,0 1,1 0,0 0))", 0);
- test_geometry<mpoint>("MULTIPOINT((0 0),(0 1),(1 0),(0 0))", 0);
- test_geometry<mls>("MULTILINESTRING((0 0,0 1),(1 0,0 0))", 0);
- test_geometry<mpoly>("MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((10 0,10 1,11 0,10 0)))", 0);
-}
-
-
-int test_main( int , char* [] )
-{
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_convert.cpp b/libs/geometry/test/multi/algorithms/multi_convert.cpp
deleted file mode 100644
index 0bfdf6ea6..000000000
--- a/libs/geometry/test/multi/algorithms/multi_convert.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <algorithms/test_convert.hpp>
-
-#include <boost/geometry/multi/algorithms/convert.hpp>
-#include <boost/geometry/multi/algorithms/num_points.hpp>
-
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-
-template <typename Point1, typename Point2>
-void test_mixed_point_types()
-{
- test_mixed_identical_result
- <
- bg::model::multi_point<Point1>,
- bg::model::multi_point<Point2>
- >
- ("MULTIPOINT((1 1),(2 2),(3 3))");
-
- test_mixed_identical_result
- <
- bg::model::multi_linestring<bg::model::linestring<Point1> >,
- bg::model::multi_linestring<bg::model::linestring<Point2> >
- >
- ("MULTILINESTRING((1 1,2 2),(3 3,4 4))");
-
- // Single -> multi (always possible)
- test_mixed
- <
- Point1, bg::model::multi_point<Point2>
- >
- (
- "POINT(1 1)",
- "MULTIPOINT((1 1))",
- 1
- );
- test_mixed
- <
- bg::model::linestring<Point1>,
- bg::model::multi_linestring<bg::model::linestring<Point2> >
- >
- (
- "LINESTRING(1 1,2 2)",
- "MULTILINESTRING((1 1,2 2))",
- 2
- );
- test_mixed
- <
- bg::model::segment<Point1>,
- bg::model::multi_linestring<bg::model::linestring<Point2> >
- >
- (
- "LINESTRING(1 1,2 2)",
- "MULTILINESTRING((1 1,2 2))",
- 2
- );
- test_mixed
- <
- bg::model::box<Point1>,
- bg::model::multi_polygon<bg::model::polygon<Point2> >
- >
- (
- "BOX(0 0,1 1)",
- "MULTIPOLYGON(((0 0,0 1,1 1,1 0,0 0)))",
- 5
- );
- test_mixed
- <
- bg::model::ring<Point1, true>,
- bg::model::multi_polygon<bg::model::polygon<Point2, false> >
- >
- (
- "POLYGON((0 0,0 1,1 1,1 0,0 0))",
- "MULTIPOLYGON(((0 0,1 0,1 1,0 1,0 0)))",
- 5
- );
-
- // Multi -> single: should not compile (because multi often have 0 or >1 elements)
-}
-
-template <typename Point1, typename Point2>
-void test_mixed_types()
-{
- test_mixed_point_types<Point1, Point2>();
- test_mixed_point_types<Point2, Point1>();
-}
-
-int test_main( int , char* [] )
-{
- test_mixed_types
- <
- bg::model::point<int, 2, bg::cs::cartesian>,
- bg::model::point<double, 2, bg::cs::cartesian>
- >();
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_convex_hull.cpp b/libs/geometry/test/multi/algorithms/multi_convex_hull.cpp
deleted file mode 100644
index 4fe00633f..000000000
--- a/libs/geometry/test/multi/algorithms/multi_convex_hull.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-
-// This file was modified by Oracle on 2014.
-// Modifications copyright (c) 2014 Oracle and/or its affiliates.
-
-// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <cstddef>
-#include <iterator>
-#include <string>
-
-#include <algorithms/test_convex_hull.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-
-#include <boost/geometry/io/wkt/read.hpp>
-
-#include <boost/geometry/multi/core/point_order.hpp>
-#include <boost/geometry/multi/core/point_type.hpp>
-
-#include <boost/geometry/multi/views/detail/range_type.hpp>
-
-#include <boost/geometry/multi/algorithms/num_points.hpp>
-#include <boost/geometry/multi/algorithms/detail/for_each_range.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-
-
-
-template <typename P>
-void test_all()
-{
- typedef bg::model::multi_point<P> mp;
- typedef bg::model::multi_linestring<bg::model::linestring<P> > ml;
- typedef bg::model::multi_polygon<bg::model::polygon<P> > mpoly;
-
- // All points below in upper-points and lower-points
- test_geometry<mp>("MULTIPOINT((0 0),(5 0),(1 1),(4 1))", -1, 5, 4.0);
- test_geometry<mp>("MULTIPOINT((0 1),(5 1),(1 0),(4 0))", -1, 5, 4.0);
-
- // All points in vertical line (this delivers an empty polygon with 3 points and closing point for closed)
- test_geometry<mp>("MULTIPOINT((1 0),(5 0),(3 0),(4 0),(2 0))", -1, 4, 0.0);
-
- // One point only
- test_geometry<mp>("MULTIPOINT((1 0))", -1, 4, 0.0);
-
- // Problem of 6019, reproduced by the convex hull robustness test:
- test_geometry<mp>("MULTIPOINT((2 9),(1 3),(9 4),(1 1),(1 0),(7 9),(2 5),(3 7),(3 6),(2 4))",
- -1, 6, 48.0);
-
- // Ticket 6019:
- test_geometry<mp>("MULTIPOINT((0 53),(0 103),(0 53),(0 3),(0 3),(0 0),(1 0),(1 1),(2 1),(2 0),(2 0),(2 0),(3 0),(3 1),(4 1),(4 0),(5 0),(0 3),(10 3),(10 2),(10 2),(10 2),(5 2),(5 0),(5 0),(55 0),(105 0))",
- -1, 4, 5407.5);
- // Ticket 6021:
- test_geometry<mp>("multipoint((0 53), (0 103), (1 53))", 3, 4, 25);
-
- test_geometry<mp>("multipoint((1.1 1.1), (2.5 2.1), (3.1 3.1), (4.9 1.1), (3.1 1.9))", 5, 4, 3.8);
- test_geometry<ml>("multilinestring((2 4, 3 4, 3 5), (4 3,4 4,5 4))", 6, 5, 3.0);
- test_geometry<mpoly>("multipolygon(((1 4,1 6,2 5,3 5,4 6,4 4,1 4)), ((4 2,4 3,6 3,6 2,4 2)))", 12, 7, 14.0);
-
- test_empty_input<mp>();
- test_empty_input<ml>();
- test_empty_input<mpoly>();
-}
-
-
-int test_main(int, char* [])
-{
- //test_all<bg::model::d2::point_xy<int> >();
- //test_all<bg::model::d2::point_xy<float> >();
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_correct.cpp b/libs/geometry/test/multi/algorithms/multi_correct.cpp
deleted file mode 100644
index 7359d3f76..000000000
--- a/libs/geometry/test/multi/algorithms/multi_correct.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/algorithms/correct.hpp>
-
-#include <boost/geometry/strategies/strategies.hpp>
-
-#include <boost/geometry/multi/algorithms/correct.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-#include <boost/geometry/geometries/box.hpp>
-#include <boost/geometry/geometries/ring.hpp>
-#include <boost/geometry/geometries/linestring.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/geometries/point.hpp>
-#include <boost/geometry/geometries/polygon.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-
-template <typename Geometry>
-void test_geometry(std::string const& wkt, std::string const& expected)
-{
- Geometry geometry;
-
- bg::read_wkt(wkt, geometry);
- bg::correct(geometry);
-
- std::ostringstream out;
- out << bg::wkt(geometry);
-
- BOOST_CHECK_EQUAL(out.str(), expected);
-}
-
-template <typename P>
-void test_all()
-{
- typedef bg::model::multi_polygon<bg::model::polygon<P> > cw_type;
- std::string cw_mp =
- "MULTIPOLYGON(((0 0,0 1,1 1,1 0,0 0)))";
- test_geometry<cw_type>(cw_mp, cw_mp);
-
- test_geometry<cw_type>("MULTIPOLYGON(((0 0,1 0,1 1,0 1,0 0)))",
- cw_mp);
-}
-
-int test_main( int , char* [] )
-{
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_covered_by.cpp b/libs/geometry/test/multi/algorithms/multi_covered_by.cpp
deleted file mode 100644
index df40109e5..000000000
--- a/libs/geometry/test/multi/algorithms/multi_covered_by.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/algorithms/correct.hpp>
-#include <boost/geometry/algorithms/covered_by.hpp>
-
-#include <boost/geometry/geometries/box.hpp>
-#include <boost/geometry/geometries/polygon.hpp>
-
-#include <boost/geometry/multi/core/point_order.hpp>
-#include <boost/geometry/multi/algorithms/covered_by.hpp>
-
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-#include <algorithms/test_covered_by.hpp>
-
-
-template <typename P>
-void test_all()
-{
- typedef bg::model::multi_polygon<bg::model::polygon<P> > mp;
-
- // test multi-with-one-polygon (trivial case)
- test_geometry<P, mp>("POINT(1 1)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", true);
- test_geometry<P, mp>("POINT(3 3)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", false);
- test_geometry<P, mp>("POINT(0 1)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", true);
- test_geometry<P, mp>("POINT(4 4)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", false);
-
- // test if it is in one of them
- std::string multi("MULTIPOLYGON("
- "((0 0,0 2,2 2,2 0,0 0))"
- "((3 3,3 6,6 6,6 3,3 3))"
- ")");
- test_geometry<P, mp>("POINT(4 4)", multi, true);
- test_geometry<P, mp>("POINT(1 1)", multi, true);
- test_geometry<P, mp>("POINT(0 1)", multi, true);
-}
-
-int test_main( int , char* [] )
-{
- //test_all<bg::model::d2::point_xy<int> >();
- test_all<bg::model::d2::point_xy<double> >();
-
-#if defined(HAVE_TTMATH)
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_difference.cpp b/libs/geometry/test/multi/algorithms/multi_difference.cpp
deleted file mode 100644
index 8c6b0dbbb..000000000
--- a/libs/geometry/test/multi/algorithms/multi_difference.cpp
+++ /dev/null
@@ -1,229 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <iostream>
-#include <string>
-
-// If defined, tests are run without rescaling-to-integer or robustness policy
-// This multi_difference currently contains no tests for double which then fail
-// #define BOOST_GEOMETRY_NO_ROBUSTNESS
-
-//#define HAVE_TTMATH
-//#define BOOST_GEOMETRY_DEBUG_ASSEMBLE
-//#define BOOST_GEOMETRY_CHECK_WITH_SQLSERVER
-
-//#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
-//#define BOOST_GEOMETRY_DEBUG_FOLLOW
-//#define BOOST_GEOMETRY_DEBUG_TRAVERSE
-
-
-#include <algorithms/test_difference.hpp>
-#include <algorithms/test_overlay.hpp>
-#include <multi/algorithms/overlay/multi_overlay_cases.hpp>
-
-#include <boost/geometry/multi/algorithms/correct.hpp>
-#include <boost/geometry/multi/algorithms/intersection.hpp>
-#include <boost/geometry/multi/algorithms/within.hpp> // only for testing #77
-
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <boost/geometry/multi/io/wkt/read.hpp>
-
-template <typename Ring, typename Polygon, typename MultiPolygon>
-void test_areal()
-{
- test_one<Polygon, MultiPolygon, MultiPolygon>("simplex_multi",
- case_multi_simplex[0], case_multi_simplex[1],
- 5, 21, 5.58, 4, 17, 2.58);
-
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_multi_no_ip",
- case_multi_no_ip[0], case_multi_no_ip[1],
- 2, 12, 24.0, 2, 12, 34.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_multi_2",
- case_multi_2[0], case_multi_2[1],
- 2, 15, 19.6, 2, 13, 33.6);
-
- test_one<Polygon, MultiPolygon, Polygon>("simplex_multi_mp_p",
- case_multi_simplex[0], case_single_simplex,
- 5, 21, 5.58, 4, 17, 2.58);
- test_one<Polygon, Ring, MultiPolygon>("simplex_multi_r_mp",
- case_single_simplex, case_multi_simplex[0],
- 4, 17, 2.58, 5, 21, 5.58);
- test_one<Ring, MultiPolygon, Polygon>("simplex_multi_mp_r",
- case_multi_simplex[0], case_single_simplex,
- 5, 21, 5.58, 4, 17, 2.58);
-
- // Constructed cases for multi/touch/equal/etc
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_61_multi",
- case_61_multi[0], case_61_multi[1],
- 2, 10, 2, 2, 10, 2);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_62_multi",
- case_62_multi[0], case_62_multi[1],
- 0, 0, 0, 1, 5, 1);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_63_multi",
- case_63_multi[0], case_63_multi[1],
- 0, 0, 0, 1, 5, 1);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_64_multi",
- case_64_multi[0], case_64_multi[1],
- 1, 5, 1, 1, 5, 1);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_65_multi",
- case_65_multi[0], case_65_multi[1],
- 0, 0, 0, 2, 10, 3);
- /* TODO: fix
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_72_multi",
- case_72_multi[0], case_72_multi[1],
- 3, 13, 1.65, 3, 17, 6.15);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_77_multi",
- case_77_multi[0], case_77_multi[1],
- 6, 31, 7, 6, 36, 13);
- */
-
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_78_multi",
- case_78_multi[0], case_78_multi[1],
- 1, 5, 1.0, 1, 5, 1.0);
-
- // Ticket on GGL list 2011/10/25
- // to mix polygon/multipolygon in call to difference
- test_one<Polygon, Polygon, Polygon>("ggl_list_20111025_vd_pp",
- ggl_list_20111025_vd[0], ggl_list_20111025_vd[1],
- 1, 4, 8.0, 1, 4, 12.5);
- test_one<Polygon, Polygon, MultiPolygon>("ggl_list_20111025_vd_pm",
- ggl_list_20111025_vd[0], ggl_list_20111025_vd[3],
- 1, 4, 8.0, 1, 4, 12.5);
- test_one<Polygon, MultiPolygon, Polygon>("ggl_list_20111025_vd_mp",
- ggl_list_20111025_vd[2], ggl_list_20111025_vd[1],
- 1, 4, 8.0, 1, 4, 12.5);
- test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20111025_vd_mm",
- ggl_list_20111025_vd[2], ggl_list_20111025_vd[3],
- 1, 4, 8.0, 1, 4, 12.5);
-
- // Second case
- // This can be tested with this SQL for SQL-Server
- /*
- with viewy as (select geometry::STGeomFromText(
- 'POLYGON((5 0,5 4,8 4,8 0,5 0))',0) as p,
- geometry::STGeomFromText(
- 'MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)),((4 0,4 2,6 2,6 0,4 0)))',0) as q)
- select
- p.STDifference(q).STArea(),p.STDifference(q).STNumGeometries(),p.STDifference(q) as p_min_q,
- q.STDifference(p).STArea(),q.STDifference(p).STNumGeometries(),q.STDifference(p) as q_min_p,
- p.STSymDifference(q).STArea(),q.STSymDifference(p) as p_xor_q
- from viewy
-
- Outputting:
- 10, 1, <WKB>, 6, 2, <WKB>, 16, <WKB>
- */
-
- test_one<Polygon, Polygon, MultiPolygon>("ggl_list_20111025_vd_2",
- ggl_list_20111025_vd_2[0], ggl_list_20111025_vd_2[1],
- 1, 7, 10.0, 2, 10, 6.0);
-
- test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_a",
- ggl_list_20120915_h2[0], ggl_list_20120915_h2[1],
- 2, 13, 17.0, 0, 0, 0.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_b",
- ggl_list_20120915_h2[0], ggl_list_20120915_h2[2],
- 2, 13, 17.0, 0, 0, 0.0);
-
- test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120221_volker",
- ggl_list_20120221_volker[0], ggl_list_20120221_volker[1],
- 2, 12, 7962.66, 1, 18, 2775258.93,
- 0.001);
-
- test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_9081",
- ticket_9081[0], ticket_9081[1],
- 2, 28, 0.0907392476356186, 4, 25, 0.126018011439877,
- 0.001);
-
- /* TODO: fix
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_101_multi",
- case_101_multi[0], case_101_multi[1],
- 5, 23, 4.75, 5, 40, 12.75);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_102_multi",
- case_102_multi[0], case_102_multi[1],
- 2, 8, 0.75, 6, 25, 3.75);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_107_multi",
- case_107_multi[0], case_107_multi[1],
- 2, 11, 2.25, 3, 14, 3.0);
- */
- /*
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_1",
- case_recursive_boxes_1[0], case_recursive_boxes_1[1],
- 1, 1, 1, 1, 1, 1);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_2",
- case_recursive_boxes_2[0], case_recursive_boxes_2[1],
- 1, 1, 1, 1, 1, 1);
-
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_3",
- case_recursive_boxes_3[0], case_recursive_boxes_3[1],
- 1, 1, 1, 1, 1, 1);
-*/
-}
-
-template <typename MultiPolygon, typename MultiLineString>
-void test_areal_linear()
-{
- 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, LineString, MultiPolygon>("case_mp_ls_1", "LINESTRING(2 0,2 5)", case_multi_simplex[0], 2, 4, 1.30);
- test_one_lp<LineString, MultiLineString, Polygon>("case_p_mls_1", "MULTILINESTRING((2 0,2 5),(3 0,3 5))", case_single_simplex, 3, 6, 2.5);
- test_one_lp<LineString, MultiLineString, MultiPolygon>("case_mp_mls_1", "MULTILINESTRING((2 0,2 5),(3 0,3 5))", case_multi_simplex[0], 5, 10, 3.1666667);
- test_one_lp<LineString, MultiLineString, Ring>("case_r_mls_1", "MULTILINESTRING((2 0,2 5),(3 0,3 5))", case_single_simplex, 3, 6, 2.5);
-
- // Collinear cases, with multiple turn points at the same location
- test_one_lp<LineString, LineString, MultiPolygon>("case_mp_ls_2a", "LINESTRING(1 0,1 1,2 1,2 0)", "MULTIPOLYGON(((0 0,0 1,1 1,1 0,0 0)),((1 1,1 2,2 2,2 1,1 1)))", 1, 2, 1.0);
- test_one_lp<LineString, LineString, MultiPolygon>("case_mp_ls_2b", "LINESTRING(1 0,1 1,2 1,2 0)", "MULTIPOLYGON(((1 1,1 2,2 2,2 1,1 1)),((0 0,0 1,1 1,1 0,0 0)))", 1, 2, 1.0);
-
- test_one_lp<LineString, LineString, MultiPolygon>("case_mp_ls_3",
- "LINESTRING(6 6,6 7,7 7,7 6,8 6,8 7,9 7,9 6)",
- "MULTIPOLYGON(((5 7,5 8,6 8,6 7,5 7)),((6 6,6 7,7 7,7 6,6 6)),((8 8,9 8,9 7,8 7,7 7,7 8,8 8)))", 2, 5, 3.0);
-
- return;
-
- // TODO: this case contains collinearities and should still be solved
- test_one_lp<LineString, LineString, MultiPolygon>("case_mp_ls_4",
- "LINESTRING(0 5,0 6,1 6,1 5,2 5,2 6,3 6,3 5,3 4,3 3,2 3,2 4,1 4,1 3,0 3,0 4)",
- "MULTIPOLYGON(((0 2,0 3,1 2,0 2)),((2 5,3 6,3 5,2 5)),((1 5,1 6,2 6,2 5,1 5)),((2 3,2 4,3 4,2 3)),((0 3,1 4,1 3,0 3)),((4 3,3 3,3 5,4 5,4 4,4 3)))", 5, 11, 6.0);
-}
-
-
-template <typename P>
-void test_all()
-{
- //typedef bg::model::box<P> box;
- typedef bg::model::ring<P> ring;
- typedef bg::model::polygon<P> polygon;
- typedef bg::model::multi_polygon<polygon> multi_polygon;
- test_areal<ring, polygon, multi_polygon>();
- test_areal_linear<multi_polygon, bg::model::multi_linestring<bg::model::linestring<P> > >();
-}
-
-
-int test_main(int, char* [])
-{
- test_all<bg::model::d2::point_xy<double > >();
-
-#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
- test_all<bg::model::d2::point_xy<float> >();
-
-#if defined(HAVE_TTMATH)
- std::cout << "Testing TTMATH" << std::endl;
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_difference_spike.cpp b/libs/geometry/test/multi/algorithms/multi_difference_spike.cpp
deleted file mode 100644
index 6753a2380..000000000
--- a/libs/geometry/test/multi/algorithms/multi_difference_spike.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2013 Barend Gehrels, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-#include <boost/geometry.hpp>
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_geometries.hpp>
-
-#include <algorithms/test_difference.hpp>
-
-
-template <typename P, bool ClockWise, bool Closed>
-void test_spikes_in_ticket_8364()
-{
- // See: https://svn.boost.org/trac/boost/ticket/8364
- //_TPolygon<T> polygon( "MULTIPOLYGON(((1031 1056,3232 1056,3232 2856,1031 2856)))" );
- //polygon -= _TPolygon<T>( "MULTIPOLYGON(((1032 1458,1032 1212,2136 2328,3234 2220,3234 2412,2136 2646)))" );
- //polygon -= _TPolygon<T>( "MULTIPOLYGON(((1032 1764,1032 1458,2136 2646,3234 2412,3234 2532,2136 2790)))" );
- // RESULTS OF ABOVE IS USED IN STEP 3 BELOW
- //polygon -= _TPolygon<T>( "MULTIPOLYGON(((1032 2130,1032 1764,2052 2712)),((3234 2580,2558 2690,3234 2532)),((2558 2690,2136 2790,2052 2712,2136 2760)))" ); USED IN STEP 3
- //polygon -= _TPolygon<T>( "MULTIPOLYGON(((1032 2556,1032 2130,1778 2556)),((3234 2580,2136 2760,1778 2556,3234 2556)))" ); USED IN STEP 4
- // NOTE: polygons below are closed and clockwise
-
- typedef typename bg::coordinate_type<P>::type ct;
- typedef bg::model::polygon<P, ClockWise, Closed> polygon;
- typedef bg::model::multi_polygon<polygon> multi_polygon;
-
- // The difference of polygons below result in a spike. The spike should be there, it is also generated in ttmath,
- // and (e.g.) in SQL Server. However, using int-coordinates, the spike makes the polygon invalid. Therefore it is now (since August 2013) checked and removed.
-
- // So using int's, the spike is removed automatically. Therefore there is one polygon less, and less points. Also area differs
- test_one<polygon, multi_polygon, multi_polygon>("ticket_8364_step3",
- "MULTIPOLYGON(((3232 2532,2136 2790,1032 1764,1032 1458,1032 1212,2136 2328,3232 2220,3232 1056,1031 1056,1031 2856,3232 2856,3232 2532)))",
- "MULTIPOLYGON(((1032 2130,2052 2712,1032 1764,1032 2130)),((3234 2580,3234 2532,2558 2690,3234 2580)),((2558 2690,2136 2760,2052 2712,2136 2790,2558 2690)))",
- 2,
- if_typed<ct, int>(19, 22),
- if_typed<ct, int>(2775595.5, 2775256.487954), // SQL Server: 2775256.47588724
- 3,
- -1, // don't check point-count
- if_typed<ct, int>(7907.0, 7810.487954)); // SQL Server: 7810.48711165739
-
- test_one<polygon, multi_polygon, multi_polygon>("ticket_8364_step4",
- "MULTIPOLYGON(((2567 2688,2136 2790,2052 2712,1032 2130,1032 1764,1032 1458,1032 1212,2136 2328,3232 2220,3232 1056,1031 1056,1031 2856,3232 2856,3232 2580,2567 2688)))",
- "MULTIPOLYGON(((1032 2556,1778 2556,1032 2130,1032 2556)),((3234 2580,3234 2556,1778 2556,2136 2760,3234 2580)))",
- 1,
- if_typed<ct, int>(17, 20),
- if_typed<ct, int>(2616125.0, 2616029.559567), // SQL Server: 2616029.55616044
- 1,
- if_typed<ct, int>(9, 11),
- if_typed<ct, int>(161211.5, 161054.559567)); // SQL Server: 161054.560110092
-}
-
-template <typename P, bool ClockWise, bool Closed>
-void test_spikes_in_ticket_8365()
-{
- // See: https://svn.boost.org/trac/boost/ticket/8365
- // NOTE: polygons below are closed and clockwise
-
- typedef typename bg::coordinate_type<P>::type ct;
- typedef bg::model::polygon<P, ClockWise, Closed> polygon;
- typedef bg::model::multi_polygon<polygon> multi_polygon;
-
- test_one<polygon, multi_polygon, multi_polygon>("ticket_8365_step2",
- "MULTIPOLYGON(((971 2704,971 1402,4640 1402,3912 1722,3180 2376,3912 1884,4643 1402,5395 1402,5395 3353,971 3353,971 2865,1704 3348)))",
- "MULTIPOLYGON(((5388 1560,4650 1722,3912 1884,4650 1398)),((2442 3186,1704 3348,966 2700,1704 3024)))",
- if_typed<ct, int>(1, 2),
- if_typed<ct, int>(17, 21),
- if_typed<ct, int>(7974930.5, 7975207.6047877), // SQL Server:
- 2,
- -1,
- if_typed<ct, int>(196.5, 197.1047877)); // SQL Server:
-}
-
-
-
-
-
-int test_main(int, char* [])
-{
- test_spikes_in_ticket_8364<bg::model::d2::point_xy<double>, true, true>();
- test_spikes_in_ticket_8364<bg::model::d2::point_xy<double>, false, false>();
- test_spikes_in_ticket_8365<bg::model::d2::point_xy<double>, true, true>();
- test_spikes_in_ticket_8365<bg::model::d2::point_xy<double>, false, false>();
-
- test_spikes_in_ticket_8364<bg::model::d2::point_xy<int>, true, true>();
- test_spikes_in_ticket_8364<bg::model::d2::point_xy<int>, false, false>();
- test_spikes_in_ticket_8365<bg::model::d2::point_xy<int>, true, true >();
- test_spikes_in_ticket_8365<bg::model::d2::point_xy<int>, false, false >();
-
-#ifdef HAVE_TTMATH
- std::cout << "Testing TTMATH" << std::endl;
- test_spikes_in_ticket_8364<bg::model::d2::point_xy<ttmath_big>, true, true>();
- test_spikes_in_ticket_8365<bg::model::d2::point_xy<ttmath_big>, true, true>();
-#endif
-
- return 0;
-}
-
diff --git a/libs/geometry/test/multi/algorithms/multi_disjoint.cpp b/libs/geometry/test/multi/algorithms/multi_disjoint.cpp
deleted file mode 100644
index 05cd985e3..000000000
--- a/libs/geometry/test/multi/algorithms/multi_disjoint.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2012 Barend Gehrels, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-#include <algorithms/test_disjoint.hpp>
-
-#include <boost/geometry/strategies/strategies.hpp>
-
-#include <boost/geometry/multi/algorithms/detail/sections/range_by_section.hpp>
-#include <boost/geometry/multi/algorithms/detail/sections/sectionalize.hpp>
-#include <boost/geometry/multi/algorithms/detail/point_on_border.hpp>
-#include <boost/geometry/multi/algorithms/detail/for_each_range.hpp>
-#include <boost/geometry/multi/algorithms/within.hpp>
-#include <boost/geometry/multi/core/closure.hpp>
-#include <boost/geometry/multi/core/geometry_id.hpp>
-#include <boost/geometry/multi/core/ring_type.hpp>
-#include <boost/geometry/multi/views/detail/range_type.hpp>
-
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <test_common/test_point.hpp>
-
-#include <algorithms/predef_relop.hpp>
-
-
-template <typename P>
-void test_all()
-{
- typedef bg::model::polygon<P> polygon;
- typedef bg::model::multi_polygon<polygon> mp;
-
- test_disjoint<mp, mp>("",
- "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
- "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
- false);
-
- // True disjoint
- test_disjoint<mp, mp>("",
- "MULTIPOLYGON(((0 0,0 4,4 4,4 0,0 0)))",
- "MULTIPOLYGON(((6 6,6 10,10 10,10 6,6 6)))",
- true);
-
- // Touch -> not disjoint
- test_disjoint<mp, mp>("",
- "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0)))",
- "MULTIPOLYGON(((5 5,5 10,10 10,10 5,5 5)))",
- false);
-
- // Not disjoint but no IP's
- test_disjoint<mp, mp>("no_ips",
- "MULTIPOLYGON(((2 2,2 8,8 8,8 2,2 2)),((20 0,20 10,30 10,30 0,20 0)))",
- "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((22 2,28 2,28 8,22 8,22 2)))",
- false);
-
- // Not disjoint and not inside each other (in first ring) but wrapped (in second rings)
- test_disjoint<mp, mp>("no_ips2",
- "MULTIPOLYGON(((2 2,2 8,8 8,8 2,2 2)),((20 0,20 10,30 10,30 0,20 0)))",
- "MULTIPOLYGON(((2 12,2 18,8 18,8 12,2 12)),((22 2,28 2,28 8,22 8,22 2)))",
- false);
-
- test_disjoint<mp, mp>("no_ips2_rev",
- "MULTIPOLYGON(((2 12,2 18,8 18,8 12,2 12)),((22 2,28 2,28 8,22 8,22 2)))",
- "MULTIPOLYGON(((2 2,2 8,8 8,8 2,2 2)),((20 0,20 10,30 10,30 0,20 0)))",
- false);
-
-
- test_disjoint<P, mp>("point_mp1",
- "POINT(0 0)",
- "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
- false);
-
- test_disjoint<P, mp>("point_mp2",
- "POINT(5 5)",
- "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
- false);
-
- test_disjoint<P, mp>("point_mp1",
- "POINT(11 11)",
- "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
- true);
-
- std::string polygon_inside_hole("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0), (2 2,8 2,8 8,2 8,2 2)),((4 4,4 6,6 6,6 4,4 4)))");
- test_disjoint<P, mp>("point_mp_pih1",
- "POINT(5 5)",
- polygon_inside_hole,
- false);
-
- test_disjoint<P, mp>("point_mp_pih2",
- "POINT(3 3)",
- polygon_inside_hole,
- true);
-
- test_disjoint<mp, P>("point_mp1rev",
- "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
- "POINT(0 0)",
- false);
-
-}
-
-int test_main(int, char* [])
-{
- //test_all<bg::model::d2::point_xy<float> >();
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
-
-
-/*
-with viewy as
-(
-select geometry::STGeomFromText('MULTIPOLYGON(((2 2,2 8,8 8,8 2,2 2)),((20 0,20 10,30 10,30 0,20 0)))',0) as p
- , geometry::STGeomFromText('MULTIPOLYGON(((2 12,2 18,8 18,8 12,2 12)),((22 2,28 2,28 8,22 8,22 2)))',0) as q
-)
- select p from viewy union all select q from viewy
--- select p.STDisjoint(q) from viewy
-*/
diff --git a/libs/geometry/test/multi/algorithms/multi_envelope.cpp b/libs/geometry/test/multi/algorithms/multi_envelope.cpp
deleted file mode 100644
index bafa5dc25..000000000
--- a/libs/geometry/test/multi/algorithms/multi_envelope.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-#include <algorithms/test_envelope.hpp>
-
-
-#include <boost/geometry/multi/algorithms/envelope.hpp>
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <boost/geometry/multi/io/wkt/read.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/geometries/adapted/c_array.hpp>
-#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
-#include <test_common/test_point.hpp>
-
-BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
-BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
-
-
-template <typename P>
-void test_2d()
-{
- /*test_envelope<bg::model::multi_point<P> >(
- "MULTIPOINT((1 1),(1 0),(1 2))", 1, 1, 0, 2);
- test_envelope<bg::model::multi_linestring<bg::model::linestring<P> > >(
- "MULTILINESTRING((0 0,1 1),(1 1,2 2),(2 2,3 3))", 0, 3, 0, 3);
-*/
- test_envelope<bg::model::multi_polygon<bg::model::polygon<P> > >(
- "MULTIPOLYGON(((1 1,1 3,3 3,3 1,1 1)),((4 4,4 6,6 6,6 4,4 4)))", 1, 6, 1, 6);
-}
-
-
-template <typename P>
-void test_3d()
-{
- //typedef bg::model::multi_point<P> mp;
-}
-
-
-int test_main( int , char* [] )
-{
- test_2d<boost::tuple<float, float> >();
- test_2d<bg::model::d2::point_xy<float> >();
- test_2d<bg::model::d2::point_xy<double> >();
-
- test_3d<boost::tuple<float, float, float> >();
- test_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
-
-#ifdef HAVE_TTMATH
- test_2d<bg::model::d2::point_xy<ttmath_big> >();
- test_2d<bg::model::point<ttmath_big, 3, bg::cs::cartesian> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_equals.cpp b/libs/geometry/test/multi/algorithms/multi_equals.cpp
deleted file mode 100644
index 64bc0d470..000000000
--- a/libs/geometry/test/multi/algorithms/multi_equals.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-#include <algorithms/test_equals.hpp>
-
-#include <boost/geometry/multi/algorithms/area.hpp>
-#include <boost/geometry/multi/algorithms/equals.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <boost/geometry/multi/io/wkt/read.hpp>
-
-
-
-template <typename P>
-void test_all()
-{
- std::string case1 = "MULTIPOLYGON(((0 0,0 7,4 2,2 0,0 0)))";
- std::string case1_p = "POLYGON((0 0,0 7,4 2,2 0,0 0))";
-
- typedef bg::model::polygon<P> polygon;
- typedef bg::model::multi_polygon<polygon> mp;
- test_geometry<mp, mp>("c1", case1, case1, true);
-
- test_geometry<mp, mp>("c2",
- "MULTIPOLYGON(((0 0,0 7.01,4 2,2 0,0 0)))",
- case1, false);
-
- // Different order == equal
- test_geometry<mp, mp>("c3",
- "MULTIPOLYGON(((0 0,0 7,4 2,2 0,0 0)),((10 10,10 12,12 10,10 10)))",
- "MULTIPOLYGON(((10 10,10 12,12 10,10 10)),((0 0,0 7,4 2,2 0,0 0)))",
- true);
-
- // check different types
- test_geometry<polygon, mp>("c1_p_mp", case1_p, case1, true);
- test_geometry<mp, polygon>("c1_mp_p", case1, case1_p, true);
-
-}
-
-int test_main( int , char* [] )
-{
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_for_each.cpp b/libs/geometry/test/multi/algorithms/multi_for_each.cpp
deleted file mode 100644
index 70165a44f..000000000
--- a/libs/geometry/test/multi/algorithms/multi_for_each.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/algorithms/for_each.hpp>
-#include <boost/geometry/multi/algorithms/for_each.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-#include <boost/geometry/geometries/box.hpp>
-#include <boost/geometry/geometries/ring.hpp>
-#include <boost/geometry/geometries/linestring.hpp>
-#include <boost/geometry/geometries/point.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/geometries/polygon.hpp>
-
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <algorithms/test_for_each.hpp>
-
-
-template <typename P>
-void test_all()
-{
- test_geometry<bg::model::multi_point<P> >
- (
- "MULTIPOINT((1 1))"
-
- // per point
- , 1
- , "MULTIPOINT((101 1))"
- , "MULTIPOINT((101 100))"
- // per segment
- , ""
- , 0
- , "MULTIPOINT((1 1))"
- );
-
- test_geometry<bg::model::multi_linestring<bg::model::linestring<P> > >
- (
- "MULTILINESTRING((1 1,2 2))"
-
- , 3
- , "MULTILINESTRING((101 1,102 2))"
- , "MULTILINESTRING((101 100,102 200))"
-
- , "((1, 1), (2, 2))"
- , std::sqrt(2.0)
- , "MULTILINESTRING((10 1,2 2))"
- );
-
- typedef bg::model::multi_polygon<bg::model::polygon<P> > mp;
- test_geometry<mp>
- (
- "MULTIPOLYGON(((1 1,1 4,4 4,4 1,1 1)))"
-
- , 11
- , "MULTIPOLYGON(((101 1,101 4,104 4,104 1,101 1)))"
- , "MULTIPOLYGON(((101 100,101 400,104 400,104 100,101 100)))"
-
- , "((1, 1), (1, 4)) ((1, 4), (4, 4)) ((4, 4), (4, 1)) ((4, 1), (1, 1))"
- , 4 * 3.0
- , "MULTIPOLYGON(((10 1,10 4,4 4,4 1,1 1,10 1)))"
- );
-
- // open multipolygon
- typedef bg::model::multi_polygon<bg::model::polygon<P, true, false> > omp;
- test_geometry<omp>
- (
- "MULTIPOLYGON(((1 1,1 4,4 4,4 1)))"
-
- , 10
- , "MULTIPOLYGON(((101 1,101 4,104 4,104 1,101 1)))"
- , "MULTIPOLYGON(((101 100,101 400,104 400,104 100,101 100)))"
-
- , "((1, 1), (1, 4)) ((1, 4), (4, 4)) ((4, 4), (4, 1)) ((4, 1), (1, 1))"
- , 4 * 3.0
- , "MULTIPOLYGON(((10 1,10 4,4 4,4 1,10 1)))"
- );
-}
-
-int test_main( int , char* [] )
-{
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_intersection.cpp b/libs/geometry/test/multi/algorithms/multi_intersection.cpp
deleted file mode 100644
index 8dea0da23..000000000
--- a/libs/geometry/test/multi/algorithms/multi_intersection.cpp
+++ /dev/null
@@ -1,240 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <iostream>
-#include <string>
-
-// If defined, tests are run without rescaling-to-integer or robustness policy
-// This multi_intersection currently contains no tests for double then failing
-// #define BOOST_GEOMETRY_NO_ROBUSTNESS
-
-// #define BOOST_GEOMETRY_DEBUG_ASSEMBLE
-
-#include <algorithms/test_intersection.hpp>
-#include <algorithms/test_overlay.hpp>
-#include <multi/algorithms/overlay/multi_overlay_cases.hpp>
-
-#include <boost/geometry/multi/algorithms/correct.hpp>
-#include <boost/geometry/multi/algorithms/intersection.hpp>
-#include <boost/geometry/multi/algorithms/within.hpp> // only for testing #77
-
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <boost/geometry/multi/io/wkt/read.hpp>
-
-template <typename Ring, typename Polygon, typename MultiPolygon>
-void test_areal()
-{
- test_one<Polygon, MultiPolygon, MultiPolygon>("simplex_multi",
- case_multi_simplex[0], case_multi_simplex[1],
- 2, 12, 6.42);
-
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_multi_no_ip",
- case_multi_no_ip[0], case_multi_no_ip[1],
- 2, 8, 8.5);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_multi_2",
- case_multi_2[0], case_multi_2[1],
- 3, 12, 5.9);
-
- test_one<Polygon, MultiPolygon, Polygon>("simplex_multi_mp_p",
- case_multi_simplex[0], case_single_simplex,
- 2, 12, 6.42);
-
- test_one<Polygon, Ring, MultiPolygon>("simplex_multi_r_mp",
- case_single_simplex, case_multi_simplex[0],
- 2, 12, 6.42);
- test_one<Ring, MultiPolygon, Polygon>("simplex_multi_mp_r",
- case_multi_simplex[0], case_single_simplex,
- 2, 12, 6.42);
-
- // Constructed cases for multi/touch/equal/etc
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_61_multi",
- case_61_multi[0], case_61_multi[1],
- 0, 0, 0.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_62_multi",
- case_62_multi[0], case_62_multi[1],
- 1, 5, 1.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_63_multi",
- case_63_multi[0], case_63_multi[1],
- 1, 5, 1.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_64_multi",
- case_64_multi[0], case_64_multi[1],
- 1, 5, 1.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_65_multi",
- case_65_multi[0], case_65_multi[1],
- 1, 5, 1.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_72_multi",
- case_72_multi[0], case_72_multi[1],
- 3, 14, 2.85);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_77_multi",
- case_77_multi[0], case_77_multi[1],
- 5, 33, 9);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_78_multi",
- case_78_multi[0], case_78_multi[1],
- 1, 0, 22); // In "get_turns" using partitioning, #points went from 17 to 16
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_101_multi",
- case_101_multi[0], case_101_multi[1],
- 4, 22, 4.75);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_102_multi",
- case_102_multi[0], case_102_multi[1],
- 3, 26, 19.75);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_107_multi",
- case_107_multi[0], case_107_multi[1],
- 2, 10, 1.5);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_1",
- case_recursive_boxes_1[0], case_recursive_boxes_1[1],
- 10, 97, 47.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_2",
- case_recursive_boxes_2[0], case_recursive_boxes_2[1],
- 1, 47, 90.0); // Area from SQL Server
-
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_3",
- case_recursive_boxes_3[0], case_recursive_boxes_3[1],
- 19, 87, 12.5); // Area from SQL Server
-
- 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
-
- test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_9081",
- ticket_9081[0], ticket_9081[1],
- 2, 10, 0.0019812556);
-}
-
-template <typename Polygon, typename MultiPolygon, typename Box>
-void test_areal_clip()
-{
- static std::string const clip = "POLYGON((1 1,4 4))";
- test_one<Polygon, Box, MultiPolygon>("simplex_multi_mp_b", clip, case_multi_simplex[0],
- 2, 11, 6.791666);
- test_one<Polygon, MultiPolygon, Box>("simplex_multi_b_mp", case_multi_simplex[0], clip,
- 2, 11, 6.791666);
-}
-
-template <typename LineString, typename MultiLineString, typename Box>
-void test_linear()
-{
- typedef typename bg::point_type<MultiLineString>::type point;
- test_one<point, MultiLineString, MultiLineString>("case_multi_ml_ml_1",
- "MULTILINESTRING((0 0,1 1))", "MULTILINESTRING((0 1,1 0))",
- 1, 1, 0);
- test_one<point, MultiLineString, MultiLineString>("case_multi_ml_ml_2",
- "MULTILINESTRING((0 0,1 1),(0.5 0,1.5 1))", "MULTILINESTRING((0 1,1 0),(0.5 1,1.5 0))",
- 4, 4, 0);
-
- test_one<point, LineString, MultiLineString>("case_multi_l_ml",
- "LINESTRING(0 0,1 1)", "MULTILINESTRING((0 1,1 0),(0.5 1,1.5 0))",
- 2, 2, 0);
- test_one<point, MultiLineString, LineString>("case_multi_ml_l",
- "MULTILINESTRING((0 1,1 0),(0.5 1,1.5 0))", "LINESTRING(0 0,1 1)",
- 2, 2, 0);
-
- test_one<LineString, MultiLineString, Box>("case_multi_ml_b",
- "MULTILINESTRING((0 0,3 3)(1 0,4 3))", "POLYGON((1 1,3 2))",
- 2, 4, 2 * std::sqrt(2.0));
- test_one<LineString, Box, MultiLineString>("case_multi_b_ml",
- "POLYGON((1 1,3 2))", "MULTILINESTRING((0 0,3 3)(1 0,4 3))",
- 2, 4, 2 * std::sqrt(2.0));
-}
-
-template <typename P>
-void test_point_output()
-{
- typedef bg::model::box<P> box;
- typedef bg::model::linestring<P> linestring;
- typedef bg::model::polygon<P> polygon;
- typedef bg::model::multi_polygon<polygon> multi_polygon;
-
- test_point_output<multi_polygon, multi_polygon>(case_multi_simplex[0], case_multi_simplex[1], 10);
- test_point_output<linestring, multi_polygon>("linestring(4 0,0 4)", case_multi_simplex[0], 4);
- test_point_output<box, multi_polygon>("box(3 0,4 6)", case_multi_simplex[0], 8);
-}
-
-template <typename MultiPolygon, typename MultiLineString>
-void test_areal_linear()
-{
- 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>
-void test_all()
-{
- //typedef bg::model::box<P> box;
- typedef bg::model::ring<P> ring;
- typedef bg::model::polygon<P> polygon;
- typedef bg::model::multi_polygon<polygon> multi_polygon;
- test_areal<ring, polygon, multi_polygon>();
-
-#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
-
- typedef bg::model::ring<P, false> ring_ccw;
- typedef bg::model::polygon<P, false> polygon_ccw;
- typedef bg::model::multi_polygon<polygon_ccw> multi_polygon_ccw;
- test_areal<ring_ccw, polygon_ccw, multi_polygon_ccw>();
-
- typedef bg::model::ring<P, true, false> ring_open;
- typedef bg::model::polygon<P, true, false> polygon_open;
- typedef bg::model::multi_polygon<polygon_open> multi_polygon_open;
- test_areal<ring_open, polygon_open, multi_polygon_open>();
-
- typedef bg::model::ring<P, false, false> ring_open_ccw;
- typedef bg::model::polygon<P, false, false> polygon_open_ccw;
- typedef bg::model::multi_polygon<polygon_open_ccw> multi_polygon_open_ccw;
- test_areal<ring_open_ccw, polygon_open_ccw, multi_polygon_open_ccw>();
-
- test_areal_clip<polygon, multi_polygon, box>();
- test_areal_clip<polygon_ccw, multi_polygon_ccw, box>();
-
- typedef bg::model::linestring<P> linestring;
- typedef bg::model::multi_linestring<linestring> multi_linestring;
-
- test_linear<linestring, multi_linestring, box>();
- test_areal_linear<multi_polygon, multi_linestring>();
-#endif
-
- test_point_output<P>();
- // linear
-
-}
-
-
-int test_main(int, char* [])
-{
- test_all<bg::model::d2::point_xy<double> >();
-
-#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
- test_all<bg::model::d2::point_xy<float> >();
-
-#if defined(HAVE_TTMATH)
- std::cout << "Testing TTMATH" << std::endl;
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_intersects.cpp b/libs/geometry/test/multi/algorithms/multi_intersects.cpp
deleted file mode 100644
index d07b8b6cf..000000000
--- a/libs/geometry/test/multi/algorithms/multi_intersects.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2012 Barend Gehrels, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <iostream>
-#include <string>
-
-
-#include <geometry_test_common.hpp>
-
-#include <algorithms/test_intersects.hpp>
-
-#include <boost/geometry.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-template <typename P>
-void test_all()
-{
- typedef bg::model::polygon<P> polygon;
- typedef bg::model::multi_polygon<polygon> mp;
-
- test_geometry<mp, mp>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
- "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
- true);
-
- test_geometry<P, mp>("POINT(0 0)",
- "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
- true);
-
-}
-
-int test_main(int, char* [])
-{
- //test_all<bg::model::d2::point_xy<float> >();
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
-
diff --git a/libs/geometry/test/multi/algorithms/multi_length.cpp b/libs/geometry/test/multi/algorithms/multi_length.cpp
deleted file mode 100644
index 5d94be158..000000000
--- a/libs/geometry/test/multi/algorithms/multi_length.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-#include <algorithms/test_length.hpp>
-
-#include <boost/geometry/multi/multi.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-
-
-template <typename P>
-void test_all()
-{
- test_geometry<bg::model::multi_linestring<bg::model::linestring<P> > >
- ("MULTILINESTRING((0 0,3 4,4 3))", 5 + sqrt(2.0));
-}
-
-int test_main( int , char* [] )
-{
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_num_geometries.cpp b/libs/geometry/test/multi/algorithms/multi_num_geometries.cpp
deleted file mode 100644
index bf7a3cee4..000000000
--- a/libs/geometry/test/multi/algorithms/multi_num_geometries.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/algorithms/num_geometries.hpp>
-#include <boost/geometry/multi/algorithms/num_geometries.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-template <typename Geometry>
-void test_geometry(std::string const& wkt, int expected)
-{
- Geometry geometry;
- bg::read_wkt(wkt, geometry);
- int detected = bg::num_geometries(geometry);
- BOOST_CHECK_MESSAGE(detected == expected,
- "num_geometries: " << wkt
- << " -> Expected: " << expected
- << " detected: " << detected);
-}
-
-
-template <typename Point>
-void test_all()
-{
- typedef bg::model::polygon<Point> poly;
- typedef bg::model::linestring<Point> ls;
- typedef bg::model::multi_point<Point> mpoint;
- typedef bg::model::multi_linestring<ls> mls;
- typedef bg::model::multi_polygon<poly> mpoly;
-
- test_geometry<Point>("POINT(0 0)", 1);
- test_geometry<ls>("LINESTRING(0 0,0 1)", 1);
- test_geometry<poly>("POLYGON((0 0,0 1,1 0,0 0))", 1);
- test_geometry<mpoint>("MULTIPOINT((0 0),(0 1),(1 0),(0 0))", 4);
- test_geometry<mls>("MULTILINESTRING((0 0,0 1),(1 0,0 0))", 2);
- test_geometry<mpoly>("MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((10 0,10 1,11 0,10 0)))", 2);
-}
-
-
-int test_main( int , char* [] )
-{
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_num_interior_rings.cpp b/libs/geometry/test/multi/algorithms/multi_num_interior_rings.cpp
deleted file mode 100644
index 73fcdc114..000000000
--- a/libs/geometry/test/multi/algorithms/multi_num_interior_rings.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/algorithms/num_interior_rings.hpp>
-#include <boost/geometry/multi/algorithms/num_interior_rings.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-template <typename Geometry>
-void test_geometry(std::string const& wkt, int expected)
-{
- Geometry geometry;
- bg::read_wkt(wkt, geometry);
- int detected = bg::num_interior_rings(geometry);
- BOOST_CHECK_MESSAGE(detected == expected,
- "num_interior_rings: " << wkt
- << " -> Expected: " << expected
- << " detected: " << detected);
-}
-
-
-template <typename Point>
-void test_all()
-{
- typedef bg::model::polygon<Point> poly;
- typedef bg::model::multi_polygon<poly> mpoly;
-
- test_geometry<poly>("POLYGON((0 0,0 10,10 0,0 0),(1 1,1 9,9 1,1 1))", 1);
- test_geometry<mpoly>("MULTIPOLYGON(((0 0,0 10,10 0,0 0),(1 1,1 9,9 1,1 1)),((0 0,0 10,10 0,0 0),(1 1,1 4,4 1,1 1),(5 1,5 4,9 1,5 1)))", 3);
-}
-
-
-int test_main( int , char* [] )
-{
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_num_points.cpp b/libs/geometry/test/multi/algorithms/multi_num_points.cpp
deleted file mode 100644
index d43b71d47..000000000
--- a/libs/geometry/test/multi/algorithms/multi_num_points.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/algorithms/num_points.hpp>
-#include <boost/geometry/multi/algorithms/num_points.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <boost/variant/variant.hpp>
-
-
-template <typename Geometry>
-void check_geometry(Geometry const& geometry, std::string const& wkt, int expected)
-{
- int detected = bg::num_points(geometry);
- BOOST_CHECK_MESSAGE(detected == expected,
- "num_points: " << wkt
- << " -> Expected: " << expected
- << " detected: " << detected);
-}
-
-template <typename Geometry>
-void test_geometry(std::string const& wkt, int expected)
-{
- Geometry geometry;
- bg::read_wkt(wkt, geometry);
- check_geometry(geometry, wkt, expected);
- check_geometry(boost::variant<Geometry>(geometry), wkt, expected);
-}
-
-
-template <typename Point>
-void test_all()
-{
- typedef bg::model::polygon<Point> poly;
- typedef bg::model::linestring<Point> ls;
- typedef bg::model::multi_point<Point> mpoint;
- typedef bg::model::multi_linestring<ls> mls;
- typedef bg::model::multi_polygon<poly> mpoly;
-
- test_geometry<Point>("POINT(0 0)", 1);
- test_geometry<ls>("LINESTRING(0 0,0 1)", 2);
- test_geometry<poly>("POLYGON((0 0,0 1,1 0,0 0))", 4);
- test_geometry<mpoint>("MULTIPOINT((0 0),(0 1),(1 0),(0 0))", 4);
- test_geometry<mls>("MULTILINESTRING((0 0,0 1),(1 0,0 0))", 4);
- test_geometry<mpoly>("MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((10 0,10 1,11 0,10 0)))", 8);
-}
-
-
-int test_main( int , char* [] )
-{
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_perimeter.cpp b/libs/geometry/test/multi/algorithms/multi_perimeter.cpp
deleted file mode 100644
index 8268fed62..000000000
--- a/libs/geometry/test/multi/algorithms/multi_perimeter.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/algorithms/perimeter.hpp>
-#include <boost/geometry/multi/algorithms/perimeter.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/geometries/polygon.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <algorithms/test_perimeter.hpp>
-
-
-template <typename P>
-void test_all()
-{
- test_geometry<bg::model::multi_polygon<bg::model::polygon<P> > >(
- "MULTIPOLYGON(((0 0,0 1,1 0,0 0)))", 1.0 + 1.0 + sqrt(2.0));
-}
-
-int test_main( int , char* [] )
-{
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_reverse.cpp b/libs/geometry/test/multi/algorithms/multi_reverse.cpp
deleted file mode 100644
index 78334928d..000000000
--- a/libs/geometry/test/multi/algorithms/multi_reverse.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/algorithms/reverse.hpp>
-#include <boost/geometry/multi/algorithms/reverse.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <algorithms/test_reverse.hpp>
-
-
-template <typename P>
-void test_all()
-{
- // Multi point, should happen nothing.
- test_geometry<bg::model::multi_point<P> >(
- "MULTIPOINT((0 0),(1 1))",
- "MULTIPOINT((0 0),(1 1))");
-
- test_geometry<bg::model::multi_linestring<bg::model::linestring<P> > >(
- "MULTILINESTRING((0 0,1 1),(3 3,4 4))",
- "MULTILINESTRING((1 1,0 0),(4 4,3 3))");
-
- typedef bg::model::multi_polygon<bg::model::polygon<P> > mp;
- test_geometry<mp>(
- "MULTIPOLYGON(((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0)))",
- "MULTIPOLYGON(((4 0,2 1,0 2,0 7,4 9,8 7,8 2,4 0)))");
- test_geometry<mp>(
- "MULTIPOLYGON(((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0),(7 3,7 6,1 6,1 3,4 3,7 3)))",
- "MULTIPOLYGON(((4 0,2 1,0 2,0 7,4 9,8 7,8 2,4 0),(7 3,4 3,1 3,1 6,7 6,7 3)))");
-}
-
-int test_main( int , char* [] )
-{
- test_all<bg::model::d2::point_xy<int> >();
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_simplify.cpp b/libs/geometry/test/multi/algorithms/multi_simplify.cpp
deleted file mode 100644
index 8b9d92265..000000000
--- a/libs/geometry/test/multi/algorithms/multi_simplify.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/multi/algorithms/simplify.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-#include <boost/geometry/geometries/box.hpp>
-#include <boost/geometry/geometries/ring.hpp>
-#include <boost/geometry/geometries/linestring.hpp>
-#include <boost/geometry/geometries/point.hpp>
-#include <boost/geometry/geometries/polygon.hpp>
-
-#include <boost/geometry/geometries/point_xy.hpp>
-
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <algorithms/test_simplify.hpp>
-
-
-template <typename P>
-void test_all()
-{
- test_geometry<bg::model::multi_point<P> >(
- "MULTIPOINT((0 0),(1 1))",
- "MULTIPOINT((0 0),(1 1))", 1.0);
-
- test_geometry<bg::model::multi_linestring<bg::model::linestring<P> > >(
- "MULTILINESTRING((0 0,5 5,10 10))",
- "MULTILINESTRING((0 0,10 10))", 1.0);
-
- typedef bg::model::multi_polygon<bg::model::polygon<P> > mp;
- test_geometry<mp>(
- "MULTIPOLYGON(((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0)))",
- "MULTIPOLYGON(((4 0,8 2,8 7,4 9,0 7,0 2,4 0)))", 1.0);
- test_geometry<mp>(
- "MULTIPOLYGON(((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0),(7 3,7 6,1 6,1 3,4 3,7 3)))",
- "MULTIPOLYGON(((4 0,8 2,8 7,4 9,0 7,0 2,4 0),(7 3,7 6,1 6,1 3,7 3)))", 1.0);
-
- // Ticket 5954 https://svn.boost.org/trac/boost/ticket/5954
- test_geometry<mp>(
- "MULTIPOLYGON(((0.561648 1,1 1,1 0,0.468083 0,0.52758 0.00800554,0.599683 0.0280924,0.601611 0.265374,0.622693 0.316765,0.69507 0.357497,0.695623 0.429711,0.655111 0.502298,0.696467 0.543147,0.840712 0.593546,0.882583 0.66546,0.852357 0.748213,0.84264 0.789567,0.832667 0.841202,0.832667 0.841202,0.740538 0.873004,0.617349 0.905045,0.566576 0.977697,0.561648 1)),((0 0.801979,0.0308575 0.786234,0.0705513 0.631135,0.141616 0.527248,0.233985 0.505872,0.264777 0.526263,0.336631 0.505009,0.356603 0.422321,0.355803 0.350038,0.375252 0.205364,0.415206 0.0709182,0.45479 0,0 0,0 0,0 0.801979)))",
- "MULTIPOLYGON(((0.561648 1,1 1,1 0,0.468083 0,0.52758 0.00800554,0.599683 0.0280924,0.601611 0.265374,0.622693 0.316765,0.69507 0.357497,0.695623 0.429711,0.655111 0.502298,0.696467 0.543147,0.840712 0.593546,0.882583 0.66546,0.852357 0.748213,0.84264 0.789567,0.832667 0.841202,0.740538 0.873004,0.617349 0.905045,0.566576 0.977697,0.561648 1)),((0 0.801979,0.0308575 0.786234,0.0705513 0.631135,0.141616 0.527248,0.233985 0.505872,0.264777 0.526263,0.336631 0.505009,0.356603 0.422321,0.355803 0.350038,0.375252 0.205364,0.415206 0.0709182,0.45479 0,0 0,0 0.801979)))", 1.0 / 2048.0);
- test_geometry<mp>(
- "MULTIPOLYGON(((1149.69 2047,2047 2047,2047 0,958.166 0,1079.96 16.3873,1227.55 57.5051,1231.5 543.221,1274.65 648.418,1422.81 731.796,1423.94 879.618,1341.01 1028.2,1425.67 1111.82,1720.94 1214.99,1806.65 1362.2,1744.77 1531.59,1724.88 1616.24,1704.47 1721.94,1704.47 1721.94,1515.88 1787.04,1263.71 1852.63,1159.78 2001.35,1149.69 2047)),((0 1641.65,63.1653 1609.42,144.419 1291.93,289.888 1079.28,478.967 1035.52,541.999 1077.26,689.084 1033.75,729.966 864.491,728.329 716.528,768.141 420.38,849.927 145.17,930.955 0,0 0,0 0,0 1641.65)))",
- "MULTIPOLYGON(((1149.69 2047,2047 2047,2047 0,958.166 0,1079.96 16.3873,1227.55 57.5051,1231.5 543.221,1274.65 648.418,1422.81 731.796,1423.94 879.618,1341.01 1028.2,1425.67 1111.82,1720.94 1214.99,1806.65 1362.2,1744.77 1531.59,1724.88 1616.24,1704.47 1721.94,1515.88 1787.04,1263.71 1852.63,1159.78 2001.35,1149.69 2047)),((0 1641.65,63.1653 1609.42,144.419 1291.93,289.888 1079.28,478.967 1035.52,541.999 1077.26,689.084 1033.75,729.966 864.491,728.329 716.528,768.141 420.38,849.927 145.17,930.955 0,0 0,0 1641.65)))", 1.0);
- // End ticket 5954
-}
-
-int test_main( int , char* [] )
-{
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_touches.cpp b/libs/geometry/test/multi/algorithms/multi_touches.cpp
deleted file mode 100644
index 8774beaf2..000000000
--- a/libs/geometry/test/multi/algorithms/multi_touches.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-#include <algorithms/test_touches.hpp>
-
-#include <boost/geometry/multi/algorithms/area.hpp>
-#include <boost/geometry/multi/algorithms/num_geometries.hpp>
-#include <boost/geometry/multi/algorithms/within.hpp>
-#include <boost/geometry/multi/algorithms/detail/sections/range_by_section.hpp>
-#include <boost/geometry/multi/algorithms/detail/sections/sectionalize.hpp>
-#include <boost/geometry/multi/algorithms/detail/for_each_range.hpp>
-#include <boost/geometry/multi/core/closure.hpp>
-#include <boost/geometry/multi/core/geometry_id.hpp>
-#include <boost/geometry/multi/core/topological_dimension.hpp>
-#include <boost/geometry/multi/core/ring_type.hpp>
-#include <boost/geometry/multi/views/detail/range_type.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <boost/geometry/multi/io/wkt/read.hpp>
-
-
-
-template <typename P>
-void test_all()
-{
- typedef bg::model::polygon<P> polygon;
- typedef bg::model::multi_polygon<polygon> mp;
- typedef bg::model::linestring<P> linestring;
- typedef bg::model::multi_linestring<linestring> ml;
-
- test_self_touches<mp>("MULTIPOLYGON(((0 0,0 100,100 100,100 0,0 0)))",
- false);
-
- // Exactly equal
- test_touches<mp, mp>("MULTIPOLYGON(((0 0,0 100,100 100,100 0,0 0)))",
- "MULTIPOLYGON(((0 0,0 100,100 100,100 0,0 0)))",
- false);
-
- // Spatially equal
- test_touches<mp, mp>("MULTIPOLYGON(((0 0,0 100,100 100,100 0,0 0)))",
- "MULTIPOLYGON(((0 0,0 100,100 100,100 80,100 20,100 0,0 0)))",
- false);
-
- // One exactly equal, another pair touching
- test_touches<mp, mp>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((20 0,20 10,30 10,30 0,20 0)))",
- "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((30 10,30 20,40 20,40 10,30 10)))",
- false);
-
- // One spatially equal (without equal segments), another pair touching
- test_touches<mp, mp>("MULTIPOLYGON(((0 0,0 5,0 10,5 10,10 10,10 5,10 0,5 0,0 0)),((20 0,20 10,30 10,30 0,20 0)))",
- "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((30 10,30 20,40 20,40 10,30 10)))",
- false);
-
- // Alternate touches
- test_touches<mp, mp>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((20 0,20 10,30 10,30 0,20 0)))",
- "MULTIPOLYGON(((10 10,10 20,20 20,20 10,10 10)),((30 10,30 20,40 20,40 10,30 10)))",
- true);
-
- // Touch plus inside
- test_touches<mp, mp>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((20 0,20 10,30 10,30 0,20 0)))",
- "MULTIPOLYGON(((10 10,10 20,20 20,20 10,10 10)),((22 2,28 2,28 8,22 8,22 2)))",
- false);
-
-
- test_touches<mp, ml>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((20 0,20 10,30 10,30 0,20 0)))",
- "MULTILINESTRING((10 10,10 20,20 20,20 10,10 10),(30 10,30 20,40 20,40 10,30 10))",
- true);
-
- test_touches<mp, ml>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((20 0,20 10,30 10,30 0,20 0)))",
- "MULTILINESTRING((10 10,10 20,20 20,20 10,10 10),(22 2,28 2,28 8,22 8,22 2))",
- false);
-
- test_touches<mp, ml>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((20 0,20 10,30 10,30 0,20 0)))",
- "MULTILINESTRING((10 10,10 20,20 20,20 10,10 10),(50 2,60 2,60 8,50 8,50 2))",
- true);
-}
-
-int test_main( int , char* [] )
-{
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_transform.cpp b/libs/geometry/test/multi/algorithms/multi_transform.cpp
deleted file mode 100644
index 9c0002583..000000000
--- a/libs/geometry/test/multi/algorithms/multi_transform.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <iostream>
-#include <sstream>
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/algorithms/transform.hpp>
-#include <boost/geometry/strategies/strategies.hpp>
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-
-#include <boost/geometry/multi/algorithms/transform.hpp>
-
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-
-// This test is a little different from transform.cpp test.
-// This test explicitly tests all geometries, including multi*
-// while the transform.cpp tests various strategies.
-
-template <typename Geometry>
-void test_transform(std::string const& wkt, std::string const& expected)
-{
- typedef typename bg::coordinate_type<Geometry>::type coordinate_type;
- const std::size_t dim = bg::dimension<Geometry>::value;
-
- Geometry geometry_in, geometry_out;
- bg::read_wkt(wkt, geometry_in);
- bg::transform(geometry_in, geometry_out,
- bg::strategy::transform::scale_transformer<coordinate_type, dim, dim>(2, 2));
- std::ostringstream detected;
- detected << bg::wkt(geometry_out);
- BOOST_CHECK_EQUAL(detected.str(), expected);
-}
-
-
-template <typename T>
-void test_all()
-{
- typedef bg::model::d2::point_xy<T> P;
-
- test_transform<P>(
- "POINT(1 1)",
- "POINT(2 2)");
- test_transform<bg::model::linestring<P> >(
- "LINESTRING(1 1,2 2)",
- "LINESTRING(2 2,4 4)");
- test_transform<bg::model::segment<P> >(
- "LINESTRING(1 1,2 2)",
- "LINESTRING(2 2,4 4)");
- test_transform<bg::model::ring<P> >(
- "POLYGON((0 0,0 1,1 0,0 0))",
- "POLYGON((0 0,0 2,2 0,0 0))");
- test_transform<bg::model::polygon<P> >(
- "POLYGON((0 0,0 1,1 0,0 0))",
- "POLYGON((0 0,0 2,2 0,0 0))");
- test_transform<bg::model::box<P> >(
- "POLYGON((0 0,0 1,1 1,1 0,0 0))",
- "POLYGON((0 0,0 2,2 2,2 0,0 0))");
- test_transform<bg::model::multi_point<P> >(
- "MULTIPOINT((1 1),(2 2))",
- "MULTIPOINT((2 2),(4 4))");
- test_transform<bg::model::multi_linestring<bg::model::linestring<P> > >(
- "MULTILINESTRING((1 1,2 2))",
- "MULTILINESTRING((2 2,4 4))");
- test_transform<bg::model::multi_polygon<bg::model::polygon<P> > >(
- "MULTIPOLYGON(((0 0,0 1,1 0,0 0)))",
- "MULTIPOLYGON(((0 0,0 2,2 0,0 0)))");
-}
-
-
-int test_main(int, char* [])
-{
- test_all<double>();
-
-#ifdef HAVE_TTMATH
- test_all<ttmath_big>();
-#endif
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_union.cpp b/libs/geometry/test/multi/algorithms/multi_union.cpp
deleted file mode 100644
index 2e1e309a6..000000000
--- a/libs/geometry/test/multi/algorithms/multi_union.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <iostream>
-#include <string>
-
-// If defined, tests are run without rescaling-to-integer or robustness policy
-// This multi_union currently contains no tests for double which then fail
-// #define BOOST_GEOMETRY_NO_ROBUSTNESS
-
-#include <algorithms/test_union.hpp>
-#include <algorithms/test_overlay.hpp>
-#include <multi/algorithms/overlay/multi_overlay_cases.hpp>
-
-#include <boost/geometry/multi/algorithms/correct.hpp>
-#include <boost/geometry/multi/algorithms/intersection.hpp>
-#include <boost/geometry/multi/algorithms/within.hpp>
-
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <boost/geometry/multi/io/wkt/read.hpp>
-
-
-template <typename Ring, typename Polygon, typename MultiPolygon>
-void test_areal()
-{
- test_one<Polygon, MultiPolygon, MultiPolygon>("simplex_multi",
- case_multi_simplex[0], case_multi_simplex[1],
- 1, 0, 20, 14.58);
-
- test_one<Polygon, Polygon, MultiPolygon>("simplex_multi_p_mp",
- case_single_simplex, case_multi_simplex[0],
- 1, 0, 20, 14.58);
- test_one<Polygon, MultiPolygon, Polygon>("simplex_multi_mp_p",
- case_multi_simplex[0], case_single_simplex,
- 1, 0, 20, 14.58);
-
- test_one<Polygon, Ring, MultiPolygon>("simplex_multi_r_mp",
- case_single_simplex, case_multi_simplex[0],
- 1, 0, 20, 14.58);
- test_one<Ring, MultiPolygon, Polygon>("simplex_multi_mp_r",
- case_multi_simplex[0], case_single_simplex,
- 1, 0, 20, 14.58);
-
-
- // Normal test cases
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_multi_no_ip",
- case_multi_no_ip[0], case_multi_no_ip[1],
- 4, 0, 16, 66.5);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_multi_2",
- case_multi_2[0], case_multi_2[1],
- 3, 0, 16, 59.1);
-
- // Constructed cases for multi/touch/equal/etc
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_61_multi",
- case_61_multi[0], case_61_multi[1],
- 1, 0, 11, 4.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_62_multi",
- case_62_multi[0], case_62_multi[1],
- 2, 0, 10, 2.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_63_multi",
- case_63_multi[0], case_63_multi[1],
- 2, 0, 10, 2.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_64_multi",
- case_64_multi[0], case_64_multi[1],
- 1, 0, 9, 3.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_65_multi",
- case_65_multi[0], case_65_multi[1],
- 3, 0, 15, 4.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_66_multi",
- case_66_multi[0], case_66_multi[1],
- 3, 0, 23, 7.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_75_multi",
- case_75_multi[0], case_75_multi[1],
- 5, 0, 25, 5.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_76_multi",
- case_76_multi[0], case_76_multi[1],
- 5, 0, 31, 8.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_89_multi",
- case_89_multi[0], case_89_multi[1],
- 1, 0, 13, 6);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_101_multi",
- case_101_multi[0], case_101_multi[1],
- 1, 0, 32, 22.25);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_103_multi",
- case_103_multi[0], case_103_multi[1],
- 1, 0, 7, 25);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_104_multi",
- case_104_multi[0], case_104_multi[1],
- 1, 0, 8, 25);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_105_multi",
- case_105_multi[0], case_105_multi[1],
- 1, 0, 5, 25);
-
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_1",
- case_recursive_boxes_1[0], case_recursive_boxes_1[1],
- 1, 1, 36, 97.0);
- test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_2",
- case_recursive_boxes_2[0], case_recursive_boxes_2[1],
- 1, 0, 14, 100.0); // Area from SQL Server
- 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
-
- test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20140212_sybren",
- ggl_list_20140212_sybren[0], ggl_list_20140212_sybren[1],
- 2, 0, 16, 0.002471626);
-
- test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_9081",
- ticket_9081[0], ticket_9081[1],
- 3, 0, 31, 0.2187385);
-}
-
-template <typename P>
-void test_all()
-{
-
- {
- typedef bg::model::ring<P> ring;
- typedef bg::model::polygon<P> polygon;
- typedef bg::model::multi_polygon<polygon> multi_polygon;
- test_areal<ring, polygon, multi_polygon>();
- }
-
- {
- typedef bg::model::ring<P, false> ring_ccw;
- typedef bg::model::polygon<P, false> polygon_ccw;
- typedef bg::model::multi_polygon<polygon_ccw> multi_polygon_ccw;
- test_areal<ring_ccw, polygon_ccw, multi_polygon_ccw>();
- }
-
-}
-
-
-int test_main(int, char* [])
-{
- test_all<bg::model::d2::point_xy<double> >();
-
-#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
- test_all<bg::model::d2::point_xy<float> >();
-
-#if defined(HAVE_TTMATH)
- std::cout << "Testing TTMATH" << std::endl;
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_unique.cpp b/libs/geometry/test/multi/algorithms/multi_unique.cpp
deleted file mode 100644
index 397e46265..000000000
--- a/libs/geometry/test/multi/algorithms/multi_unique.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/algorithms/unique.hpp>
-#include <boost/geometry/multi/algorithms/unique.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/point_xy.hpp>
-
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <algorithms/test_unique.hpp>
-
-
-template <typename P>
-void test_all()
-{
- // Multi point, should happen nothing, even if there are duplicate points
- test_geometry<bg::model::multi_point<P> >(
- "MULTIPOINT((0 0),(0 0),(1 1))",
- "MULTIPOINT((0 0),(0 0),(1 1))");
-
- test_geometry<bg::model::multi_linestring<bg::model::linestring<P> > >(
- "MULTILINESTRING((0 0,1 1,1 1),(3 3,3 3,4 4))",
- "MULTILINESTRING((0 0,1 1),(3 3,4 4))");
-
- typedef bg::model::multi_polygon<bg::model::polygon<P> > mp;
- test_geometry<mp>(
- "MULTIPOLYGON(((0 0,0 1,1 1,1 1,1 1,1 0,0 0,0 0)))",
- "MULTIPOLYGON(((0 0,0 1,1 1,1 0,0 0)))");
-
- // With holes
- test_geometry<mp>(
- "MULTIPOLYGON(((0 0,0 10,10 10,10 10,10 10,10 0,0 0,0 0)))",
- "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))");
-
-}
-
-int test_main( int , char* [] )
-{
- test_all<bg::model::d2::point_xy<int> >();
- test_all<bg::model::d2::point_xy<double> >();
-
-#ifdef HAVE_TTMATH
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/multi_within.cpp b/libs/geometry/test/multi/algorithms/multi_within.cpp
deleted file mode 100644
index 59db2dbc6..000000000
--- a/libs/geometry/test/multi/algorithms/multi_within.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-//
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/io/wkt/wkt.hpp>
-#include <boost/geometry/multi/io/wkt/wkt.hpp>
-
-#include <boost/geometry/algorithms/correct.hpp>
-#include <boost/geometry/algorithms/within.hpp>
-
-#include <boost/geometry/geometries/box.hpp>
-#include <boost/geometry/geometries/polygon.hpp>
-
-#include <boost/geometry/multi/core/point_order.hpp>
-#include <boost/geometry/multi/algorithms/within.hpp>
-
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <algorithms/test_within.hpp>
-
-
-template <typename P>
-void test_all()
-{
- typedef bg::model::multi_polygon<bg::model::polygon<P> > mp;
-
- // test multi-with-one-polygon (trivial case)
- test_geometry<P, mp>("POINT(1 1)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", true);
- test_geometry<P, mp>("POINT(3 3)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", false);
- test_geometry<P, mp>("POINT(0 1)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", false);
- test_geometry<P, mp>("POINT(4 4)", "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)))", false);
-
- // test if it is in one of them
- std::string multi("MULTIPOLYGON("
- "((0 0,0 2,2 2,2 0,0 0))"
- "((3 3,3 6,6 6,6 3,3 3))"
- ")");
- test_geometry<P, mp>("POINT(4 4)", multi, true);
- test_geometry<P, mp>("POINT(1 1)", multi, true);
- test_geometry<P, mp>("POINT(0 1)", multi, false);
-}
-
-int test_main( int , char* [] )
-{
- //test_all<bg::model::d2::point_xy<int> >();
- test_all<bg::model::d2::point_xy<double> >();
-
-#if defined(HAVE_TTMATH)
- test_all<bg::model::d2::point_xy<ttmath_big> >();
-#endif
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/algorithms/overlay/Jamfile.v2 b/libs/geometry/test/multi/algorithms/overlay/Jamfile.v2
deleted file mode 100644
index 2ea7594e1..000000000
--- a/libs/geometry/test/multi/algorithms/overlay/Jamfile.v2
+++ /dev/null
@@ -1,14 +0,0 @@
-# Boost.Geometry (aka GGL, Generic Geometry Library)
-#
-# Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-# Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-# Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-#
-# Use, modification and distribution is subject to the Boost Software License,
-# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-test-suite boost-geometry-multi-algorithms-overlay
- :
- [ run multi_traverse.cpp : : : <define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE <define>BOOST_GEOMETRY_RESCALE_TO_ROBUST ]
- ;
diff --git a/libs/geometry/test/multi/algorithms/overlay/multi_overlay_cases.hpp b/libs/geometry/test/multi/algorithms/overlay/multi_overlay_cases.hpp
deleted file mode 100644
index c44b17adb..000000000
--- a/libs/geometry/test/multi/algorithms/overlay/multi_overlay_cases.hpp
+++ /dev/null
@@ -1,458 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_GEOMETRY_TEST_MULTI_OVERLAY_CASES_HPP
-#define BOOST_GEOMETRY_TEST_MULTI_OVERLAY_CASES_HPP
-
-
-#include <string>
-
-
-static std::string case_multi_simplex[2] = {
- "MULTIPOLYGON(((0 1,2 5,5 3,0 1)),((1 1,5 2,5 0,1 1)))",
- "MULTIPOLYGON(((3 0,0 3,4 5,3 0)))" };
-
-// To mix multi/single
-static std::string case_single_simplex = "POLYGON((3 0,0 3,4 5,3 0))";
-
-static std::string case_multi_no_ip[2] =
-{
- "MULTIPOLYGON(((4 1,0 7,7 9,4 1)),((8 1,6 3,10 4,8 1)),((12 6,10 7,13 8,12 6)))",
- "MULTIPOLYGON(((14 4,8 8,15 10,14 4)),((15 3,18 9,20 2,15 3)),((3 4,1 7,5 7,3 4)))"
-};
-
-static std::string case_multi_2[2] =
-{
- "MULTIPOLYGON(((4 3,2 7,10 9,4 3)),((8 1,6 3,10 4,8 1)),((12 6,10 7,13 8,12 6)))",
- "MULTIPOLYGON(((14 4,8 8,15 10,14 4)),((15 3,18 9,20 2,15 3)),((5 5,4 7,7 7,5 5)))"
-};
-
-static std::string case_61_multi[2] =
-{
- // extracted from recursive boxes
- "MULTIPOLYGON(((1 1,1 2,2 2,2 1,1 1)),((2 2,2 3,3 3,3 2,2 2)))",
- "MULTIPOLYGON(((1 2,1 3,2 3,2 2,1 2)),((2 3,2 4,3 4,3 3,2 3)))"
-};
-
-static std::string case_62_multi[2] =
-{
- // extracted from recursive boxes
- "MULTIPOLYGON(((1 2,1 3,2 3,2 2,1 2)))",
- "MULTIPOLYGON(((1 2,1 3,2 3,2 2,1 2)),((2 3,2 4,3 4,3 3,2 3)))"
-};
-
-static std::string case_63_multi[2] =
-{
- // extracted from recursive boxes
- "MULTIPOLYGON(((1 2,1 3,2 3,2 2,1 2)))",
- "MULTIPOLYGON(((1 2,1 3,2 3,2 2,1 2)),((2 1,2 2,3 2,3 1,2 1)))"
-};
-
-static std::string case_64_multi[3] =
-{
- // extracted from recursive boxes
- "MULTIPOLYGON(((1 1,1 2,2 2,2 1,1 1)),((2 2,2 3,3 3,3 2,2 2)))",
- "MULTIPOLYGON(((1 1,1 2,2 2,3 2,3 1,2 1,1 1)))" ,
- // same but omitting not-necessary form-points at x=2 (==simplified)
- "MULTIPOLYGON(((1 1,1 2,3 2,3 1,1 1)))"
-};
-
-static std::string case_65_multi[2] =
-{
- "MULTIPOLYGON(((2 2,2 3,3 3,3 2,2 2)))",
- "MULTIPOLYGON(((1 1,1 2,2 2,2 1,1 1)),((2 2,2 3,3 3,3 2,2 2)),((3 1,3 2,5 2,5 1,3 1)))"
-};
-
-static std::string case_66_multi[2] =
-{
- "MULTIPOLYGON(((3 5,2 5,2 6,3 6,4 6,4 5,3 5)),((1 6,0 6,0 7,1 7,2 7,2 6,1 6)))",
- "MULTIPOLYGON(((1 4,1 5,2 5,2 4,1 4)),((1 7,2 7,2 6,1 6,1 7)),((0 8,0 9,1 9,1 8,1 7,0 7,0 8)))"
-};
-
-static std::string case_67_multi[2] =
-{
- "MULTIPOLYGON(((1 2,1 3,2 3,2 2,1 2)),((2 1,2 2,3 2,3 1,2 1)))",
- "MULTIPOLYGON(((1 1,1 2,3 2,3 1,1 1)))"
-};
-
-static std::string case_68_multi[2] =
-{
- "MULTIPOLYGON(((2 1,2 2,4 2,4 1,2 1)),((4 2,4 3,5 3,5 2,4 2)))",
- "MULTIPOLYGON(((1 2,1 3,2 3,2 2,1 2)),((2 1,2 2,3 2,3 1,2 1)),((3 2,3 3,5 3,5 2,3 2)))"
-};
-
-static std::string case_69_multi[2] =
-{
- "MULTIPOLYGON(((1 1,1 2,2 2,2 1,1 1)),((3 2,3 3,4 3,4 2,3 2)))",
- "MULTIPOLYGON(((2 0,2 1,3 1,3 0,2 0)),((1 1,1 3,2 3,2 1,1 1)),((2 3,2 4,3 4,3 3,2 3)))"
-};
-
-static std::string case_71_multi[2] =
-{
- "MULTIPOLYGON(((0 0,0 3,1 3,1 1,3 1,3 2,4 2,4 0,0 0)),((2 2,2 3,3 3,3 2,2 2)))",
- "MULTIPOLYGON(((0 2,0 3,3 3,3 2,0 2)))"
-};
-
-static std::string case_72_multi[2] =
-{
- // cluster with ii, done by both traverse and assemble
- "MULTIPOLYGON(((0 3,4 4,3 0,3 3,0 3)),((3 3,2 1,1 2,3 3)))",
- "MULTIPOLYGON(((0 0,1 4,3 3,4 1,0 0)))"
-};
-
-static std::string case_73_multi[2] =
-{
- "MULTIPOLYGON(((2 2,2 3,3 3,3 2,2 2)),((1 1,1 2,2 2,2 1,1 1)))",
- "MULTIPOLYGON(((1 1,1 2,2 2,2 3,3 3,3 1,1 1)))"
-};
-
-static std::string case_74_multi[2] =
-{
- "MULTIPOLYGON(((3 0,2 0,2 1,3 1,3 3,1 3,1 2,2 2,2 1,0 1,0 5,4 5,4 0,3 0)))",
- "MULTIPOLYGON(((0 2,0 3,1 3,1 1,2 1,2 0,0 0,0 2)),((2 3,1 3,1 4,2 4,2 3)))"
-};
-
-static std::string case_75_multi[2] =
-{
- // cc/uu turns on all corners of second box
- "MULTIPOLYGON(((1 1,1 2,2 2,2 1,1 1)),((1 3,1 4,2 4,2 3,1 3)),((2 2,2 3,3 3,3 2,2 2)),((3 1,3 2,4 2,4 1,3 1)),((3 3,3 4,4 4,4 3,3 3)))",
- "MULTIPOLYGON(((2 2,2 3,3 3,3 2,2 2)))"
-};
-
-static std::string case_76_multi[2] =
-{
- // cc/uu turns on all corners of second box, might generate TWO OVERLAPPING union polygons!
- // therefore, don't follow uu.
- "MULTIPOLYGON(((1 0,1 1,2 1,2 0,1 0)),((3 2,4 2,4 1,3 1,3 2)),((2 2,2 3,3 3,3 2,2 2)),((2 3,1 3,1 4,2 4,2 3)),((3 3,3 4,4 4,4 3,3 3)))",
- "MULTIPOLYGON(((0 2,0 3,1 3,1 2,2 2,2 0,1 0,1 1,0 1,0 2)),((2 2,2 3,3 3,3 2,2 2)))"
-};
-
-static std::string case_77_multi[2] =
-{
- // with a point on interior-ring-border of enclosing
- // -> went wrong in the assemble phase for intersection (traversal is OK)
- // -> fixed
- "MULTIPOLYGON(((3 3,3 4,4 4,4 3,3 3)),((5 3,5 4,4 4,4 5,3 5,3 6,5 6,5 5,7 5,7 6,8 6,8 5,9 5,9 2,8 2,8 1,7 1,7 2,5 2,5 3),(6 3,8 3,8 4,6 4,6 3)))",
- "MULTIPOLYGON(((6 3,6 4,7 4,7 3,6 3)),((2 3,1 3,1 4,3 4,3 5,4 5,4 6,5 6,5 7,9 7,9 4,7 4,7 5,8 5,8 6,7 6,7 5,6 5,6 4,4 4,4 3,3 3,3 2,2 2,2 3)),((5 2,4 2,4 3,6 3,6 2,5 2)),((7 2,7 3,8 3,8 2,8 1,7 1,7 2)))"
-};
-
-static std::string case_78_multi[2] =
-{
- "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(2 2,4 2,4 3,2 3,2 2)))",
- "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(3 2,4 2,4 3,3 3,3 2),(1 1,2 1,2 2,1 2,1 1)))"
-
-};
-
-static std::string case_80_multi[2] =
-{
- // Many ux-clusters -> needs correct cluster-sorting
- // Fixed now
- "MULTIPOLYGON(((3 1,3 2,4 2,3 1)),((1 5,0 4,0 5,1 6,1 5)),((3 3,4 3,3 2,2 2,2 3,3 3)),((4 5,5 6,5 5,4 5)),((4 2,4 3,5 3,4 2)),((2.5 5.5,3 5,2 5,2 7,3 6,2.5 5.5)),((1 6,0 6,0 7,1 7,2 6,1 6)))",
- "MULTIPOLYGON(((3 5,3 6,4 6,4 5,3 5)),((4 4,5 5,5 4,4 4)),((3 3,4 4,4 3,3 3)),((1 5,1 6,2 6,2 5,1 5)),((0 6,1 7,1 6,0 6)),((1 4,1 3,0 3,0 4,1 4)),((3 5,4 4,3 4,3 3,2 3,2 5,3 5)))"
-};
-
-static std::string case_81_multi[2] =
-{
- "MULTIPOLYGON(((1 1,2 2,2 1,1 1)),((2 2,2 3,3 2,2 2)),((3 1,4 2,4 1,3 1)))",
- "MULTIPOLYGON(((2 1,2 2,3 3,3 2,4 2,3 1,2 1)))"
-};
-
-static std::string case_82_multi[2] =
-{
- "MULTIPOLYGON(((4 0,5 1,5 0,4 0)),((2 1,3 2,3 1,2 1)),((3 0,4 1,4 0,3 0)),((1 0,1 1,2 1,2 0,1 0)))",
- "MULTIPOLYGON(((3 2,4 3,4 2,3 2)),((3 1,3 2,4 1,3 1)),((0 0,1 1,1 0,0 0)),((5 1,5 0,4 0,4 1,5 1)))"
-};
-
-static std::string case_83_multi[2] =
-{
- // iu/iu
- "MULTIPOLYGON(((1 0,1 1,2 1,1 0)),((0 1,0 4,1 4,1 1,0 1)),((2 1,2 2,3 2,3 1,2 1)),((2 3,3 4,3 3,2 3)))",
- "MULTIPOLYGON(((1 0,2 1,2 0,1 0)),((0 3,1 4,1 3,0 3)),((2 3,2 4,3 3,2 3)),((1 3,2 3,2 2,0 2,1 3)))"
-};
-
-static std::string case_84_multi[2] =
-{
- // iu/ux
- "MULTIPOLYGON(((2 2,3 3,3 2,2 2)),((2 1,2 2,3 1,2 1)),((2 3,3 4,3 3,2 3)),((1 3,2 4,2 2,1 2,1 3)))",
- "MULTIPOLYGON(((2 3,3 3,3 1,2 1,2 2,1 2,1 3,2 3)))"
-};
-
-static std::string case_85_multi[2] =
-{
- // iu/ux (and ux/ux)
- "MULTIPOLYGON(((0 1,0 2,1 2,0 1)),((1 1,1 2,2 1,1 1)),((0 3,1 3,0 2,0 3)))",
- "MULTIPOLYGON(((1 3,2 3,2 1,1 1,1 2,0 2,1 3)))"
-};
-
-static std::string case_86_multi[2] =
-{
- // iu/ux
- "MULTIPOLYGON(((4 2,4 3,5 3,4 2)),((5 2,6 3,6 2,5 2)),((5 1,4 1,4 2,5 2,6 1,5 1)))",
- "MULTIPOLYGON(((5 1,5 2,6 2,6 1,5 1)),((4 2,5 3,5 2,4 2)),((3 2,4 3,4 2,3 2)))"
-};
-
-static std::string case_87_multi[2] =
-{
- // iu/ux where iu crosses, no touch
- "MULTIPOLYGON(((5 0,5 1,6 0,5 0)),((6 2,7 3,7 2,6 2)),((5 1,5 3,6 3,6 1,5 1)))",
- "MULTIPOLYGON(((5 1,5 2,7 2,7 1,6 1,6 0,5 0,5 1)),((4 3,5 3,5 2,3 2,4 3)))"
-};
-
-
-static std::string case_88_multi[2] =
-{
- "MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((1 1,1 2,2 1,1 1)),((0 2,0 3,1 3,2 3,2 2,1 2,0 1,0 2)))",
- "MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((0 1,1 2,1 1,0 1)),((0 2,0 3,1 3,1 2,0 2)))"
-};
-
-static std::string case_89_multi[2] =
-{
- // Extract from rec.boxes_3
- "MULTIPOLYGON(((8 1,7 1,8 2,8 3,9 4,9 2,8.5 1.5,9 1,8 0,8 1)),((9 1,9 2,10 2,10 1,9 0,9 1)))",
- "MULTIPOLYGON(((8 3,9 4,9 3,8 3)),((7 0,7 1,8 1,8 0,7 0)),((9 2,9 1,8 1,8 3,8.5 2.5,9 3,9 2)))"
-};
-
-static std::string case_90_multi[2] =
-{
- // iu/iu for Union; see ppt
- "MULTIPOLYGON(((1 8,0 8,0 10,1 10,1 9,2 8,2 7,1 7,1 8)),((2 9,2 10,4 10,4 9,3 9,3 8,2 8,2 9)))",
- "MULTIPOLYGON(((2 8,1 8,1 9,2 9,2 10,3 10,3 8,2 8)),((0 10,2 10,0 8,0 10)))"
-};
-
-static std::string case_91_multi[2] =
-{
- // iu/xi for Intersection
- "MULTIPOLYGON(((3 3,3 4,4 4,3 3)),((2 2,1 2,1 4,2 4,2 3,3 3,2 2)))",
- "MULTIPOLYGON(((2 2,2 3,3 2,2 2)),((2 3,1 3,1 4,1.5 3.5,2 4,2.5 3.5,3 4,3 3,2 3)))"
-};
-
-static std::string case_92_multi[2] =
-{
- // iu/iu all aligned (for union)
- "MULTIPOLYGON(((7 2,7 3,8 2,7 2)),((8 4,9 5,9 4,8 4)),((8 2,8 3,9 2,8 2)),((7 3,7 4,8 4,8 3,7 3)),((9 3,9 4,10 4,10 3,9 3)))",
- "MULTIPOLYGON(((9 2,8 2,8 3,9 3,10 2,9 2)),((7 5,8 5,9 6,9 4,8 4,7 3,6 3,6 4,6.5 3.5,7 4,6 4,7 5)))"
-};
-
-static std::string case_93_multi[2] =
-{
- // iu/xi for intersection
- "MULTIPOLYGON(((6 2,7 2,7 1,5 1,6 2)),((7 3,8 3,7.5 2.5,8 2,7 2,7 3)))",
- "MULTIPOLYGON(((7 1,6 0,6 2,7 3,7 2,8 3,8 2,7 1)))"
-};
-
-
-static std::string case_94_multi[2] =
-{
- // iu/iu for union
- "MULTIPOLYGON(((9 2,9 3,10 3,10 2,9 2)),((7 3,8 4,9 3,8 3,9 2,7 2,7 3)),((8 6,9 5,9 4,8 4,8 6)))",
- "MULTIPOLYGON(((6 2,6 3,7 3,8 2,6 2)),((9 3,10 3,9 2,9 1,8 0,7 0,8 1,8 3,8.5 2.5,9 3)),((7 4,7 5,8 5,9 6,9 4,8 4,8 3,7 3,7 4)))"
-};
-
-static std::string case_95_multi[2] =
-{
- // iu/iu for union
- "MULTIPOLYGON(((0 8,1 8,1 7,0 7,0 8)),((2 8,2 9,2.5 8.5,3 9,3 7,2 7,2 8)),((1 9,1 10,2 9,1 8,1 9)))",
- "MULTIPOLYGON(((1 7,0 7,0 8,1 8,2 7,1 7)),((2 9,1 9,1 10,2 10,3 9,4 9,4 8,2 8,2 9)))"
-};
-
-static std::string case_96_multi[2] =
-{
- // iu/iu all collinear, for intersection/union
- "MULTIPOLYGON(((8 2,9 3,9 2,8 2)),((8 1,9 2,9 1,10 1,10 0,8 0,8 1)))",
- "MULTIPOLYGON(((9 0,9 1,10 0,9 0)),((8 1,8 2,9 2,9 1,8 1)))"
-};
-
-static std::string case_97_multi[2] =
-{
- // ux/ux for union
- "MULTIPOLYGON(((4 4,4 5,4.5 4.5,5 5,6 5,5 4,5 3,4 3,4 4)))",
- "MULTIPOLYGON(((5 3,5 4,6 3,5 3)),((6 5,7 5,6 4,5 4,6 5)))"
-};
-
-
-static std::string case_98_multi[2] =
-{
- // ii/iu for intersection, solved by discarding iu (ordering not possible)
- "MULTIPOLYGON(((2 0,3 1,3 0,2 0)),((2 2,2 3,1 3,1 4,2 4,3 3,3 4,5 2,4 2,4 1,3 1,3 2,2.5 1.5,3 1,2 1,2 2)))",
- "MULTIPOLYGON(((4 2,4 3,5 2,4 2)),((1 0,0 0,0 2,4 2,4 1,2 1,2 0,1 0)),((3 3,4 4,4 3,3 2,3 3)))"
-};
-
-static std::string case_99_multi[2] =
-{
- // iu/iu for intersection
- "MULTIPOLYGON(((1 0,2 1,2 0,1 0)),((1 2,2 2,1.5 1.5,2 1,1 1,1 0,0 0,0 1,1 2)))",
- "MULTIPOLYGON(((1 1,2 0,0 0,1 1)),((1 1,0 1,0 2,1 2,2 3,2 2,1 1)))"
-};
-
-static std::string case_100_multi[2] =
-{
- // for intersection
- "MULTIPOLYGON(((0 0,0 1,1 0,0 0)),((2 2,2 1,0 1,0 2,1 2,2 3,2 2)))",
- "MULTIPOLYGON(((1 1,1 2,2 2,2 1,1 1)),((1 2,0 1,0 3,1 4,1 2)))"
-};
-
-static std::string case_101_multi[2] =
-{
- // interior ring / union
- "MULTIPOLYGON(((7 2,7 3,8 2,7 2)),((9 3,9 4,10 3,9 3)),((10 1,10 0,8 0,8 1,9 2,10 2,10 1)),((9 3,9 2,8 2,8 3,7 3,7 4,8 4,9 3)),((8 4,8 7,9 6,9 4,8 4)))",
- "MULTIPOLYGON(((6 1,5 1,5 2,6 3,6 4,7 5,6 5,7 6,8 6,8 5,9 5,8 4,9 4,9 5,10 5,10 1,8 1,8 3,7 3,7 2,6 2,7 1,8 1,7 0,5 0,5 1,5.5 0.5,6 1),(8.5 2.5,9 2,9 3,8.5 2.5)))"
-};
-
-static std::string case_102_multi[2] =
-{
- // interior ring 'fit' / union
- "MULTIPOLYGON(((0 2,0 7,5 7,5 2,0 2),(4 3,4 6,1 6,2 5,1 5,1 4,3 4,4 3)),((3 4,3 5,4 5,3 4)),((2 5,3 6,3 5,2 4,2 5)))",
- "MULTIPOLYGON(((0 2,0 7,5 7,5 2,0 2),(2 4,3 5,2 5,2 4),(4 4,3 4,3 3,4 4),(4 5,4 6,3 6,4 5)))"
-};
-
-static std::string case_103_multi[2] =
-{
- // interior ring 'fit' (ix) / union / assemble
- "MULTIPOLYGON(((0 0,0 5,5 5,5 0,2 0,2 1,3 1,3 2,2 2,2 3,1 2,2 2,2 1,1 0,0 0)))",
- "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(2 1,2 2,1 1,2 1)))"
-};
-
-static std::string case_104_multi[2] =
-{
- // interior ring 'fit' (ii) / union / assemble
- "MULTIPOLYGON(((1 0,1 1,0 1,0 5,5 5,5 0,2 0,2 1,1 0),(2 2,3 3,2 3,2 2)))",
- "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(1 1,3 1,3 2,1 2,1 1)))"
-};
-
-static std::string case_105_multi[2] =
-{
- // interior ring 'fit' () / union / assemble
- "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(2 2,3 2,3 3,1 3,2 2)))",
- "MULTIPOLYGON(((0 0,0 5,5 5,5 0,0 0),(1 1,2 1,2 2,1 1),(2 1,3 1,3 2,2 1),(1 3,3 3,3 4,2 3,2 4,1 4,1 3)))"
-};
-
-static std::string case_106_multi[2] =
-{
- // interior ring 'fit' () / union / assemble
- "MULTIPOLYGON(((0 0,0 3,1 2,1 3,2 3,2 1,3 2,2 2,3 3,2 3,3 4,1 4,1 3,0 3,0 5,5 5,5 0,0 0)))",
- "MULTIPOLYGON(((0 0,0 5,1 5,1 4,2 4,2 5,3 5,3 3,4 4,5 4,5 0,2 0,3 1,2 1,2 3,1 3,2 2,1.5 1.5,2 1,1 1,0 0)),((1 0,2 1,2 0,1 0)))"
-};
-
-static std::string case_107_multi[2] =
-{
- // For CCW polygon reports a iu/iu problem.
- "MULTIPOLYGON(((6 8,7 9,7 7,8 7,7 6,6 6,6 8)),((6.5 9.5,7 10,7 9,6 9,6 10,6.5 9.5)))",
- "MULTIPOLYGON(((5 7,6 8,6 10,7 9,8 10,8 8,7 8,6 7,6 6,5 7)))"
-};
-
-
-static std::string case_recursive_boxes_1[2] =
-{
- // == 70
- // Used in blog. KEEP
- "MULTIPOLYGON(((1 0,0 0,0 1,1 1,1 2,0 2,0 4,2 4,2 5,3 5,3 6,1 6,1 5,0 5,0 10,9 10,9 9,7 9,7 8,6 8,6 7,8 7,8 6,9 6,9 4,8 4,8 5,7 5,7 6,6 6,6 5,5 5,5 4,4 4,4 3,5 3,5 2,7 2,7 3,6 3,6 4,8 4,8 3,10 3,10 0,6 0,6 1,5 1,5 0,1 0),(4 7,4 9,3 9,3 7,4 7),(8 1,9 1,9 2,8 2,8 1)),((10 7,10 6,9 6,9 7,8 7,8 8,9 8,9 9,10 9,10 7)))",
- "MULTIPOLYGON(((1 0,0 0,0 7,2 7,2 6,5 6,5 5,4 5,4 4,5 4,5 3,7 3,7 2,6 2,6 0,1 0),(2 1,2 2,3 2,3 3,1 3,1 1,2 1)),((7 0,7 2,10 2,10 0,9 0,9 1,8 1,8 0,7 0)),((6 4,6 6,5 6,5 7,6 7,6 8,5 8,5 7,3 7,3 9,2 9,2 8,1 8,1 10,4 10,4 9,6 9,6 10,10 10,10 9,9 9,9 8,10 8,10 6,9 6,9 5,10 5,10 3,7 3,7 4,6 4),(7 7,7 6,8 6,8 7,7 7)))"
-};
-
-static std::string case_recursive_boxes_2[2] =
-{
- // Traversal problem; Many ii-cases -> formerly caused "Endless loop"
- // So it appears that there might be more decisions than intersection points
- "MULTIPOLYGON(((1 0,0 0,0 4,1 4,1 5,0 5,0 10,3 10,3 9,4 9,4 10,6 10,6 9,5 9,5 8,6 8,6 9,7 9,7 10,10 10,10 0,1 0),(7 6,8 6,8 7,9 7,9 8,8 8,8 7,7 7,7 6),(9 1,9 2,8 2,8 1,9 1)))",
- "MULTIPOLYGON(((0 0,0 10,10 10,10 0,8 0,8 1,7 1,7 0,0 0),(7 3,6 3,6 2,7 2,7 3),(6 7,7 7,7 8,6 8,6 7)))"
-};
-
-
-static std::string case_recursive_boxes_3[2] =
-{
- // Previously a iu/ux problem causing union to fail.
- // For CCW polygon it also reports a iu/iu problem.
- // KEEP
- "MULTIPOLYGON(((8 3,9 4,9 3,8 3)),((5 9,5 10,6 10,5 9)),((2 0,2 1,3 0,2 0)),((2 5,2 6,3 6,3 5,2 5)),((2 2,1 2,1 3,2 3,3 2,3 1,2 1,2 2)),((6 8,7 9,7 7,8 7,7 6,6 6,6 8)),((4 6,5 7,5 6,4 6)),((4 8,4 9,5 9,5 8,4 8)),((0 3,1 4,1 3,0 3)),((8 7,9 8,9 7,8 7)),((9 6,9 7,10 7,9 6)),((7 0,8 1,8 0,7 0)),((0 4,0 5,1 5,1 4,0 4)),((4 2,5 3,5 2,4 1,4 2)),((4 10,4 9,2 9,3 10,4 10)),((5 2,6 3,7 3,7 2,6 2,6 1,5 0,5 2)),((5 3,4 3,4 4,2 4,4 6,4 5,4.5 4.5,6 6,6 5,7 4,5 4,5 3)),((10 2,9 1,9 3,10 2)),((8 4,7 4,8 5,7 5,7 6,9 6,9 5,10 5,10 4,8 4)),((1 7,0 7,0 8,1 8,1 7)),((1 10,2 10,1 9,0 9,0 10,1 10)),((6.5 9.5,7 10,7 9,6 9,6 10,6.5 9.5)),((8 8,8 9,10 9,9 8,8 8)))",
- "MULTIPOLYGON(((0 7,0 8,1 8,1 7,0 7)),((5 3,4 3,4 4,6 4,6 3,7 3,6 2,5 2,5 3)),((8 2,8 3,9 2,8 2)),((1 1,2 2,2 1,1 1)),((2 1,3 1,2 0,1 0,2 1)),((2 3,3 4,3 3,2 3)),((1 9,2 8,1 8,1 9)),((2 10,2 9,1 9,1 10,2 10)),((9 7,9 8,10 8,10 7,9 7)),((6 0,6 1,7 1,7 0,6 0)),((8 0,9 1,9 0,8 0)),((1 6,1 5,0 5,1 6)),((0 2,1 1,0 1,0 2)),((1 3,2 3,2 2,1 2,1 3)),((5 1,5 0,4 0,4 1,3 1,4 2,5 2,6 1,5 1)),((1 3,0 3,0 4,1 4,1 3)),((3 6,4 5,2 5,3 6)),((9 2,10 2,10 1,9 1,9 2)),((7 5,6 4,6 5,7 6,8 6,8 5,7 5)),((7 4,8 5,8.5 4.5,9 5,9 4,8 4,8.5 3.5,9 4,10 3,7 3,7 4)),((1 6,1 7,3 7,3 8,4 7,5 7,6 8,6 10,7 9,8 10,9 10,9 9,8 9,8 8,7 8,6 7,6 6,1 6)))"
-};
-
-
-static std::string case_recursive_boxes_4[2] =
-{
- // Occurred after refactoring assemble
- "MULTIPOLYGON(((9 3,10 4,10 3,9 3)),((9 9,10 10,10 9,9 9)),((0 1,0 3,1 4,0 4,0 5,1 6,0 6,0 8,1 9,1 8,2 9,2 7,1.5 6.5,2.5 5.5,3 6,3 5,4 6,2 6,2 7,3 8,2 8,3 9,0 9,0 10,6 10,5.5 9.5,6 9,6 10,7 10,7.5 9.5,8 10,8 9,7 9,7 8,6 8,6.5 7.5,7 8,8 8,8 9,9 9,9.5 8.5,10 9,10 8,9.5 7.5,10 7,10 5,8 5,8 4,7 3,7 2,8 3,8 4,9 5,9 3,10 2,10 1,8 1,8.5 0.5,9 1,10 0,4 0,4 1,3 1,3 0,1 0,1 1,0 0,0 1),(4 2,4.5 1.5,5 2,5 4,4.5 3.5,5 3,4 3,4 2),(3 3,4 4,2 4,2.5 3.5,3 4,3 3),(6 4,6.5 3.5,7 4,6 4),(5 7,5 9,4 9,4 8,5 7)))",
- "MULTIPOLYGON(((1 0,2 1,2 0,1 0)),((7 9,7 10,8 10,7 9)),((1 0,0 0,0 3,1 3,2 2,2 3,1 3,1 4,2 4,2 5,1 4,0 4,0 8,1 7,1 6,2 7,1 7,1 9,0 9,0 10,7 10,6 9,6.5 8.5,7 9,8 9,9 8,8 8,9 7,9 6,10 7,10 5,9 5,9 4,10 5,10 0,7 0,8 1,7 1,6 0,3 0,3 1,1 1,1 0),(5 1,5.5 0.5,6 1,6 2,6.5 1.5,7 2,8 2,8 4,7 3,6 3,6 2,5 2,6 1,5 1),(4 4,5 4,5 5,4 4),(4 6,4 7,3 7,2 6,3 6,3 7,4 6),(6 5,6.5 4.5,7 5,6 5,7 6,7 7,6 7,6 5),(3.5 7.5,4 8,4 9,3 8,3.5 7.5)),((9 8,9 9,8 9,9 10,10 10,10 8,9 8)))"
-};
-
-static std::string pie_21_7_21_0_3[2] =
-{
- "MULTIPOLYGON(((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,3828 2144,3690 1812,3472 1527,3187 1309,2855 1171,2499 1125,2144 1171,1812 1309,1527 1527,1309 1812,1171 2144,1125 2499,1171 2855,1309 3187,2500 2500)))",
- "MULTIPOLYGON(((2500 2500,1704 3295,1937 3474,2208 3586,2499 3625,2791 3586,3062 3474,3295 3295,2500 2500)),((2500 2500,3586 2791,3625 2500,3586 2208,2500 2500)))"
-};
-
-static std::string pie_23_19_5_0_2[2] =
-{
- "MULTIPOLYGON(((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,3828 2144,3690 1812,3472 1527,3187 1309,2855 1171,2499 1125,2144 1171,1812 1309,1527 1527,1309 1812,1171 2144,1125 2499,1171 2855,1309 3187,1527 3472,1812 3690,2500 2500)))",
- "MULTIPOLYGON(((2500 2500,3586 2791,3625 2500,3586 2208,3474 1937,3295 1704,3062 1525,2791 1413,2499 1375,2208 1413,1937 1525,1704 1704,1525 1937,1413 2208,1375 2500,1413 2791,1525 3062,1704 3295,1937 3474,2208 3586,2500 2500)),((2500 2500,2791 3586,3062 3474,2500 2500)))"
-};
-
-static std::string pie_7_14_5_0_7[2] =
-{
- "MULTIPOLYGON(((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,2500 2500)))",
- "MULTIPOLYGON(((2500 2500,3586 2791,3625 2500,3586 2208,3474 1937,3295 1704,3062 1525,2791 1413,2499 1375,2208 1413,1937 1525,1704 1704,1525 1937,1413 2208,1375 2500,2500 2500)),((2500 2500,1525 3062,1704 3295,1937 3474,2208 3586,2499 3625,2791 3586,3062 3474,2500 2500)))"
-};
-
-static std::string pie_16_16_9_0_2[2] =
-{
- "MULTIPOLYGON(((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,3828 2144,3690 1812,3472 1527,3187 1309,2855 1171,2499 1125,2144 1171,1812 1309,1527 1527,2500 2500)))",
- "MULTIPOLYGON(((2500 2500,3295 1704,3062 1525,2791 1413,2499 1375,2208 1413,1937 1525,1704 1704,1525 1937,1413 2208,1375 2500,1413 2791,1525 3062,1704 3295,1937 3474,2208 3586,2499 3625,2500 2500)),((2500 2500,3062 3474,3295 3295,2500 2500)))"
-};
-
-static std::string pie_7_2_1_0_15[2] =
-{
- "MULTIPOLYGON(((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,2500 2500)))",
- "MULTIPOLYGON(((2500 2500,2791 3586,3062 3474,2500 2500)),((2500 2500,3474 3062,3586 2791,3625 2500,3586 2208,3474 1937,3295 1704,3062 1525,2791 1413,2499 1375,2208 1413,1937 1525,1704 1704,1525 1937,1413 2208,1375 2500,2500 2500)))"
-};
-
-// Case, not literally on this list but derived, to mix polygon/multipolygon in call to difference
-static std::string ggl_list_20111025_vd[4] =
- {
- "POLYGON((0 0,0 4,4 0,0 0))",
- "POLYGON((10 0,10 5,15 0,10 0))",
- "MULTIPOLYGON(((0 0,0 4,4 0,0 0)))",
- "MULTIPOLYGON(((10 0,10 5,15 0,10 0)))"
- };
-
-// Same, mail with other case with text "Say the MP is the 2 squares below and P is the blue-ish rectangle."
-static std::string ggl_list_20111025_vd_2[2] =
- {
- "POLYGON((5 0,5 4,8 4,8 0,5 0))",
- "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)))"
- };
-
-// Mail of volker, about another problem, but this specific example is causing two-point inner rings polygons which should be discarded
-// (condition of num_points in detail/overlay/convert_ring.hpp)
-static std::string ggl_list_20120221_volker[2] =
- {
- "MULTIPOLYGON(((1032 2130,1032 1764,2052 2712,1032 2130)),((3234 2580,2558 2690,3234 2532,3234 2580)),((2558 2690,2136 2790,2052 2712,2136 2760,2558 2690)))",
- "MULTIPOLYGON(((3232 2532.469945355191,2136 2790,1032 1764,1032 1458,1032 1212,2136 2328,3232 2220.196721311475,3232 1056,1031 1056,1031 2856,3232 2856,3232 2532.469945355191),(3232 2412.426229508197,2136 2646,3232 2412.426229508197)))"
- };
-
-static std::string ggl_list_20140212_sybren[2] =
- {
- "MULTIPOLYGON(((0.494062 0.659354,0.471383 0.64654,0.446639 0.616561,0.47291 0.61171,0.495396 0.625263,0.494964 0.679709,0.494062 0.659354)))",
- "MULTIPOLYGON(((0.4951091661995328 0.6614133543986973,0.495396 0.625263,0.50092 0.6492750000000001,0.494964 0.679709,0.477258 0.698703,0.4951091661995328 0.6614133543986973)),((0.452167 0.706562,0.433379 0.696888,0.442673 0.65792,0.464729 0.671387,0.452167 0.706562)))"
- };
-
-static std::string ticket_9081[2] =
- {
- "MULTIPOLYGON(((0.5489109414010371 0.5774835110050927,0.4099611282054447 0.4644351568071598,0.4294011278595494 0.4843224236729239,0.4205359995313906 0.5115225580860201,0.4441572412013468 0.5184999851878852,0.5489109414010371 0.5774835110050927)),((0.562085028126843 0.5882018328808966,0.5644349663154944 0.591180348361206,0.568218114394707 0.5970364466647042,0.5838690879677763 0.6212632646137447,0.5873787029417971 0.6412877041753083,0.468699602592386 0.5866280231830688,0.4171010902425981 0.5220616039851281,0.4059124592966251 0.5563907478354578,0.3909547828925878 0.6022841397455458,0.520859401226844 0.9508041627246925,0.8595233008819849 0.8301950132755517,0.562085028126843 0.5882018328808966)))",
- "MULTIPOLYGON(((0.2099392122251989 0.492066865490789,0.1124301889095737 0.5124668111209448,0.3306914939102383 0.6126684490171914,0.2099392122251989 0.492066865490789)),((0.5885369465145437 0.6478961722242873,0.5342320718598281 0.6686303269145104,0.5619623880692838 0.7033299168703926,0.5945761233023867 0.6823532655194001,0.5885369465145437 0.6478961722242873)),((0.5570738195183501 0.6001870087680015,0.5429714753344335 0.6231021858940831,0.5880357506342242 0.6450365518134291,0.5838690879677763 0.6212632646137447,0.568218114394707 0.5970364466647042,0.5570738195183501 0.6001870087680015)),((0.5498478321815098 0.5029279381860542,0.608691671498764 0.5163121433149205,0.5636607291345047 0.5894838094559455,0.8595233008819849 0.8301950132755517,0.8285440738598029 0.8412277162756114,0.9591357158116398 0.9011810663167211,0.8572649311807611 0.3566393017365032,0.5965816668471951 0.4111770689940296,0.5498478321815098 0.5029279381860542)),((0.3984249865018206 0.4526335964808558,0.3621206996557855 0.4602288471829723,0.4183516736935784 0.4730187483833363,0.4099611282054451 0.4644351568071601,0.3984249865018206 0.4526335964808558)))"
- };
-
-
-#endif // BOOST_GEOMETRY_TEST_MULTI_OVERLAY_CASES_HPP
diff --git a/libs/geometry/test/multi/algorithms/overlay/multi_overlay_common.hpp b/libs/geometry/test/multi/algorithms/overlay/multi_overlay_common.hpp
deleted file mode 100644
index 6a49c300d..000000000
--- a/libs/geometry/test/multi/algorithms/overlay/multi_overlay_common.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-#ifndef GEOMETRY_TEST_MULTI_OVERLAY_COMMON_HPP
-#define GEOMETRY_TEST_MULTI_OVERLAY_COMMON_HPP
-
-
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <boost/geometry/multi/io/wkt/read.hpp>
-//#include <boost/geometry/multi/io/svg/write_svg.hpp>
-
-
-
-template <typename P, typename Functor, typename T>
-void test_all(std::vector<T> const& expected, double precision = 0.01)
-{
- typename boost::range_const_iterator<std::vector<T> >::type iterator
- = boost::begin(expected);
-
- typedef bg::model::multi_polygon<bg::model::polygon<P> > mp;
- typedef bg::model::box<P> box;
-
- BOOST_ASSERT(iterator != boost::end(expected));
- test_overlay<mp, mp, Functor>("1", *iterator,
- "MULTIPOLYGON(((0 1,2 5,5 3,0 1)),((1 1,5 2,5 0,1 1)))",
- "MULTIPOLYGON(((3 0,0 3,4 5,3 0)))", precision);
- iterator++;
-}
-
-
-#endif // GEOMETRY_TEST_MULTI_OVERLAY_COMMON_HPP
diff --git a/libs/geometry/test/multi/algorithms/overlay/multi_traverse.cpp b/libs/geometry/test/multi/algorithms/overlay/multi_traverse.cpp
deleted file mode 100644
index 7cab06c96..000000000
--- a/libs/geometry/test/multi/algorithms/overlay/multi_traverse.cpp
+++ /dev/null
@@ -1,448 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-//#define BOOST_GEOMETRY_DEBUG_ENRICH
-//#define BOOST_GEOMETRY_DEBUG_RELATIVE_ORDER
-
-// Include the single-geometry version
-#define BOOST_GEOMETRY_TEST_MULTI
-#include <algorithms/overlay/traverse.cpp>
-
-
-
-#include <boost/geometry/multi/core/closure.hpp>
-#include <boost/geometry/multi/core/geometry_id.hpp>
-#include <boost/geometry/multi/core/point_order.hpp>
-#include <boost/geometry/multi/core/ring_type.hpp>
-
-#include <boost/geometry/multi/algorithms/correct.hpp>
-#include <boost/geometry/multi/algorithms/envelope.hpp>
-#include <boost/geometry/multi/algorithms/num_points.hpp>
-#include <boost/geometry/multi/algorithms/detail/overlay/copy_segments.hpp>
-#include <boost/geometry/multi/algorithms/detail/overlay/copy_segment_point.hpp>
-#include <boost/geometry/multi/algorithms/detail/sections/range_by_section.hpp>
-#include <boost/geometry/multi/algorithms/detail/sections/sectionalize.hpp>
-
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <boost/geometry/multi/views/detail/range_type.hpp>
-
-#include <boost/geometry/multi/io/wkt/read.hpp>
-
-
-#include "multi_overlay_cases.hpp"
-
-
-
-template <typename MultiPolygon, bool Reverse>
-void test_geometries()
-{
- namespace ov = bg::detail::overlay;
-
- typedef test_traverse
- <
- MultiPolygon, MultiPolygon,
- ov::operation_intersection, Reverse, Reverse
- > test_traverse_intersection;
- typedef test_traverse
- <
- MultiPolygon, MultiPolygon,
- ov::operation_union, Reverse, Reverse
- > test_traverse_union;
-
- // Intersections:
- test_traverse_intersection::apply
- (
- "simplex", 2, 6.42,
- case_multi_simplex[0], case_multi_simplex[1]
- );
-
- test_traverse_intersection::apply
- (
- "case_65_multi", 1, 1,
- case_65_multi[0], case_65_multi[1]
- );
- test_traverse_intersection::apply
- (
- "case_66_multi", 1, 1,
- case_66_multi[0], case_66_multi[1]
- );
-
- test_traverse_intersection::apply
- (
- "case_67_multi", 1, 1,
- case_67_multi[0], case_67_multi[1]
- );
- test_traverse_intersection::apply
- (
- "case_69_multi", 1, 1,
- case_69_multi[0], case_69_multi[1]
- );
-
- test_traverse_intersection::apply
- (
- "case_71_multi", 2, 2,
- case_71_multi[0], case_71_multi[1]
- );
-
- // #72, note that it intersects into 2 shapes,
- // the third one is done by assemble (see intersection #72)
- test_traverse_intersection::apply
- (
- "case_72_multi", 2, 1.35,
- case_72_multi[0], case_72_multi[1]
- );
-
- test_traverse_intersection::apply
- (
- "case_73_multi", 2, 2,
- case_73_multi[0], case_73_multi[1]
- );
- test_traverse_intersection::apply
- (
- "case_74_multi", 2, 3,
- case_74_multi[0], case_74_multi[1]
- );
- test_traverse_intersection::apply
- (
- "case_75_multi", 1, 1,
- case_75_multi[0], case_75_multi[1]
- );
- test_traverse_intersection::apply
- (
- "case_77_multi", 5, 9,
- case_77_multi[0], case_77_multi[1]
- );
- test_traverse_intersection::apply
- (
- "case_78_multi", 2, 22, // Went from 3 to 2 by get_turns / partition
- case_78_multi[0], case_78_multi[1]
- );
-
- test_traverse_intersection::apply
- (
- "case_80_multi", 1, 0.5,
- case_80_multi[0], case_80_multi[1]
- );
- test_traverse_intersection::apply
- (
- "case_81_multi", 1, 0.25,
- case_81_multi[0], case_81_multi[1]
- );
- test_traverse_intersection::apply
- (
- "case_83_multi", 3, 1.25,
- case_83_multi[0], case_83_multi[1]
- );
-
- test_traverse_intersection::apply
- (
- "case_91_multi", 2, 1.0,
- case_91_multi[0], case_91_multi[1]
- );
- test_traverse_intersection::apply
- (
- "case_92_multi", 3, 1.5,
- case_92_multi[0], case_92_multi[1]
- );
- test_traverse_intersection::apply
- (
- "case_93_multi", 2, 1.25,
- case_93_multi[0], case_93_multi[1]
- );
- test_traverse_intersection::apply
- (
- "case_96_multi", 1, 0.5,
- case_96_multi[0], case_96_multi[1]
- );
- test_traverse_intersection::apply
- (
- "case_98_multi", 4, 3.0,
- case_98_multi[0], case_98_multi[1]
- );
-
- test_traverse_intersection::apply
- (
- "case_99_multi", 3, 1.75,
- case_99_multi[0], case_99_multi[1]
- );
- test_traverse_intersection::apply
- (
- "case_100_multi", 2, 1.5,
- case_100_multi[0], case_100_multi[1]
- );
-
-
- test_traverse_intersection::apply
- (
- "case_recursive_boxes_2", 1, 91,
- case_recursive_boxes_2[0], case_recursive_boxes_2[1]
- );
- test_traverse_intersection::apply
- (
- "case_107_multi", 2, 1.5,
- case_107_multi[0], case_107_multi[1]
- );
- test_traverse_intersection::apply
- (
- "case_recursive_boxes_3", 19, 12.5,
- case_recursive_boxes_3[0], case_recursive_boxes_3[1]
- );
-
- // Unions
-
-
- test_traverse_union::apply
- (
- "simplex", 1, 14.58,
- case_multi_simplex[0], case_multi_simplex[1]
- );
-
- test_traverse_union::apply
- (
- "case_61_multi", 1, 4,
- case_61_multi[0], case_61_multi[1]
- );
- test_traverse_union::apply
- (
- "case_62_multi", 1, 1 /*UU 2, 2 */,
- case_62_multi[0], case_62_multi[1]
- );
- test_traverse_union::apply
- (
- "case_63_multi", 1, 1 /*UU 2, 2 */,
- case_63_multi[0], case_63_multi[1]
- );
- test_traverse_union::apply
- (
- "case_64_multi", 1, 3,
- case_64_multi[0], case_64_multi[1]
- );
-
- test_traverse_union::apply
- (
- "case_66_multi", 1, 4 /*UU 3, 7 */,
- case_66_multi[0], case_66_multi[1]
- );
- test_traverse_union::apply
- (
- "case_68_multi", 1, 4 /*UU 2, 5 */,
- case_68_multi[0], case_68_multi[1]
- );
- // 71: single-polygon generates 2 shapes, multi-polygon
- // generates 1 shape, both are self-tangent and OK
- test_traverse_union::apply
- (
- "case_71_multi", 1, 9,
- case_71_multi[0], case_71_multi[1]
- );
-
- test_traverse_union::apply
- (
- "case_72_multi", 1, 10.65,
- case_72_multi[0], case_72_multi[1]
- );
-
- test_traverse_union::apply
- (
- "case_73_multi", 1, 3,
- case_73_multi[0], case_73_multi[1]
- );
- test_traverse_union::apply
- (
- "case_74_multi", 2, 17,
- case_74_multi[0], case_74_multi[1]
- );
- test_traverse_union::apply
- (
- "case_75_multi", 1, 1 /*UU 5, 5 */,
- case_75_multi[0], case_75_multi[1]
- );
- test_traverse_union::apply
- (
- "case_76_multi", 2, 5 /*UU 6, 6 */,
- case_76_multi[0], case_76_multi[1]
- );
-
- test_traverse_union::apply
- (
- "case_80_multi", 1, 9.25,
- case_80_multi[0], case_80_multi[1]
- );
- test_traverse_union::apply
- (
- "case_81_multi", 1, 3.25,
- case_81_multi[0], case_81_multi[1]
- );
- test_traverse_union::apply
- (
- "case_82_multi", 3, 4,
- case_82_multi[0], case_82_multi[1]
- );
- test_traverse_union::apply
- (
- "case_84_multi", 1, 4,
- case_84_multi[0], case_84_multi[1]
- );
- test_traverse_union::apply
- (
- "case_85_multi", 1, 3.5,
- case_85_multi[0], case_85_multi[1]
- );
- test_traverse_union::apply
- (
- "case_86_multi", 1, 4,
- case_86_multi[0], case_86_multi[1]
- );
- test_traverse_union::apply
- (
- "case_87_multi", 1, 6,
- case_87_multi[0], case_87_multi[1]
- );
- test_traverse_union::apply
- (
- "case_88_multi", 2, 4,
- case_88_multi[0], case_88_multi[1]
- );
- test_traverse_union::apply
- (
- "case_89_multi", 1, 6,
- case_89_multi[0], case_89_multi[1]
- );
- test_traverse_union::apply
- (
- "case_90_multi", 1, 7.5,
- case_90_multi[0], case_90_multi[1]
- );
- test_traverse_union::apply
- (
- "case_92_multi", 2, 6.25,
- case_92_multi[0], case_92_multi[1]
- );
- test_traverse_union::apply
- (
- "case_94_multi", 1, 10.0,
- case_94_multi[0], case_94_multi[1]
- );
- test_traverse_union::apply
- (
- "case_95_multi", 2, 6.5,
- case_95_multi[0], case_95_multi[1]
- );
- test_traverse_union::apply
- (
- "case_96_multi", 1, 3.5,
- case_96_multi[0], case_96_multi[1]
- );
- test_traverse_union::apply
- (
- "case_97_multi", 1, 3.75,
- case_97_multi[0], case_97_multi[1]
- );
- test_traverse_union::apply
- (
- "case_101_multi", 1, 22.25,
- case_101_multi[0], case_101_multi[1]
- );
- test_traverse_union::apply
- (
- "case_102_multi", 3, 24.25,
- case_102_multi[0], case_102_multi[1]
- );
- test_traverse_union::apply
- (
- "case_103_multi", 1, 25,
- case_103_multi[0], case_103_multi[1]
- );
- test_traverse_union::apply
- (
- "case_104_multi", 1, 25,
- case_104_multi[0], case_104_multi[1]
- );
- test_traverse_union::apply
- (
- "case_105_multi", 1, 25,
- case_105_multi[0], case_105_multi[1]
- );
- test_traverse_union::apply
- (
- "case_106_multi", 1, 25,
- case_106_multi[0], case_106_multi[1]
- );
-
-
- test_traverse_union::apply
- (
- "case_recursive_boxes_1", 2, 97,
- case_recursive_boxes_1[0], case_recursive_boxes_1[1]
- );
-
- test_traverse_union::apply
- (
- "case_recursive_boxes_3", 7, 49.5,
- case_recursive_boxes_3[0], case_recursive_boxes_3[1]
- );
-
- test_traverse_intersection::apply
- (
- "pie_21_7_21_0_3", 2, 818824.56678,
- pie_21_7_21_0_3[0], pie_21_7_21_0_3[1]
- );
-
- test_traverse_intersection::apply
- (
- "pie_23_19_5_0_2", 2, 2948602.3911823,
- pie_23_19_5_0_2[0], pie_23_19_5_0_2[1]
- );
- test_traverse_intersection::apply
- (
- "pie_7_14_5_0_7", 2, 490804.56678,
- pie_7_14_5_0_7[0], pie_7_14_5_0_7[1]
- );
- test_traverse_intersection::apply
- (
- "pie_16_16_9_0_2", 2, 1146795,
- pie_16_16_9_0_2[0], pie_16_16_9_0_2[1]
- );
- test_traverse_intersection::apply
- (
- "pie_7_2_1_0_15", 2, 490585.5,
- pie_7_2_1_0_15[0], pie_7_2_1_0_15[1]
- );
-
-}
-
-template <typename T>
-void test_all()
-{
- typedef bg::model::point<T, 2, bg::cs::cartesian> point_type;
-
- typedef bg::model::multi_polygon
- <
- bg::model::polygon<point_type>
- > multi_polygon;
-
- typedef bg::model::multi_polygon
- <
- bg::model::polygon<point_type, false>
- > multi_polygon_ccw;
-
- test_geometries<multi_polygon, false>();
- test_geometries<multi_polygon_ccw, true>();
-}
-
-
-int test_main(int, char* [])
-{
- test_all<double>();
-
- return 0;
-}
diff --git a/libs/geometry/test/multi/io/Jamfile.v2 b/libs/geometry/test/multi/io/Jamfile.v2
deleted file mode 100644
index 6985a7ab9..000000000
--- a/libs/geometry/test/multi/io/Jamfile.v2
+++ /dev/null
@@ -1,12 +0,0 @@
-# Boost.Geometry (aka GGL, Generic Geometry Library)
-#
-# Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-# Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-# Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-#
-# Use, modification and distribution is subject to the Boost Software License,
-# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-build-project wkt ;
-build-project dsv ;
diff --git a/libs/geometry/test/multi/io/dsv/Jamfile.v2 b/libs/geometry/test/multi/io/dsv/Jamfile.v2
deleted file mode 100644
index 1a855ae27..000000000
--- a/libs/geometry/test/multi/io/dsv/Jamfile.v2
+++ /dev/null
@@ -1,15 +0,0 @@
-# Boost.Geometry (aka GGL, Generic Geometry Library)
-#
-# Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-# Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-# Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-#
-# Use, modification and distribution is subject to the Boost Software License,
-# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-test-suite boost-geometry-multi-io-dsv
- :
- [ run multi_dsv.cpp ]
- ;
-
diff --git a/libs/geometry/test/multi/io/dsv/multi_dsv.cpp b/libs/geometry/test/multi/io/dsv/multi_dsv.cpp
deleted file mode 100644
index 0af8f10e9..000000000
--- a/libs/geometry/test/multi/io/dsv/multi_dsv.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-#include <sstream>
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/multi/io/dsv/write.hpp>
-#include <boost/geometry/multi/geometries/multi_geometries.hpp>
-#include <boost/geometry/multi/io/wkt/read.hpp>
-
-template <typename Geometry>
-void test_dsv(std::string const& wkt, std::string const& expected, bool json = false)
-{
- Geometry geometry;
- bg::read_wkt(wkt, geometry);
- std::ostringstream out;
- if (json)
- {
- out << bg::dsv(geometry, ", ", "[", "]", ", ", "[ ", " ]", ", ");
- }
- else
- {
- out << bg::dsv(geometry);
- }
- BOOST_CHECK_EQUAL(out.str(), expected);
-}
-
-
-template <typename T>
-void test_all()
-{
- using namespace boost::geometry;
- typedef model::point<T, 2, cs::cartesian> point_type;
- typedef model::multi_point<point_type> mpoint;
- typedef model::multi_linestring<model::linestring<point_type> > mline;
- typedef model::multi_polygon<model::polygon<point_type> > mpoly;
-
- test_dsv<mpoint>
- (
- "multipoint((1 2),(3 4))",
- "((1, 2), (3, 4))"
- );
- test_dsv<mline>
- (
- "multilinestring((1 1,2 2,3 3),(4 4,5 5,6 6))",
- "(((1, 1), (2, 2), (3, 3)), ((4, 4), (5, 5), (6, 6)))"
- );
- test_dsv<mpoly>
- (
- // Multi with 2 poly's, first has hole, second is triangle
- "multipolygon(((0 0,0 4,4 4,4 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((5 5,6 5,5 6,5 5)))",
- "((((0, 0), (0, 4), (4, 4), (4, 0), (0, 0)), ((1, 1), (1, 2), (2, 2), (2, 1), (1, 1))), (((5, 5), (6, 5), (5, 6), (5, 5))))"
- );
-
- // http://geojson.org/geojson-spec.html#id5
- test_dsv<mpoint>
- (
- "multipoint((1 2),(3 4))",
- "[ [1, 2], [3, 4] ]",
- true
- );
-
- // http://geojson.org/geojson-spec.html#id6
- test_dsv<mline>
- (
- "multilinestring((1 1,2 2,3 3),(4 4,5 5,6 6))",
- "[ [ [1, 1], [2, 2], [3, 3] ], [ [4, 4], [5, 5], [6, 6] ] ]",
- true
- );
-
- // http://geojson.org/geojson-spec.html#id7
- test_dsv<mpoly>
- (
- "multipolygon(((0 0,0 4,4 4,4 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((5 5,6 5,5 6,5 5)))",
- "[ [ [ [0, 0], [0, 4], [4, 4], [4, 0], [0, 0] ], [ [1, 1], [1, 2], [2, 2], [2, 1], [1, 1] ] ], [ [ [5, 5], [6, 5], [5, 6], [5, 5] ] ] ]",
- true
- );
-
-}
-
-
-int test_main(int, char* [])
-{
- test_all<double>();
- test_all<int>();
-
- return 0;
-}
-
diff --git a/libs/geometry/test/multi/io/wkt/Jamfile.v2 b/libs/geometry/test/multi/io/wkt/Jamfile.v2
deleted file mode 100644
index 50c17cf68..000000000
--- a/libs/geometry/test/multi/io/wkt/Jamfile.v2
+++ /dev/null
@@ -1,15 +0,0 @@
-# Boost.Geometry (aka GGL, Generic Geometry Library)
-#
-# Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-# Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-# Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-#
-# Use, modification and distribution is subject to the Boost Software License,
-# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-test-suite boost-geometry-multi-io-wkt
- :
- [ run multi_wkt.cpp ]
- ;
-
diff --git a/libs/geometry/test/multi/io/wkt/multi_wkt.cpp b/libs/geometry/test/multi/io/wkt/multi_wkt.cpp
deleted file mode 100644
index 317f0578c..000000000
--- a/libs/geometry/test/multi/io/wkt/multi_wkt.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-//#include <iostream>
-#include <sstream>
-#include <string>
-
-#include <boost/algorithm/string.hpp>
-#include <boost/concept/requires.hpp>
-
-#include <boost/test/floating_point_comparison.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-
-#include <boost/geometry/multi/algorithms/area.hpp>
-#include <boost/geometry/multi/algorithms/length.hpp>
-#include <boost/geometry/multi/algorithms/num_points.hpp>
-#include <boost/geometry/multi/algorithms/perimeter.hpp>
-#include <boost/geometry/multi/core/point_type.hpp>
-#include <boost/geometry/multi/core/topological_dimension.hpp>
-#include <boost/geometry/multi/geometries/multi_point.hpp>
-#include <boost/geometry/multi/geometries/multi_linestring.hpp>
-#include <boost/geometry/multi/geometries/multi_polygon.hpp>
-
-#include <boost/geometry/multi/io/wkt/read.hpp>
-#include <boost/geometry/multi/io/wkt/write.hpp>
-
-template <typename T>
-void test_all();
-
-
-// Include the single test
-#define GEOMETRY_TEST_MULTI
-#include "io/wkt/wkt.cpp"
-
-template <typename T>
-void test_all()
-{
- using namespace boost::geometry;
- typedef bg::model::point<T, 2, bg::cs::cartesian> P;
-
- test_wkt<bg::model::multi_point<P> >("multipoint((1 2),(3 4))", 2);
- test_wkt<bg::model::multi_linestring<bg::model::linestring<P> > >("multilinestring((1 1,2 2,3 3),(4 4,5 5,6 6))", 6, 4 * sqrt(2.0));
- test_wkt<bg::model::multi_polygon<bg::model::polygon<P> > >("multipolygon(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((0 0,0 4,4 4,4 0,0 0)))", 15, 0, 21, 28);
-
- // Support for the official alternative syntax for multipoint
- // (provided by Aleksey Tulinov):
- test_relaxed_wkt<bg::model::multi_point<P> >("multipoint(1 2,3 4)", "multipoint((1 2),(3 4))");
-
- test_wrong_wkt<bg::model::multi_polygon<bg::model::polygon<P> > >(
- "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),(0 0,0 4,4 4,4 0,0 0)))",
- "expected '('");
-
- test_wrong_wkt<bg::model::multi_linestring<bg::model::linestring<P> > >(
- "MULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10)), (0 0, 1 1)",
- "too much tokens at ','");
-
- test_wrong_wkt<bg::model::multi_point<P> >(
- "MULTIPOINT((8 9), 10 11)",
- "expected '(' at '10'");
- test_wrong_wkt<bg::model::multi_point<P> >(
- "MULTIPOINT(12 13, (14 15))",
- "bad lexical cast: source type value could not be interpreted as target at '(' in 'multipoint(12 13, (14 15))'");
- test_wrong_wkt<bg::model::multi_point<P> >(
- "MULTIPOINT((16 17), (18 19)",
- "expected ')' in 'multipoint((16 17), (18 19)'");
- test_wrong_wkt<bg::model::multi_point<P> >(
- "MULTIPOINT(16 17), (18 19)",
- "too much tokens at ',' in 'multipoint(16 17), (18 19)'");
-}
-
-/*
-
-... see comments in "wkt.cpp"
-
-union select 13,'# mpoint',npoints(geomfromtext('MULTIPOINT((1 2),(3 4))'))
-union select 14,'length mpoint',length(geomfromtext('MULTIPOINT((1 2),(3 4))'))
-union select 15,'peri mpoint',perimeter(geomfromtext('MULTIPOINT((1 2),(3 4))'))
-union select 16,'area mpoint',area(geomfromtext('MULTIPOINT((1 2),(3 4))'))
-
-union select 17,'# mls',npoints(geomfromtext('MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5,6 6))'))
-union select 18,'length mls',length(geomfromtext('MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5,6 6))'))
-union select 19,'peri mls',perimeter(geomfromtext('MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5,6 6))'))
-union select 20,'area mls',area(geomfromtext('MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5,6 6))'))
-
-union select 21,'# mpoly',npoints(geomfromtext('MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((0 0,0 4,4 4,4 0,0 0)))'))
-union select 22,'length mpoly',length(geomfromtext('MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((0 0,0 4,4 4,4 0,0 0)))'))
-union select 23,'peri mpoly',perimeter(geomfromtext('MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((0 0,0 4,4 4,4 0,0 0)))'))
-union select 24,'area mpoly',area(geomfromtext('MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((0 0,0 4,4 4,4 0,0 0)))'))
-
-*/