• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Geometry
2 
3 // Copyright (c) 2017-2018, Oracle and/or its affiliates.
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_EPSG_HPP
11 #define BOOST_GEOMETRY_SRS_EPSG_HPP
12 
13 
14 #include <boost/geometry/srs/projection.hpp>
15 #include <boost/geometry/srs/projections/epsg.hpp>
16 #include <boost/geometry/srs/projections/epsg_params.hpp>
17 #include <boost/geometry/srs/projections/epsg_traits.hpp>
18 
19 
20 namespace boost { namespace geometry
21 {
22 
23 namespace projections
24 {
25 
26 template <>
27 struct dynamic_parameters<srs::epsg>
28 {
29     static const bool is_specialized = true;
applyboost::geometry::projections::dynamic_parameters30     static inline srs::dpar::parameters<> apply(srs::epsg const& params)
31     {
32         return projections::detail::epsg_to_parameters(params.code);
33     }
34 };
35 
36 template <int Code, typename CT>
37 class proj_wrapper<srs::static_epsg<Code>, CT>
38     : public proj_wrapper
39         <
40             typename projections::detail::epsg_traits<Code>::parameters_type,
41             CT
42         >
43 {
44     typedef projections::detail::epsg_traits<Code> epsg_traits;
45 
46     typedef proj_wrapper
47         <
48             typename epsg_traits::parameters_type,
49             CT
50         > base_t;
51 
52 public:
proj_wrapper()53     proj_wrapper()
54         : base_t(epsg_traits::parameters())
55     {}
56 
proj_wrapper(srs::static_epsg<Code> const &)57     explicit proj_wrapper(srs::static_epsg<Code> const&)
58         : base_t(epsg_traits::parameters())
59     {}
60 };
61 
62 } // namespace projections
63 
64 
65 }} // namespace boost::geometry
66 
67 
68 #endif // BOOST_GEOMETRY_SRS_EPSG_HPP
69