1 // Boost.Geometry (aka GGL, Generic Geometry Library)
4 // Copyright (c) 2007-2016 Barend Gehrels, Amsterdam, the Netherlands.
5 // Copyright (c) 2008-2016 Bruno Lalande, Paris, France.
6 // Copyright (c) 2009-2016 Mateusz Loskot, London, UK.
8 // This file was modified by Oracle on 2016.
9 // Modifications copyright (c) 2016, Oracle and/or its affiliates.
10 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
12 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
13 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
15 // Use, modification and distribution is subject to the Boost Software License,
16 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
17 // http://www.boost.org/LICENSE_1_0.txt)
22 #include "test_union.hpp"
23 #include <algorithms/test_overlay.hpp>
25 #include <algorithms/overlay/overlay_cases.hpp>
26 #include <boost/geometry/geometries/point_xy.hpp>
30 template <typename Ring
, typename Polygon
>
33 typedef typename
bg::coordinate_type
<Polygon
>::type ct
;
35 ut_settings ignore_validity
;
36 ignore_validity
.test_validity
= false;
38 test_one
<Polygon
, Polygon
, Polygon
>("simplex_normal",
39 simplex_normal
[0], simplex_normal
[1],
42 test_one
<Polygon
, Polygon
, Polygon
>("simplex_with_empty_1",
43 simplex_normal
[0], polygon_empty
,
45 test_one
<Polygon
, Polygon
, Polygon
>("simplex_with_empty_2",
46 polygon_empty
, simplex_normal
[0],
49 test_one
<Polygon
, Polygon
, Polygon
>("star_ring", example_star
, example_ring
,
50 1, 0, 23, 5.67017141);
52 // This sample was selected because of the border case, and ttmath generates one point more.
53 test_one
<Polygon
, Polygon
, Polygon
>("star_poly", example_star
, example_polygon
,
55 if_typed_tt
<ct
>(28, 27), 5.647949);
57 // Pseudo-box as Polygon
58 // (note, internally, the intersection points is different, so yes,
59 // it has to be tested)
60 test_one
<Polygon
, Polygon
, Polygon
>("box_poly3", "POLYGON((1.5 1.5 , 1.5 2.5 , 4.5 2.5 , 4.5 1.5 , 1.5 1.5))",
61 "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,5.3 2.5,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3))",
64 test_one
<Polygon
, Polygon
, Polygon
>("first_within_second",
65 first_within_second
[0], first_within_second
[1],
68 test_one
<Polygon
, Polygon
, Polygon
>("second_within_first",
69 first_within_second
[1], first_within_second
[0],
72 test_one
<Polygon
, Polygon
, Polygon
>("first_within_hole_of_second",
73 first_within_hole_of_second
[0], first_within_hole_of_second
[1],
76 test_one
<Polygon
, Polygon
, Polygon
>("new_hole",
77 new_hole
[0], new_hole
[1],
80 test_one
<Polygon
, Polygon
, Polygon
>("side_side",
81 side_side
[0], side_side
[1], 1, 0, 7, 2.0);
83 test_one
<Polygon
, Polygon
, Polygon
>("identical",
84 identical
[0], identical
[1], 1, 0, 5, 1.0);
86 test_one
<Polygon
, Polygon
, Polygon
>("disjoint",
87 disjoint
[0], disjoint
[1], 2, 0, 10, 2.0);
89 test_one
<Polygon
, Polygon
, Polygon
>("intersect_holes_intersect",
90 intersect_holes_intersect
[0], intersect_holes_intersect
[1],
93 test_one
<Polygon
, Polygon
, Polygon
>("intersect_holes_intersect_and_disjoint",
94 intersect_holes_intersect_and_disjoint
[0], intersect_holes_intersect_and_disjoint
[1],
97 test_one
<Polygon
, Polygon
, Polygon
>("intersect_holes_intersect_and_touch",
98 intersect_holes_intersect_and_touch
[0], intersect_holes_intersect_and_touch
[1],
101 test_one
<Polygon
, Polygon
, Polygon
>("intersect_holes_new_ring",
102 intersect_holes_new_ring
[0], intersect_holes_new_ring
[1],
105 test_one
<Polygon
, Polygon
, Polygon
>("intersect_holes_disjoint",
106 intersect_holes_disjoint
[0],
107 intersect_holes_disjoint
[1],
110 test_one
<Polygon
, Polygon
, Polygon
>("within_holes_disjoint",
111 within_holes_disjoint
[0], within_holes_disjoint
[1],
114 test_one
<Polygon
, Polygon
, Polygon
>("winded",
115 winded
[0], winded
[1],
118 test_one
<Polygon
, Polygon
, Polygon
>("two_bends",
119 two_bends
[0], two_bends
[1],
122 test_one
<Polygon
, Polygon
, Polygon
>("star_comb_15",
123 star_comb_15
[0], star_comb_15
[1],
124 1, 27, 204, 898.09693338);
126 test_one
<Polygon
, Polygon
, Polygon
>("equal_holes_disjoint",
127 equal_holes_disjoint
[0], equal_holes_disjoint
[1],
128 1, 1, 10, 81 - 3 * 7);
130 test_one
<Polygon
, Polygon
, Polygon
>("only_hole_intersections1",
131 only_hole_intersections
[0], only_hole_intersections
[1],
132 1, 2, 13, 190.9090909);
133 test_one
<Polygon
, Polygon
, Polygon
>("only_hole_intersections2",
134 only_hole_intersections
[0], only_hole_intersections
[2],
135 1, 2, 13, 190.9090909);
137 test_one
<Polygon
, Polygon
, Polygon
>("intersect_exterior_and_interiors_winded",
138 intersect_exterior_and_interiors_winded
[0], intersect_exterior_and_interiors_winded
[1],
139 1, 1, 26, 66.5333333);
141 test_one
<Polygon
, Polygon
, Polygon
>("crossed",
142 crossed
[0], crossed
[1],
143 1, 3, 17, 23.5); // Area from SQL Server - was somehow wrong before
145 test_one
<Polygon
, Polygon
, Polygon
>("fitting",
146 fitting
[0], fitting
[1],
149 test_one
<Polygon
, Polygon
, Polygon
>("distance_zero",
150 distance_zero
[0], distance_zero
[1],
151 1, 0, if_typed
<ct
, float>(9, 11), 9.0098387);
153 test_one
<Polygon
, Polygon
, Polygon
>("wrapped_a",
154 wrapped
[0], wrapped
[1],
156 test_one
<Polygon
, Polygon
, Polygon
>("wrapped_b",
157 wrapped
[0], wrapped
[2],
160 test_one
<Polygon
, Polygon
, Polygon
>("9",
161 case_9
[0], case_9
[1], 2, 0, 8, 11);
162 test_one
<Polygon
, Polygon
, Polygon
>("22",
163 case_22
[0], case_22
[1], 2, 0, 8, 9.5);
164 test_one
<Polygon
, Polygon
, Polygon
>("25",
165 case_25
[0], case_25
[1], 2, 0, 8, 7);
166 test_one
<Polygon
, Polygon
, Polygon
>("26",
167 case_26
[0], case_26
[1], 2, 0, 9, 7.5);
168 test_one
<Polygon
, Polygon
, Polygon
>("31",
169 case_31
[0], case_31
[1], 2, 0, 8, 4.5);
170 test_one
<Polygon
, Polygon
, Polygon
>("32",
171 case_32
[0], case_32
[1], 2, 0, 8, 4.5);
172 test_one
<Polygon
, Polygon
, Polygon
>("33",
173 case_33
[0], case_33
[1], 2, 0, 8, 4.5);
174 test_one
<Polygon
, Polygon
, Polygon
>("36",
175 case_36
[0], case_36
[1], 1, 1, 10, 14.375);
176 test_one
<Polygon
, Polygon
, Polygon
>("40",
177 case_40
[0], case_40
[1], 2, 0, 18, 11);
179 // Test rings which should be generated by assemble
180 test_one
<Polygon
, Polygon
, Polygon
>("53_iet",
181 case_53
[0], case_53
[2], 1, 1, 16, 16);
182 test_one
<Polygon
, Polygon
, Polygon
>("58_iet",
183 case_58
[0], case_58
[2], 1, 3, 20, 12.16666);
185 test_one
<Polygon
, Polygon
, Polygon
>("59_iet",
186 case_59
[0], case_59
[2], 1, 1, 14, 17.20833);
188 test_one
<Polygon
, Polygon
, Polygon
>("80",
189 case_80
[0], case_80
[1], 2, 2, 18, 129.0);
191 test_one
<Polygon
, Polygon
, Polygon
>("81",
192 case_81
[0], case_81
[1], 1, 2, 15, 163.5);
194 test_one
<Polygon
, Polygon
, Polygon
>("82",
195 case_82
[0], case_82
[1], 1, 1, 21, 19.75);
197 test_one
<Polygon
, Polygon
, Polygon
>("83",
198 case_83
[0], case_83
[1], 1, 0, 7, 20.0);
200 test_one
<Polygon
, Polygon
, Polygon
>("90",
201 case_90
[0], case_90
[1], 1, 2, 17, 221.3688);
203 test_one
<Polygon
, Polygon
, Polygon
>("91",
204 case_91
[0], case_91
[1], 1, 1, 9, 147.5);
206 test_one
<Polygon
, Polygon
, Polygon
>("92",
207 case_92
[0], case_92
[1], 2, 0, 9, 175.0);
209 test_one
<Polygon
, Polygon
, Polygon
>("93",
210 case_93
[0], case_93
[1], 1, 2, 12, 172.9167);
212 test_one
<Polygon
, Polygon
, Polygon
>("94",
213 case_94
[0], case_94
[1], 2, 0, 12, 170.0);
215 // Has two separate but touching interior rings
216 test_one
<Polygon
, Polygon
, Polygon
>("95",
217 case_95
[0], case_95
[1], 1, 2, 15, 1320.0);
219 test_one
<Polygon
, Polygon
, Polygon
>("96",
220 case_96
[0], case_96
[1], 1, 1, 10, 1500.0);
222 test_one
<Polygon
, Polygon
, Polygon
>("97",
223 case_97
[0], case_97
[1], 1, 0, 10, 286.799);
225 test_one
<Polygon
, Polygon
, Polygon
>("98",
226 case_98
[0], case_98
[1], 1, 1, 14, 653.067);
228 test_one
<Polygon
, Polygon
, Polygon
>("99",
229 case_99
[0], case_99
[1], 1, 0, 5, 1600.0);
231 test_one
<Polygon
, Polygon
, Polygon
>("100",
232 case_100
[0], case_100
[1], 1, 1, 13, 19.125);
235 test_one<Polygon, Polygon, Polygon>(102,
236 simplex_normal[0], simplex_reversed[1],
239 test_one<Polygon, Polygon, Polygon>(103,
240 simplex_reversed[0], simplex_normal[1],
243 test_one<Polygon, Polygon, Polygon>(104,
244 simplex_reversed[0], simplex_reversed[1],
247 test_one<Polygon, Polygon, Polygon>(100,
252 // test some other input/output types
255 test_one
<Polygon
, Polygon
, Ring
>("identical_pr", identical
[0], identical
[1], 1, 0, 5, 1.0);
256 test_one
<Polygon
, Ring
, Polygon
>("identical_rp", identical
[0], identical
[1], 1, 0, 5, 1.0);
259 test_one
<Polygon
, Ring
, Ring
>("identical_rr", identical
[0], identical
[1], 1, 0, 5, 1.0);
261 // output is also Ring
262 test_one
<Ring
, Ring
, Ring
>("identical_rrr", identical
[0], identical
[1], 1, 0, 5, 1.0);
264 // "new hole", tested with Ring -> the newly formed hole will be omitted
265 test_one
<Ring
, Ring
, Ring
>("new_hole_discarded", new_hole
[0], new_hole
[1], 1, 0, 9, 24.0);
267 test_one
<Polygon
, Polygon
, Polygon
>("ggl_list_20110306_javier",
268 ggl_list_20110306_javier
[0], ggl_list_20110306_javier
[1],
269 1, 1, 16, 80456.4904910401);
271 test_one
<Polygon
, Polygon
, Polygon
>("ggl_list_20110307_javier",
272 ggl_list_20110307_javier
[0], ggl_list_20110307_javier
[1],
275 #if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
276 test_one
<Polygon
, Polygon
, Polygon
>("ggl_list_20110627_phillip",
277 ggl_list_20110627_phillip
[0], ggl_list_20110627_phillip
[1],
278 1, 0, 8, 14729.07145);
281 test_one
<Polygon
, Polygon
, Polygon
>("ggl_list_20110716_enrico",
282 ggl_list_20110716_enrico
[0], ggl_list_20110716_enrico
[1],
283 1, 1, 15, 129904.197692871);
285 #if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
286 test_one
<Polygon
, Polygon
, Polygon
>("ggl_list_20110820_christophe",
287 ggl_list_20110820_christophe
[0], ggl_list_20110820_christophe
[1],
288 -1, // Either 1 or 2, depending if the intersection/turn point (eps.region) is missed
290 if_typed_tt
<ct
>(9, 8),
295 ut_settings settings
;
296 settings
.percentage
= 0.1;
297 #if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
298 settings
.test_validity
= false;
301 test_one
<Polygon
, Polygon
, Polygon
>("isovist",
302 isovist1
[0], isovist1
[1],
306 313.36036462, settings
);
308 // SQL Server gives: 313.360374193241
309 // PostGIS gives: 313.360364623393
312 // Ticket 5103 https://svn.boost.org/trac/boost/ticket/5103
313 // This ticket was actually reported for Boost.Polygon
314 // We check it for Boost.Geometry as well.
315 // SQL Server gives: 2515271331437.69
316 // PostGIS gives: 2515271327070.52
317 // Boost.Geometry gives: 2515271327070.5237746891 (ttmath)
318 // 2515271327070.5156 (double)
319 // 2515271320603.0000 (int)
320 // Note the int-test was tested outside of this unit test.
321 // It is in two points 0.37 off (logical for an int).
322 // Because of the width of the polygon (400000 meter)
323 // this causes a substantial difference.
325 test_one
<Polygon
, Polygon
, Polygon
>("ticket_5103",
326 ticket_5103
[0], ticket_5103
[1],
327 1, 0, 25, 2515271327070.5);
329 test_one
<Polygon
, Polygon
, Polygon
>("ticket_8310a", ticket_8310a
[0], ticket_8310a
[1],
330 1, 0, 5, 10.5000019595);
331 test_one
<Polygon
, Polygon
, Polygon
>("ticket_8310b", ticket_8310b
[0], ticket_8310b
[1],
332 1, 0, 5, 10.5000019595);
333 test_one
<Polygon
, Polygon
, Polygon
>("ticket_8310c", ticket_8310c
[0], ticket_8310c
[1],
334 1, 0, 5, 10.5000019595);
336 test_one
<Polygon
, Polygon
, Polygon
>("ticket_9081_15",
337 ticket_9081_15
[0], ticket_9081_15
[1],
338 1, 0, 10, 0.0403425433);
340 test_one
<Polygon
, Polygon
, Polygon
>("ticket_9563", ticket_9563
[0], ticket_9563
[1],
343 test_one
<Polygon
, Polygon
, Polygon
>("ticket_9756", ticket_9756
[0], ticket_9756
[1],
344 1, 0, 10, 1289.08374);
346 #if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
347 test_one
<Polygon
, Polygon
, Polygon
>("ticket_10108_a", ticket_10108_a
[0], ticket_10108_a
[1],
350 test_one
<Polygon
, Polygon
, Polygon
>("ticket_10108_a", ticket_10108_a
[0], ticket_10108_a
[1],
354 #if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
355 test_one
<Polygon
, Polygon
, Polygon
>("ticket_10108_b", ticket_10108_b
[0], ticket_10108_b
[1],
356 1, 0, 10, 2424.3449);
359 test_one
<Polygon
, Polygon
, Polygon
>("ticket_10866", ticket_10866
[0], ticket_10866
[1],
360 1, 0, 14, 332760303.5);
362 test_one
<Polygon
, Polygon
, Polygon
>("ticket_11725", ticket_11725
[0], ticket_11725
[1],
365 test_one
<Polygon
, Polygon
, Polygon
>("geos_1", geos_1
[0], geos_1
[1],
366 1, 0, -1, 3461.3203125,
368 test_one
<Polygon
, Polygon
, Polygon
>("geos_2", geos_2
[0], geos_2
[1],
369 1, 0, -1, 350.55102539);
370 test_one
<Polygon
, Polygon
, Polygon
>("geos_3", geos_3
[0], geos_3
[1],
371 1, 0, -1, 29391548.4998779);
372 test_one
<Polygon
, Polygon
, Polygon
>("geos_4", geos_4
[0], geos_4
[1],
373 1, 0, -1, 2304.4163115);
375 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_a", buffer_rt_a
[0], buffer_rt_a
[1],
376 1, 0, 265, 19.280667);
378 // Robustness issues, followed out buffer-robustness-tests, test them also reverse
379 #if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
380 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_f", buffer_rt_f
[0], buffer_rt_f
[1],
381 1, 0, if_typed
<ct
, double>(18, 23), 4.60853,
383 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_f_rev", buffer_rt_f
[1], buffer_rt_f
[0],
384 1, 0, if_typed
<ct
, double>(18, 23), 4.60853,
388 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_g", buffer_rt_g
[0], buffer_rt_g
[1],
389 1, 0, if_typed
<ct
, float>(18, 17), 16.571);
390 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_g_rev", buffer_rt_g
[1], buffer_rt_g
[0],
391 1, 0, if_typed
<ct
, float>(18, 17), 16.571);
393 #if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
394 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_i", buffer_rt_i
[0], buffer_rt_i
[1],
395 1, 0, if_typed
<ct
, float>(14, 13), 13.6569);
397 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_i_rev", buffer_rt_i
[1], buffer_rt_i
[0],
400 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_j", buffer_rt_j
[0], buffer_rt_j
[1],
402 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_j_rev", buffer_rt_j
[1], buffer_rt_j
[0],
405 #if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
406 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_l", buffer_rt_l
[0], buffer_rt_l
[1],
408 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_l_rev", buffer_rt_l
[1], buffer_rt_l
[0],
412 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_m1", buffer_rt_m1
[0], buffer_rt_m1
[1],
413 1, 0, if_typed_tt
<ct
>(14, 13), 19.4852);
414 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_m1_rev", buffer_rt_m1
[1], buffer_rt_m1
[0],
415 1, 0, if_typed_tt
<ct
>(14, 13), 19.4852);
417 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_m2", buffer_rt_m2
[0], buffer_rt_m2
[1],
418 1, 0, if_typed_tt
<ct
>(20, 19), 21.4853);
419 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_m2_rev", buffer_rt_m2
[1], buffer_rt_m2
[0],
420 1, 0, if_typed_tt
<ct
>(20, 19), 21.4853);
422 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_q", buffer_rt_q
[0], buffer_rt_q
[1],
424 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_q_rev", buffer_rt_q
[1], buffer_rt_q
[0],
427 #if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
428 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_r", buffer_rt_r
[0], buffer_rt_r
[1],
430 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_r_rev", buffer_rt_r
[1], buffer_rt_r
[0],
431 1, 0, if_typed_tt
<ct
>(20, 19), 21.07612);
434 #if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
435 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_t", buffer_rt_t
[0], buffer_rt_t
[1],
436 1, 0, if_typed_tt
<ct
>(16, 14), 15.6569);
437 test_one
<Polygon
, Polygon
, Polygon
>("buffer_rt_t_rev", buffer_rt_t
[1], buffer_rt_t
[0],
438 1, 0, if_typed_tt
<ct
>(16, if_typed
<ct
, float>(15, 14)), 15.6569);
441 test_one
<Polygon
, Polygon
, Polygon
>("buffer_mp1", buffer_mp1
[0], buffer_mp1
[1],
442 1, 0, if_typed_tt
<ct
>(93, 91), 22.815);
444 test_one
<Polygon
, Polygon
, Polygon
>("buffer_mp2", buffer_mp2
[0], buffer_mp2
[1],
445 #if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
446 1, 0, 217, 36.752837, ignore_validity
);
448 1, 1, 217, 36.752837);
451 test_one
<Polygon
, Polygon
, Polygon
>("mysql_21964079_1",
452 mysql_21964079_1
[0], mysql_21964079_1
[1],
454 test_one
<Polygon
, Polygon
, Polygon
>("mysql_21964079_2",
455 mysql_21964079_2
[0], mysql_21964079_2
[1],
458 test_one
<Polygon
, Polygon
, Polygon
>("mysql_23023665_1",
459 mysql_23023665_1
[0], mysql_23023665_1
[1],
460 2, 1, -1, 92.0 + 142.5);
461 test_one
<Polygon
, Polygon
, Polygon
>("mysql_23023665_2",
462 mysql_23023665_2
[0], mysql_23023665_2
[1],
463 2, 1, -1, 96.0 + 16.0);
464 test_one
<Polygon
, Polygon
, Polygon
>("mysql_23023665_3",
465 mysql_23023665_3
[0], mysql_23023665_3
[1],
466 2, 1, -1, 225.0 + 66.0);
467 test_one
<Polygon
, Polygon
, Polygon
>("mysql_21964049",
468 mysql_21964049
[0], mysql_21964049
[1],
472 template <typename P
>
475 typedef bg::model::polygon
<P
> polygon
;
476 typedef bg::model::ring
<P
> ring
;
477 typedef bg::model::box
<P
> box
;
479 test_areal
<ring
, polygon
>();
482 test_areal
<bg::model::ring
<P
, true, false>, bg::model::polygon
<P
, true, false> >();
485 test_areal
<bg::model::ring
<P
, false>, bg::model::polygon
<P
, false> >();
487 #if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
488 // Counter clockwise and open
489 test_areal
<bg::model::ring
<P
, false, false>, bg::model::polygon
<P
, false, false> >();
492 test_one
<polygon
, box
, polygon
>("box_ring", example_box
, example_ring
,
495 test_one
<polygon
, box
, polygon
>("box_poly", example_box
, example_polygon
,
499 test_one
<polygon
, box
, polygon
>("box_poly1", example_box
,
500 "POLYGON((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,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2))",
502 test_one
<polygon
, box
, polygon
>("box_poly2", example_box
,
503 "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,5.3 2.5,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3))",
508 test_one
<polygon
, box
, polygon
>("box_poly4", example_box
,
509 "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,4.5 2.5,4.5 1.2,4.9 0.8,2.9 0.7,2 1.3))",
512 test_one
<polygon
, box
, polygon
>("box_poly5", example_box
,
513 "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,4.5 2.5,4.5 2.3,5.0 2.3,5.0 2.1,4.5 2.1,4.5 1.9,4.0 1.9,4.5 1.2,4.9 0.8,2.9 0.7,2 1.3))",
516 test_one
<polygon
, box
, polygon
>("box_poly6", example_box
,
517 "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 2.5,4.5 1.2,2.9 0.7,2 1.3))",
520 test_one
<polygon
, box
, polygon
>("box_poly7", example_box
,
521 "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.0 3.0,5.0 2.0,2.9 0.7,2 1.3))",
524 test_one
<polygon
, box
, polygon
>("box_poly8", "box(0 0, 3 3)",
525 "POLYGON((2 2, 1 4, 2 4, 3 3, 2 2))",
530 int test_main(int, char* [])
532 test_all
<bg::model::d2::point_xy
<double> >();
534 #if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
536 #if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
537 test_all
<bg::model::d2::point_xy
<float> >();
538 test_all
<bg::model::d2::point_xy
<long double> >();
541 #if defined(HAVE_TTMATH)
542 std::cout
<< "Testing TTMATH" << std::endl
;
543 test_all
<bg::model::d2::point_xy
<ttmath_big
> >();