1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2 // Unit Test
3
4 // Copyright (c) 2014, Oracle and/or its affiliates.
5
6 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
7
8 // Licensed under the Boost Software License version 1.0.
9 // http://www.boost.org/users/license.html
10
11 #include <test_geometries/custom_lon_lat_point.hpp>
12
13 #include <boost/geometry/core/cs.hpp>
14 #include <boost/geometry/geometries/point.hpp>
15 #include <boost/geometry/geometries/concepts/check.hpp>
16
17
18 namespace bg = boost::geometry;
19
20
21 template <typename CoordinateSystem>
test_coordinate_system()22 inline void test_coordinate_system()
23 {
24 typedef bg::model::point<double, 2, CoordinateSystem> bg_double_point;
25 typedef bg::model::point<int, 2, CoordinateSystem> bg_int_point;
26
27 typedef rw_lon_lat_point<double, CoordinateSystem> rw_double_point;
28 typedef ro_lon_lat_point<double, CoordinateSystem> ro_double_point;
29
30 typedef rw_lon_lat_point<int, CoordinateSystem> rw_int_point;
31 typedef ro_lon_lat_point<int, CoordinateSystem> ro_int_point;
32
33 bg::concepts::check<bg_int_point>();
34 bg::concepts::check<bg_int_point const>();
35
36 bg::concepts::check<bg_double_point>();
37 bg::concepts::check<bg_double_point const>();
38
39 bg::concepts::check<rw_int_point>();
40 bg::concepts::check<rw_int_point const>();
41 bg::concepts::check<ro_int_point const>();
42
43 bg::concepts::check<rw_double_point>();
44 bg::concepts::check<rw_double_point const>();
45 bg::concepts::check<ro_double_point const>();
46 }
47
48
main()49 int main()
50 {
51 test_coordinate_system<bg::cs::geographic<bg::degree> >();
52 test_coordinate_system<bg::cs::geographic<bg::radian> >();
53
54 test_coordinate_system<bg::cs::spherical<bg::degree> >();
55 test_coordinate_system<bg::cs::spherical<bg::radian> >();
56
57 test_coordinate_system<bg::cs::spherical_equatorial<bg::degree> >();
58 test_coordinate_system<bg::cs::spherical_equatorial<bg::radian> >();
59
60 test_coordinate_system<bg::cs::polar<bg::degree> >();
61 test_coordinate_system<bg::cs::polar<bg::radian> >();
62
63 return 0;
64 }
65