iau2000.hpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // Boost.Geometry
  2. // Copyright (c) 2017-2018, Oracle and/or its affiliates.
  3. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  4. // Use, modification and distribution is subject to the Boost Software License,
  5. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. #ifndef BOOST_GEOMETRY_SRS_IAU2000_HPP
  8. #define BOOST_GEOMETRY_SRS_IAU2000_HPP
  9. #include <boost/geometry/srs/projection.hpp>
  10. #include <boost/geometry/srs/projections/iau2000.hpp>
  11. #include <boost/geometry/srs/projections/iau2000_params.hpp>
  12. #include <boost/geometry/srs/projections/iau2000_traits.hpp>
  13. namespace boost { namespace geometry
  14. {
  15. namespace projections
  16. {
  17. template <>
  18. struct dynamic_parameters<srs::iau2000>
  19. {
  20. static const bool is_specialized = true;
  21. static inline srs::dpar::parameters<> apply(srs::iau2000 const& params)
  22. {
  23. return projections::detail::iau2000_to_parameters(params.code);
  24. }
  25. };
  26. template <int Code, typename CT>
  27. class proj_wrapper<srs::static_iau2000<Code>, CT>
  28. : public proj_wrapper
  29. <
  30. typename projections::detail::iau2000_traits<Code>::parameters_type,
  31. CT
  32. >
  33. {
  34. typedef projections::detail::iau2000_traits<Code> iau2000_traits;
  35. typedef proj_wrapper
  36. <
  37. typename iau2000_traits::parameters_type,
  38. CT
  39. > base_t;
  40. public:
  41. proj_wrapper()
  42. : base_t(iau2000_traits::parameters())
  43. {}
  44. explicit proj_wrapper(srs::static_iau2000<Code> const&)
  45. : base_t(iau2000_traits::parameters())
  46. {}
  47. };
  48. } // namespace projections
  49. }} // namespace boost::geometry
  50. #endif // BOOST_GEOMETRY_SRS_IAU2000_HPP