]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/test/algorithms/relational_operations/equals/equals_multi.cpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
4 // Use, modification and distribution is subject to the Boost Software License,
5 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
9 #include "test_equals.hpp"
11 #include <boost/geometry/algorithms/area.hpp>
13 #include <boost/geometry/geometries/geometries.hpp>
14 #include <boost/geometry/geometries/point_xy.hpp>
20 std::string case1
= "MULTIPOLYGON(((0 0,0 7,4 2,2 0,0 0)))";
21 std::string case1_p
= "POLYGON((0 0,0 7,4 2,2 0,0 0))";
23 typedef bg::model::polygon
<P
> polygon
;
24 typedef bg::model::multi_polygon
<polygon
> mp
;
25 test_geometry
<mp
, mp
>("c1", case1
, case1
, true);
27 test_geometry
<mp
, mp
>("c2",
28 "MULTIPOLYGON(((0 0,0 7.01,4 2,2 0,0 0)))",
31 // Different order == equal
32 test_geometry
<mp
, mp
>("c3",
33 "MULTIPOLYGON(((0 0,0 7,4 2,2 0,0 0)),((10 10,10 12,12 10,10 10)))",
34 "MULTIPOLYGON(((10 10,10 12,12 10,10 10)),((0 0,0 7,4 2,2 0,0 0)))",
37 // check different types
38 test_geometry
<polygon
, mp
>("c1_p_mp", case1_p
, case1
, true);
39 test_geometry
<mp
, polygon
>("c1_mp_p", case1
, case1_p
, true);
43 int test_main( int , char* [] )
45 test_all
<bg::model::d2::point_xy
<double> >();
48 test_all
<bg::model::d2::point_xy
<ttmath_big
> >();