]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | // Boost.Geometry |
2 | ||
92f5a8d4 | 3 | // Copyright (c) 2017-2018, Oracle and/or its affiliates. |
11fdf7f2 TL |
4 | // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle |
5 | ||
6 | // Use, modification and distribution is subject to the Boost Software License, | |
7 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
8 | // http://www.boost.org/LICENSE_1_0.txt) | |
9 | ||
10 | #ifndef BOOST_GEOMETRY_SRS_ESRI_HPP | |
11 | #define BOOST_GEOMETRY_SRS_ESRI_HPP | |
12 | ||
13 | ||
14 | #include <boost/geometry/srs/projection.hpp> | |
15 | #include <boost/geometry/srs/projections/esri.hpp> | |
16 | #include <boost/geometry/srs/projections/esri_params.hpp> | |
17 | #include <boost/geometry/srs/projections/esri_traits.hpp> | |
18 | ||
19 | ||
20 | namespace boost { namespace geometry | |
21 | { | |
22 | ||
23 | namespace projections | |
24 | { | |
25 | ||
92f5a8d4 TL |
26 | template <> |
27 | struct dynamic_parameters<srs::esri> | |
11fdf7f2 | 28 | { |
92f5a8d4 TL |
29 | static const bool is_specialized = true; |
30 | static inline srs::dpar::parameters<> apply(srs::esri const& params) | |
11fdf7f2 | 31 | { |
92f5a8d4 TL |
32 | return projections::detail::esri_to_parameters(params.code); |
33 | } | |
11fdf7f2 TL |
34 | }; |
35 | ||
92f5a8d4 | 36 | |
11fdf7f2 TL |
37 | template <int Code, typename CT> |
38 | class proj_wrapper<srs::static_esri<Code>, CT> | |
92f5a8d4 | 39 | : public proj_wrapper |
11fdf7f2 | 40 | < |
92f5a8d4 | 41 | typename projections::detail::esri_traits<Code>::parameters_type, |
11fdf7f2 TL |
42 | CT |
43 | > | |
44 | { | |
45 | typedef projections::detail::esri_traits<Code> esri_traits; | |
92f5a8d4 TL |
46 | |
47 | typedef proj_wrapper | |
48 | < | |
49 | typename esri_traits::parameters_type, | |
50 | CT | |
51 | > base_t; | |
11fdf7f2 TL |
52 | |
53 | public: | |
54 | proj_wrapper() | |
92f5a8d4 | 55 | : base_t(esri_traits::parameters()) |
11fdf7f2 | 56 | {} |
11fdf7f2 | 57 | |
92f5a8d4 TL |
58 | explicit proj_wrapper(srs::static_esri<Code> const&) |
59 | : base_t(esri_traits::parameters()) | |
11fdf7f2 TL |
60 | {} |
61 | }; | |
62 | ||
63 | ||
92f5a8d4 | 64 | } // namespace projections |
11fdf7f2 TL |
65 | |
66 | ||
67 | }} // namespace boost::geometry | |
68 | ||
69 | ||
70 | #endif // BOOST_GEOMETRY_SRS_ESRI_HPP |