1 // Boost.Geometry (aka GGL, Generic Geometry Library)
4 // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
5 // Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
6 // Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
8 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
9 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
11 // Use, modification and distribution is subject to the Boost Software License,
12 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
13 // http://www.boost.org/LICENSE_1_0.txt)
19 #include "test_distance.hpp"
21 #include <boost/mpl/if.hpp>
22 #include <boost/array.hpp>
24 #include <boost/geometry/geometries/geometries.hpp>
25 #include <boost/geometry/geometries/point_xy.hpp>
26 #include <boost/geometry/geometries/adapted/c_array.hpp>
27 #include <boost/geometry/geometries/adapted/boost_tuple.hpp>
29 #include <test_common/test_point.hpp>
30 #include <test_geometries/custom_segment.hpp>
31 #include <test_geometries/wrapped_boost_array.hpp>
33 #include <boost/variant/variant.hpp>
35 BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian
)
36 BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian
)
38 // Register boost array as a linestring
39 namespace boost
{ namespace geometry
{ namespace traits
41 template <typename Point
, std::size_t PointCount
>
42 struct tag
< boost::array
<Point
, PointCount
> >
44 typedef linestring_tag type
;
50 void test_distance_point()
52 namespace services
= bg::strategy::distance::services
;
53 typedef typename
bg::default_distance_result
<P
>::type return_type
;
55 // Basic, trivial test
65 return_type d
= bg::distance(p1
, p2
);
66 BOOST_CHECK_CLOSE(d
, return_type(1.4142135), 0.001);
68 // Test specifying strategy manually
69 typename
services::default_strategy
71 bg::point_tag
, bg::point_tag
, P
74 d
= bg::distance(p1
, p2
, strategy
);
75 BOOST_CHECK_CLOSE(d
, return_type(1.4142135), 0.001);
78 // Test custom strategy
79 BOOST_CONCEPT_ASSERT( (bg::concepts::PointDistanceStrategy
<taxicab_distance
, P
, P
>) );
81 typedef typename
services::return_type
<taxicab_distance
, P
, P
>::type cab_return_type
;
82 BOOST_MPL_ASSERT((boost::is_same
<cab_return_type
, typename
bg::coordinate_type
<P
>::type
>));
85 cab_return_type d
= bg::distance(p1
, p2
, tcd
);
87 BOOST_CHECK( bg::math::abs(d
- cab_return_type(2)) <= cab_return_type(0.01) );
93 typedef typename
services::default_strategy
95 bg::point_tag
, bg::point_tag
, P
96 >::type strategy_type
;
97 typedef typename
services::comparable_type
<strategy_type
>::type comparable_strategy_type
;
99 strategy_type strategy
;
100 comparable_strategy_type comparable_strategy
= services::get_comparable
<strategy_type
>::apply(strategy
);
101 return_type comparable
= services::result_from_distance
<comparable_strategy_type
, P
, P
>::apply(comparable_strategy
, 3);
103 BOOST_CHECK_CLOSE(comparable
, return_type(9), 0.001);
107 template <typename P
>
108 void test_distance_segment()
110 typedef typename
bg::default_distance_result
<P
>::type return_type
;
112 P s1
; bg::set
<0>(s1
, 1); bg::set
<1>(s1
, 1);
113 P s2
; bg::set
<0>(s2
, 4); bg::set
<1>(s2
, 4);
115 // Check points left, right, projected-left, projected-right, on segment
116 P p1
; bg::set
<0>(p1
, 0); bg::set
<1>(p1
, 1);
117 P p2
; bg::set
<0>(p2
, 1); bg::set
<1>(p2
, 0);
118 P p3
; bg::set
<0>(p3
, 3); bg::set
<1>(p3
, 1);
119 P p4
; bg::set
<0>(p4
, 1); bg::set
<1>(p4
, 3);
120 P p5
; bg::set
<0>(p5
, 3); bg::set
<1>(p5
, 3);
122 bg::model::referring_segment
<P
const> const seg(s1
, s2
);
124 return_type d1
= bg::distance(p1
, seg
);
125 return_type d2
= bg::distance(p2
, seg
);
126 return_type d3
= bg::distance(p3
, seg
);
127 return_type d4
= bg::distance(p4
, seg
);
128 return_type d5
= bg::distance(p5
, seg
);
130 BOOST_CHECK_CLOSE(d1
, return_type(1), 0.001);
131 BOOST_CHECK_CLOSE(d2
, return_type(1), 0.001);
132 BOOST_CHECK_CLOSE(d3
, return_type(1.4142135), 0.001);
133 BOOST_CHECK_CLOSE(d4
, return_type(1.4142135), 0.001);
134 BOOST_CHECK_CLOSE(d5
, return_type(0), 0.001);
136 // Reverse case: segment/point instead of point/segment
137 return_type dr1
= bg::distance(seg
, p1
);
138 return_type dr2
= bg::distance(seg
, p2
);
140 BOOST_CHECK_CLOSE(dr1
, d1
, 0.001);
141 BOOST_CHECK_CLOSE(dr2
, d2
, 0.001);
143 // Test specifying strategy manually:
144 // 1) point-point-distance
145 typename
bg::strategy::distance::services::default_strategy
147 bg::point_tag
, bg::point_tag
, P
149 d1
= bg::distance(p1
, seg
, pp_strategy
);
150 BOOST_CHECK_CLOSE(d1
, return_type(1), 0.001);
152 // 2) point-segment-distance
153 typename
bg::strategy::distance::services::default_strategy
155 bg::point_tag
, bg::segment_tag
, P
157 d1
= bg::distance(p1
, seg
, ps_strategy
);
158 BOOST_CHECK_CLOSE(d1
, return_type(1), 0.001);
160 // 3) custom point strategy
161 taxicab_distance tcd
;
162 d1
= bg::distance(p1
, seg
, tcd
);
163 BOOST_CHECK_CLOSE(d1
, return_type(1), 0.001);
166 template <typename Point
, typename Geometry
, typename T
>
167 void test_distance_linear(std::string
const& wkt_point
, std::string
const& wkt_geometry
, T
const& expected
)
170 bg::read_wkt(wkt_point
, p
);
173 bg::read_wkt(wkt_geometry
, g
);
175 typedef typename
bg::default_distance_result
<Point
>::type return_type
;
176 return_type d
= bg::distance(p
, g
);
178 // For point-to-linestring (or point-to-polygon), both a point-strategy and a point-segment-strategy can be specified.
180 return_type ds1
= bg::distance(p
, g
, bg::strategy::distance::pythagoras
<>());
181 return_type ds2
= bg::distance(p
, g
, bg::strategy::distance::projected_point
<>());
183 BOOST_CHECK_CLOSE(d
, return_type(expected
), 0.001);
184 BOOST_CHECK_CLOSE(ds1
, return_type(expected
), 0.001);
185 BOOST_CHECK_CLOSE(ds2
, return_type(expected
), 0.001);
188 template <typename P
>
189 void test_distance_array_as_linestring()
191 typedef typename
bg::default_distance_result
<P
>::type return_type
;
193 // Normal array does not have
194 boost::array
<P
, 2> points
;
195 bg::set
<0>(points
[0], 1);
196 bg::set
<1>(points
[0], 1);
197 bg::set
<0>(points
[1], 3);
198 bg::set
<1>(points
[1], 3);
204 return_type d
= bg::distance(p
, points
);
205 BOOST_CHECK_CLOSE(d
, return_type(0.70710678), 0.001);
207 bg::set
<0>(p
, 5); bg::set
<1>(p
, 5);
208 d
= bg::distance(p
, points
);
209 BOOST_CHECK_CLOSE(d
, return_type(2.828427), 0.001);
213 // code moved from the distance unit test in multi/algorithms -- start
214 template <typename Geometry1
, typename Geometry2
>
215 void test_distance(std::string
const& wkt1
, std::string
const& wkt2
, double expected
)
219 bg::read_wkt(wkt1
, g1
);
220 bg::read_wkt(wkt2
, g2
);
221 typename
bg::default_distance_result
<Geometry1
, Geometry2
>::type d
= bg::distance(g1
, g2
);
223 BOOST_CHECK_CLOSE(d
, expected
, 0.0001);
226 template <typename Geometry1
, typename Geometry2
, typename Strategy
>
227 void test_distance(Strategy
const& strategy
, std::string
const& wkt1
,
228 std::string
const& wkt2
, double expected
)
232 bg::read_wkt(wkt1
, g1
);
233 bg::read_wkt(wkt2
, g2
);
234 typename
bg::default_distance_result
<Geometry1
, Geometry2
>::type d
= bg::distance(g1
, g2
, strategy
);
236 BOOST_CHECK_CLOSE(d
, expected
, 0.0001);
240 template <typename P
>
243 typedef bg::model::multi_point
<P
> mp
;
244 typedef bg::model::multi_linestring
<bg::model::linestring
<P
> > ml
;
245 test_distance
<P
, P
>("POINT(0 0)", "POINT(1 1)", sqrt(2.0));
246 test_distance
<P
, mp
>("POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
247 test_distance
<mp
, P
>("MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
248 test_distance
<mp
, mp
>("MULTIPOINT((1 1),(1 0),(0 2))", "MULTIPOINT((2 2),(2 3))", sqrt(2.0));
249 test_distance
<P
, ml
>("POINT(0 0)", "MULTILINESTRING((1 1,2 2),(1 0,2 0),(0 2,0 3))", 1.0);
250 test_distance
<ml
, P
>("MULTILINESTRING((1 1,2 2),(1 0,2 0),(0 2,0 3))", "POINT(0 0)", 1.0);
251 test_distance
<ml
, mp
>("MULTILINESTRING((1 1,2 2),(1 0,2 0),(0 2,0 3))", "MULTIPOINT((0 0),(1 1))", 0.0);
253 // Test with a strategy
254 bg::strategy::distance::pythagoras
<> pyth
;
255 test_distance
<P
, P
>(pyth
, "POINT(0 0)", "POINT(1 1)", sqrt(2.0));
256 test_distance
<P
, mp
>(pyth
, "POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
257 test_distance
<mp
, P
>(pyth
, "MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
261 template <typename P
>
264 typedef bg::model::multi_point
<P
> mp
;
265 test_distance
<P
, P
>("POINT(0 0 0)", "POINT(1 1 1)", sqrt(3.0));
266 test_distance
<P
, mp
>("POINT(0 0 0)", "MULTIPOINT((1 1 1),(1 0 0),(0 1 2))", 1.0);
267 test_distance
<mp
, mp
>("MULTIPOINT((1 1 1),(1 0 0),(0 0 2))", "MULTIPOINT((2 2 2),(2 3 4))", sqrt(3.0));
271 template <typename P1
, typename P2
>
274 typedef bg::model::multi_point
<P1
> mp1
;
275 typedef bg::model::multi_point
<P2
> mp2
;
277 test_distance
<P1
, P2
>("POINT(0 0)", "POINT(1 1)", sqrt(2.0));
279 test_distance
<P1
, mp1
>("POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
280 test_distance
<P1
, mp2
>("POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
281 test_distance
<P2
, mp1
>("POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
282 test_distance
<P2
, mp2
>("POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
284 // Test automatic reversal
285 test_distance
<mp1
, P1
>("MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
286 test_distance
<mp1
, P2
>("MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
287 test_distance
<mp2
, P1
>("MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
288 test_distance
<mp2
, P2
>("MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
290 // Test multi-multi using different point types for each
291 test_distance
<mp1
, mp2
>("MULTIPOINT((1 1),(1 0),(0 2))", "MULTIPOINT((2 2),(2 3))", sqrt(2.0));
293 // Test with a strategy
294 using namespace bg::strategy::distance
;
296 test_distance
<P1
, P2
>(pythagoras
<>(), "POINT(0 0)", "POINT(1 1)", sqrt(2.0));
298 test_distance
<P1
, mp1
>(pythagoras
<>(), "POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
299 test_distance
<P1
, mp2
>(pythagoras
<>(), "POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
300 test_distance
<P2
, mp1
>(pythagoras
<>(), "POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
301 test_distance
<P2
, mp2
>(pythagoras
<>(), "POINT(0 0)", "MULTIPOINT((1 1),(1 0),(0 2))", 1.0);
303 // Most interesting: reversal AND a strategy (note that the stategy must be reversed automatically
304 test_distance
<mp1
, P1
>(pythagoras
<>(), "MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
305 test_distance
<mp1
, P2
>(pythagoras
<>(), "MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
306 test_distance
<mp2
, P1
>(pythagoras
<>(), "MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
307 test_distance
<mp2
, P2
>(pythagoras
<>(), "MULTIPOINT((1 1),(1 0),(0 2))", "POINT(0 0)", 1.0);
309 // code moved from the distance unit test in multi/algorithms -- end
314 template <typename P
>
317 test_distance_point
<P
>();
318 test_distance_segment
<P
>();
319 test_distance_array_as_linestring
<P
>();
321 test_geometry
<P
, bg::model::segment
<P
> >("POINT(1 3)", "LINESTRING(1 1,4 4)", sqrt(2.0));
322 test_geometry
<P
, bg::model::segment
<P
> >("POINT(3 1)", "LINESTRING(1 1,4 4)", sqrt(2.0));
324 test_geometry
<P
, P
>("POINT(1 1)", "POINT(2 2)", sqrt(2.0));
325 test_geometry
<P
, P
>("POINT(0 0)", "POINT(0 3)", 3.0);
326 test_geometry
<P
, P
>("POINT(0 0)", "POINT(4 0)", 4.0);
327 test_geometry
<P
, P
>("POINT(0 3)", "POINT(4 0)", 5.0);
328 test_geometry
<P
, bg::model::linestring
<P
> >("POINT(1 3)", "LINESTRING(1 1,4 4)", sqrt(2.0));
329 test_geometry
<P
, bg::model::linestring
<P
> >("POINT(3 1)", "LINESTRING(1 1,4 4)", sqrt(2.0));
330 test_geometry
<P
, bg::model::linestring
<P
> >("POINT(50 50)", "LINESTRING(50 40, 40 50)", sqrt(50.0));
331 test_geometry
<P
, bg::model::linestring
<P
> >("POINT(50 50)", "LINESTRING(50 40, 40 50, 0 90)", sqrt(50.0));
332 test_geometry
<bg::model::linestring
<P
>, P
>("LINESTRING(1 1,4 4)", "POINT(1 3)", sqrt(2.0));
333 test_geometry
<bg::model::linestring
<P
>, P
>("LINESTRING(50 40, 40 50)", "POINT(50 50)", sqrt(50.0));
334 test_geometry
<bg::model::linestring
<P
>, P
>("LINESTRING(50 40, 40 50, 0 90)", "POINT(50 50)", sqrt(50.0));
337 test_geometry
<P
, bg::model::ring
<P
> >("POINT(1 3)", "POLYGON((1 1,4 4,5 0,1 1))", sqrt(2.0));
338 test_geometry
<P
, bg::model::ring
<P
> >("POINT(3 1)", "POLYGON((1 1,4 4,5 0,1 1))", 0.0);
340 test_geometry
<bg::model::ring
<P
>, P
>("POLYGON((1 1,4 4,5 0,1 1))", "POINT(3 1)", 0.0);
342 test_geometry
<P
, bg::model::ring
<P
, true, false> >("POINT(1 3)", "POLYGON((4 4,5 0,1 1))", sqrt(2.0));
345 test_geometry
<P
, bg::model::polygon
<P
> >("POINT(1 3)", "POLYGON((1 1,4 4,5 0,1 1))", sqrt(2.0));
346 test_geometry
<P
, bg::model::polygon
<P
> >("POINT(3 1)", "POLYGON((1 1,4 4,5 0,1 1))", 0.0);
348 test_geometry
<bg::model::polygon
<P
>, P
>("POLYGON((1 1,4 4,5 0,1 1))", "POINT(3 1)", 0.0);
350 test_geometry
<P
, bg::model::polygon
<P
, true, false> >("POINT(1 3)", "POLYGON((4 4,5 0,1 1))", sqrt(2.0));
352 // Polygons with holes
353 std::string donut
= "POLYGON ((0 0,1 9,8 1,0 0),(1 1,4 1,1 4,1 1))";
354 test_geometry
<P
, bg::model::polygon
<P
> >("POINT(2 2)", donut
, 0.5 * sqrt(2.0));
355 test_geometry
<P
, bg::model::polygon
<P
> >("POINT(3 3)", donut
, 0.0);
357 test_geometry
<bg::model::polygon
<P
>, P
>(donut
, "POINT(2 2)", 0.5 * sqrt(2.0));
359 test_geometry
<P
, bg::model::polygon
<P
, true, false> >("POINT(2 2)", "POLYGON ((0 0,1 9,8 1),(1 1,4 1,1 4))", 0.5 * sqrt(2.0));
361 // Should (currently) give compiler assertion
362 // test_geometry<bg::model::polygon<P>, bg::model::polygon<P> >(donut, donut, 0.5 * sqrt(2.0));
364 // DOES NOT COMPILE - cannot do read_wkt (because boost::array is not variably sized)
365 // test_geometry<P, boost::array<P, 2> >("POINT(3 1)", "LINESTRING(1 1,4 4)", sqrt(2.0));
367 test_geometry
<P
, test::wrapped_boost_array
<P
, 2> >("POINT(3 1)", "LINESTRING(1 1,4 4)", sqrt(2.0));
369 test_distance_linear
<P
, bg::model::linestring
<P
> >("POINT(3 1)", "LINESTRING(1 1,4 4)", sqrt(2.0));
372 template <typename P
>
373 void test_empty_input()
376 bg::model::linestring
<P
> line_empty
;
377 bg::model::polygon
<P
> poly_empty
;
378 bg::model::ring
<P
> ring_empty
;
379 bg::model::multi_point
<P
> mp_empty
;
380 bg::model::multi_linestring
<bg::model::linestring
<P
> > ml_empty
;
382 test_empty_input(p
, line_empty
);
383 test_empty_input(p
, poly_empty
);
384 test_empty_input(p
, ring_empty
);
386 test_empty_input(p
, mp_empty
);
387 test_empty_input(p
, ml_empty
);
388 test_empty_input(mp_empty
, mp_empty
);
390 // Test behaviour if one of the inputs is empty
391 bg::model::multi_point
<P
> mp
;
393 test_empty_input(mp_empty
, mp
);
394 test_empty_input(mp
, mp_empty
);
397 void test_large_integers()
399 typedef bg::model::point
<int, 2, bg::cs::cartesian
> int_point_type
;
400 typedef bg::model::point
<double, 2, bg::cs::cartesian
> double_point_type
;
404 std::string
const a
= "POINT(2544000 528000)";
405 std::string
const b
= "POINT(2768040 528000)";
406 int_point_type ia
, ib
;
407 double_point_type da
, db
;
413 BOOST_AUTO(idist
, bg::distance(ia
, ib
));
414 BOOST_AUTO(ddist
, bg::distance(da
, db
));
416 BOOST_CHECK_MESSAGE(std::abs(idist
- ddist
) < 0.1,
417 "within<a double> different from within<an int>");
421 std::string
const a
= "POINT(2600000 529000)";
422 std::string
const b
= "LINESTRING(2544000 528000, 2768040 528000)";
424 double_point_type da
;
425 bg::model::segment
<int_point_type
> ib
;
426 bg::model::segment
<double_point_type
> db
;
432 BOOST_AUTO(idist
, bg::distance(ia
, ib
));
433 BOOST_AUTO(ddist
, bg::distance(da
, db
));
435 BOOST_CHECK_MESSAGE(std::abs(idist
- ddist
) < 0.1,
436 "within<a double> different from within<an int>");
440 template <typename T
>
443 typedef bg::model::point
<T
, 2, bg::cs::cartesian
> point_type
;
444 typedef bg::model::segment
<point_type
> segment_type
;
445 typedef bg::model::box
<point_type
> box_type
;
446 typedef boost::variant
<point_type
, segment_type
, box_type
> variant_type
;
449 std::string
const point_li
= "POINT(1 3)";
450 bg::read_wkt(point_li
, point
);
453 std::string
const seg_li
= "LINESTRING(1 1,4 4)";
454 bg::read_wkt(seg_li
, seg
);
461 typename
bg::distance_result
463 variant_type
, variant_type
, bg::default_strategy
472 BOOST_CHECK_CLOSE(bg::distance(v1
, v2
), bg::distance(point
, point
), 0.0001);
473 BOOST_CHECK_CLOSE(bg::distance(v1
, point
), bg::distance(point
, point
), 0.0001);
474 BOOST_CHECK_CLOSE(bg::distance(point
, v2
), bg::distance(point
, point
), 0.0001);
477 BOOST_CHECK_CLOSE(bg::distance(v1
, v2
), bg::distance(point
, seg
), 0.0001);
478 BOOST_CHECK_CLOSE(bg::distance(v1
, seg
), bg::distance(point
, seg
), 0.0001);
479 BOOST_CHECK_CLOSE(bg::distance(point
, v2
), bg::distance(point
, seg
), 0.0001);
481 // User defined strategy
484 bg::strategy::distance::haversine
<double> s
;
485 //BOOST_CHECK_CLOSE(bg::distance(v1, v2, s), bg::distance(point, point, s), 0.0001);
486 //BOOST_CHECK_CLOSE(bg::distance(v1, point, s), bg::distance(point, point, s), 0.0001);
487 //BOOST_CHECK_CLOSE(bg::distance(point, v2, s), bg::distance(point, point, s), 0.0001);
490 int test_main(int, char* [])
493 //test_all<int[2]>();
494 //test_all<float[2]>();
495 //test_all<double[2]>();
496 //test_all<test::test_point>(); // located here because of 3D
499 test_large_integers();
501 test_all
<bg::model::d2::point_xy
<int> >();
502 test_all
<boost::tuple
<float, float> >();
503 test_all
<bg::model::d2::point_xy
<float> >();
504 test_all
<bg::model::d2::point_xy
<double> >();
507 test_all
<bg::model::d2::point_xy
<ttmath_big
> >();
510 test_empty_input
<bg::model::d2::point_xy
<int> >();
512 // below are the test cases moved here from the distance unit test
513 // in test/multi/algorithms
514 test_2d
<boost::tuple
<float, float> >();
515 test_2d
<bg::model::d2::point_xy
<float> >();
516 test_2d
<bg::model::d2::point_xy
<double> >();
518 test_3d
<boost::tuple
<float, float, float> >();
519 test_3d
<bg::model::point
<double, 3, bg::cs::cartesian
> >();
521 test_mixed
<bg::model::d2::point_xy
<float>, bg::model::d2::point_xy
<double> >();
524 test_2d
<bg::model::d2::point_xy
<ttmath_big
> >();
525 test_mixed
<bg::model::d2::point_xy
<ttmath_big
>, bg::model::d2::point_xy
<double> >();
528 test_empty_input
<bg::model::d2::point_xy
<int> >();
530 test_variant
<double>();