]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/test/algorithms/for_each.cpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
4 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
6 // This file was modified by Oracle on 2020.
7 // Modifications copyright (c) 2020, Oracle and/or its affiliates.
8 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
10 // Use, modification and distribution is subject to the Boost Software License,
11 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
12 // http://www.boost.org/LICENSE_1_0.txt)
15 #include <algorithms/test_for_each.hpp>
17 #include <boost/geometry/geometries/geometries.hpp>
37 test_geometry
<bg::model::linestring
<P
> >
42 , "LINESTRING(101 1,102 2)"
43 , "LINESTRING(101 100,102 200)"
47 , "LINESTRING(10 1,2 2)"
49 test_geometry
<bg::model::linestring
<P
> >
55 , "LINESTRING(101 100)"
61 test_geometry
<bg::model::linestring
<P
> >
73 test_geometry
<bg::model::ring
<P
> >
75 "POLYGON((1 1,1 4,4 4,4 1,1 1))"
78 , "POLYGON((101 1,101 4,104 4,104 1,101 1))"
79 , "POLYGON((101 100,101 400,104 400,104 100,101 100))"
81 , "((1, 1), (1, 4)) ((1, 4), (4, 4)) ((4, 4), (4, 1)) ((4, 1), (1, 1))"
83 , "POLYGON((10 1,10 4,4 4,4 1,1 1))"
85 test_geometry
<bg::model::ring
<P
> >
97 test_geometry
<bg::model::ring
<P
, true, false> > // open ring
99 "POLYGON((1 1,1 4,4 4,4 1))"
102 , "POLYGON((101 1,101 4,104 4,104 1))"
103 , "POLYGON((101 100,101 400,104 400,104 100))"
105 , "((1, 1), (1, 4)) ((1, 4), (4, 4)) ((4, 4), (4, 1)) ((4, 1), (1, 1))"
107 , "POLYGON((10 1,10 4,4 4,4 1))"
109 test_geometry
<bg::model::polygon
<P
> >
111 "POLYGON((1 1,1 4,4 4,4 1,1 1),(2 2,3 2,3 3,2 3,2 2))"
114 , "POLYGON((101 1,101 4,104 4,104 1,101 1),(102 2,103 2,103 3,102 3,102 2))"
115 , "POLYGON((101 100,101 400,104 400,104 100,101 100),(102 200,103 200,103 300,102 300,102 200))"
117 , "((1, 1), (1, 4)) ((1, 4), (4, 4)) ((4, 4), (4, 1)) ((4, 1), (1, 1)) "
118 "((2, 2), (3, 2)) ((3, 2), (3, 3)) ((3, 3), (2, 3)) ((2, 3), (2, 2))"
120 , "POLYGON((10 1,10 4,4 4,4 1,1 1,10 1),(2 2,3 2,3 3,2 3,2 2))"
122 test_geometry
<bg::model::polygon
<P
, true, false> > // open polygon
124 "POLYGON((1 1,1 4,4 4,4 1),(2 2,3 2,3 3,2 3))"
127 , "POLYGON((101 1,101 4,104 4,104 1,101 1),(102 2,103 2,103 3,102 3,102 2))"
128 , "POLYGON((101 100,101 400,104 400,104 100,101 100),(102 200,103 200,103 300,102 300,102 200))"
130 , "((1, 1), (1, 4)) ((1, 4), (4, 4)) ((4, 4), (4, 1)) ((4, 1), (1, 1)) "
131 "((2, 2), (3, 2)) ((3, 2), (3, 3)) ((3, 3), (2, 3)) ((2, 3), (2, 2))"
133 , "POLYGON((10 1,10 4,4 4,4 1,10 1),(2 2,3 2,3 3,2 3,2 2))"
137 int test_main(int, char* [])
139 test_all
<bg::model::point
<double, 2, bg::cs::cartesian
> >();