esri.hpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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_ESRI_HPP
  8. #define BOOST_GEOMETRY_SRS_ESRI_HPP
  9. #include <boost/geometry/srs/projection.hpp>
  10. #include <boost/geometry/srs/projections/esri.hpp>
  11. #include <boost/geometry/srs/projections/esri_params.hpp>
  12. #include <boost/geometry/srs/projections/esri_traits.hpp>
  13. namespace boost { namespace geometry
  14. {
  15. namespace projections
  16. {
  17. template <>
  18. struct dynamic_parameters<srs::esri>
  19. {
  20. static const bool is_specialized = true;
  21. static inline srs::dpar::parameters<> apply(srs::esri const& params)
  22. {
  23. return projections::detail::esri_to_parameters(params.code);
  24. }
  25. };
  26. template <int Code, typename CT>
  27. class proj_wrapper<srs::static_esri<Code>, CT>
  28. : public proj_wrapper
  29. <
  30. typename projections::detail::esri_traits<Code>::parameters_type,
  31. CT
  32. >
  33. {
  34. typedef projections::detail::esri_traits<Code> esri_traits;
  35. typedef proj_wrapper
  36. <
  37. typename esri_traits::parameters_type,
  38. CT
  39. > base_t;
  40. public:
  41. proj_wrapper()
  42. : base_t(esri_traits::parameters())
  43. {}
  44. explicit proj_wrapper(srs::static_esri<Code> const&)
  45. : base_t(esri_traits::parameters())
  46. {}
  47. };
  48. } // namespace projections
  49. }} // namespace boost::geometry
  50. #endif // BOOST_GEOMETRY_SRS_ESRI_HPP